Skip to content

do not take fullpage screenshot post CUA action #2197

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

Merged
merged 1 commit into from
Apr 20, 2025

Conversation

wintonzheng
Copy link
Contributor

@wintonzheng wintonzheng commented Apr 20, 2025

Important

Modify record_artifacts_after_action in agent.py to disable full-page screenshots for RunEngine.openai_cua.

  • Behavior:
    • Modify record_artifacts_after_action in agent.py to conditionally disable full-page screenshots for RunEngine.openai_cua.
    • Update calls to record_artifacts_after_action in agent_step() to pass engine parameter.
  • Functions:
    • Add engine parameter to record_artifacts_after_action() to control screenshot behavior.
    • Update agent_step() to pass engine to record_artifacts_after_action() in three places.

This description was created by Ellipsis for cb5dcc5. You can customize this summary. It will automatically update as commits are pushed.

@wintonzheng wintonzheng merged commit 730dd47 into main Apr 20, 2025
7 checks passed
@wintonzheng wintonzheng deleted the shu/no_full_page_screenshot_for_cua branch April 20, 2025 21:58
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.

Caution

Changes requested ❌

Reviewed everything up to cb5dcc5 in 1 minute and 56 seconds. Click for details.
  • Reviewed 57 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. skyvern/forge/agent.py:1455
  • Draft comment:
    Good change: Using the engine parameter to conditionally disable full-page screenshots for openai_cua improves efficiency.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. skyvern/forge/agent.py:1444
  • Draft comment:
    Ensure all calls to record_artifacts_after_action are updated with the new engine parameter. The changes seem consistent.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
3. skyvern/forge/agent.py:1455
  • Draft comment:
    For clarity, consider using a ternary operator for setting fullpage_screenshot, e.g. 'fullpage_screenshot = False if engine == RunEngine.openai_cua else True'.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
4. skyvern/forge/agent.py:1293
  • Draft comment:
    Typo: 'skyvern_repsonse_prompt' appears to be misspelled. It should likely be 'skyvern_response_prompt'. Please correct this for clarity.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_DEBsrGQt3gB4tj8d

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@@ -1441,12 +1441,23 @@ async def check_user_goal_complete(
)
return None

async def record_artifacts_after_action(self, task: Task, step: Step, browser_state: BrowserState) -> None:
async def record_artifacts_after_action(
Copy link
Contributor

Choose a reason for hiding this comment

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

Since the new engine parameter controls whether a full-page screenshot is taken (with if engine == RunEngine.openai_cua), consider updating the function’s docstring/comments to document this behavior. Simplify the assignment by writing: fullpage_screenshot = (engine != RunEngine.openai_cua) for clarity.

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