You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f728aa5
Browse filesBrowse the repository at this point in the historyBrowse files
feat(preview): give agents hover, select, drag, and click options
Agents could only left-click once, so hover menus, native dropdowns,
context menus, double-click editing, and drag-and-drop needed evaluate
hacks or were out of reach. preview_click takes button and clickCount on
server and desktop tabs, and server tabs add preview_hover,
preview_select (by value or visible label), and preview_drag.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
"Click exactly one target in the tab selected by tabId, or this agent session's current tab when omitted. Prefer a Playwright locator; selector accepts legacy CSS; x and y must be supplied together.",
164
+
"Click exactly one target in the tab selected by tabId, or this agent session's current tab when omitted. Prefer a Playwright locator; selector accepts legacy CSS; x and y must be supplied together. Set button=right for a context menu or clickCount=2 for a double-click; server browser tabs only.",
"Move the mouse over exactly one target in the tab selected by tabId, or this agent session's current tab when omitted, to reveal hover menus and tooltips. Server browser tabs only.",
187
+
parameters: PreviewAutomationHoverInput,
188
+
success: PreviewActionResult,
189
+
failure: PreviewAutomationError,
190
+
dependencies,
191
+
}).annotate(Tool.Title,"Hover preview page"),
192
+
);
193
+
194
+
constPreviewSelectTool=browserTool(
195
+
Tool.make("preview_select",{
196
+
description:
197
+
"Choose options in one native <select> in the tab selected by tabId, or this agent session's current tab when omitted, by option value or visible label. Custom dropdowns are not <select>; click them open and click the option instead. Server browser tabs only.",
198
+
parameters: PreviewAutomationSelectInput,
199
+
success: Schema.Struct({
200
+
...PreviewAutomationSelectResult.fields,
201
+
...presentationFields,
202
+
}),
203
+
failure: PreviewAutomationError,
204
+
dependencies,
205
+
}).annotate(Tool.Title,"Select preview option"),
206
+
);
207
+
208
+
constPreviewDragTool=browserTool(
209
+
Tool.make("preview_drag",{
210
+
description:
211
+
"Drag one element onto another in the tab selected by tabId, or this agent session's current tab when omitted. Server browser tabs only.",
0 commit comments