Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

general selection #675

Merged
merged 1 commit into from
Aug 6, 2024
Merged

general selection #675

merged 1 commit into from
Aug 6, 2024

Conversation

LawyZheng
Copy link
Collaborator

@LawyZheng LawyZheng commented Aug 6, 2024

🚀 This description was created by Ellipsis for commit eaea7eb

Summary:

Enhanced custom selection functionality with incremental DOM scraping and LLM-based element matching across multiple files.

Key points:

  • Configuration Updates: Added OPTION_LOADING_TIMEOUT_MS and SECONDARY_LLM_KEY in skyvern/config.py.
  • New Exceptions: Introduced NoIncrementalElementFoundForCustomSelection, NoLabelOrValueForCustomSelection, NoElementMatchedForTargetOption, and NoElementBoudingBox in skyvern/exceptions.py.
  • LLM Handler: Added SECONDARY_LLM_API_HANDLER in skyvern/forge/app.py.
  • Prompts: Added custom-select.j2 and opened-dropdown-confirm.j2 templates for LLM prompts.
  • Action Handlers: Enhanced handle_select_option_action in skyvern/webeye/actions/handler.py to support custom selection using incremental DOM scraping and LLM-based element matching.
  • DOM Utilities: Updated isInteractable and added isScrollable in skyvern/webeye/scraper/domUtils.js.
  • Scraper Enhancements: Introduced IncrementalScrapePage class for incremental DOM scraping in skyvern/webeye/scraper/scraper.py.
  • Element Interaction: Added methods for incremental element creation and interaction in skyvern/webeye/utils/dom.py.
  • Scrolling Utilities: Added methods for scrolling within elements in skyvern/webeye/utils/page.py.

Generated with ❤️ by ellipsis.dev

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Reviewed everything up to eaea7eb in 1 minute and 16 seconds

More details
  • Looked at 1186 lines of code in 10 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_ELokuU1E64DOJWpY


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

)


class NoLabelOrValueForCustomSelection(SkyvernException):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The exception message in NoLabelOrValueForCustomSelection is misleading as it suggests the text for option.label or option.value is invalid. However, the actual issue is that both are None. Consider revising the message to clarify that neither label nor value is provided.

Suggested change
class NoLabelOrValueForCustomSelection(SkyvernException):
super().__init__(f"Neither option.label nor option.value is provided for custom selection. element_id={element_id}")

@LawyZheng LawyZheng merged commit cba0f68 into main Aug 6, 2024
2 checks passed
@LawyZheng LawyZheng deleted the general-selection branch August 6, 2024 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant