-
Notifications
You must be signed in to change notification settings - Fork 5k
feat(mcp): respond with snapshot diff when beneficial #37500
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
This comment has been minimized.
This comment has been minimized.
6b0df62 to
ff33efa
Compare
This comment has been minimized.
This comment has been minimized.
| - Page Snapshot: | ||
| \`\`\`yaml | ||
| - button "Button"`), | ||
| - Page Title: Title`), |
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.
I'd say if the dom did not change we should not include the snapshot at all, along with url / title.
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.
I'll follow up in a separate PR.
Upon capturing aria snapshot for a tab, we also diff it
against a previous one. If the diff is small enough, mcp tool
responds with the diff, otherwise it includes the full snapshot.
Example response:
```
- Page Snapshot Diff:
The following refs have changed
'''yaml
button "Button 1" [active] [ref=e2]
'''
'''yaml
button "Button 2" [ref=e3]
'''
'''yaml
listitem [ref=e5]:
- text: Filler 0
- button "new button" [ref=e105]
'''
```
ff33efa to
1273667
Compare
This comment has been minimized.
This comment has been minimized.
1273667 to
d69aa34
Compare
Test results for "tests 1"2 failed 4 flaky46969 passed, 821 skipped Merge workflow run. |
…oft#37500)" This reverts commit c92b9a1.
Upon capturing aria snapshot for a tab, we also diff it against a previous one. If the diff is small enough, mcp tool responds with the diff, otherwise it includes the full snapshot.
Example response: