-
Notifications
You must be signed in to change notification settings - Fork 1.3k
add legacy warning to agent dom mode #1544
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
Conversation
🦋 Changeset detectedLatest commit: 8898e28 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Greptile SummaryThis PR adds a deprecation warning for DOM mode in the agent, recommending users migrate to hybrid mode. The warning is logged at level 0 (visible) when an agent is instantiated with Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant V3AgentHandler
participant Logger
User->>V3AgentHandler: new V3AgentHandler(mode: "dom")
V3AgentHandler->>V3AgentHandler: Check if mode === "dom"
V3AgentHandler->>Logger: Log warning message
Logger-->>User: Display: "Using DOM mode (legacy)..."
V3AgentHandler-->>User: Return agent instance
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 3 files
| this.logger({ | ||
| category: "agent", | ||
| message: | ||
| "Using DOM mode (legacy). Consider using mode: 'hybrid' for improved performance.\n → https://docs.stagehand.dev/v3/basics/agent\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should say
| "Using DOM mode (legacy). Consider using mode: 'hybrid' for improved performance.\n → https://docs.stagehand.dev/v3/basics/agent\n", | |
| "Using default DOM mode in agent (legacy). Consider using mode: 'hybrid' for improved performance.\n → https://docs.stagehand.dev/v3/basics/agent\n", |
Co-authored-by: Miguel <[email protected]>
why
we want to move towards hybrid mode being the default
what changed
added a legacy warning when using dom mode recommends hybrid mode and links out to hybrid mode docs
test plan
Summary by cubic
The agent now logs a legacy warning when mode isn’t specified (defaults to DOM), recommending hybrid mode for better performance with a link to the Agent docs. Docs navigation was updated to surface Agent basics and reference.
Written for commit 8898e28. Summary will update on new commits.