fix: test fix box drawing click wording
This commit is contained in:
@@ -84,7 +84,7 @@ Other action examples:
|
||||
}
|
||||
```
|
||||
|
||||
Use coordinates from your own screenshot, not these example coordinates. Coordinate clicks draw a bounding box with `ymin`, `xmin`, `ymax`, and `xmax`; the click is delivered to the center of the box. `expectedSize` is optional and rejects input if the screen size changed. Supported actions are click, click_target, scroll, keys, text, and wait. Drag is deferred. Actions are serialized by a VM-side lock; avoid manual interaction while a request runs. The full request is validated before any actions execute, but runtime failures can still leave partial effects.
|
||||
Use coordinates from your own screenshot, not these example coordinates. Coordinate clicks draw a bounding box with `ymin`, `xmin`, `ymax`, and `xmax` placing the target in the middle of the box (the click is delivered to the center of the box). `expectedSize` is optional and rejects input if the screen size changed. Supported actions are click, click_target, scroll, keys, text, and wait. Drag is deferred. Actions are serialized by a VM-side lock; avoid manual interaction while a request runs. The full request is validated before any actions execute, but runtime failures can still leave partial effects.
|
||||
|
||||
After a non-empty action batch, the helper waits **500 ms** before taking the resulting screenshot and scanning accessibility targets. Capture-only requests have no added delay. This allows ordinary UI updates to paint; slow loads still need an explicit wait or another observation.
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ const target = z.object({ id: z.string(), name: z.string(), role: z.string(), ap
|
||||
const observation = z.object({ image: z.string().min(1), rawImage: z.string().optional(), targets: z.array(target).default([]), accessibilityWarning: z.string().nullable().optional(), observationId: z.string(), width: z.number().int().positive(), height: z.number().int().positive(), completedActions: z.number(), coordinateSpace: z.enum(["pixels", "normalized_1000"]), clicks: z.array(z.object({ supplied: z.array(z.number()), pixels: z.tuple([z.number(), z.number()]) })) });
|
||||
|
||||
export const toolDefinitions = [
|
||||
{ type: "function", function: { name: "desktop", description: "Operate the XFCE desktop and receive a fresh screenshot. Empty actions captures only. Prefer click_target using a numbered accessibility label and its observationId from the latest screenshot. A target click must be the first action, with at most one per request. Labels are overlay annotations, not actual UI. If no suitable label exists, use coordinate clicks to draw a box with ymin, xmin, ymax, and xmax; the click occurs at the center of the box. Coordinates must be normalized integers in the range [0, 1000], where (0, 0) is top-left and (1000, 1000) is bottom-right. Text replaces the clipboard and pastes with Ctrl+V; not appropriate for terminals. Use X11 key names such as ctrl, Return, Escape. A 500ms settling delay precedes post-action screenshots. Observe after uncertain transitions; slower applications may need an explicit wait. Total waits must not exceed 5000ms.", parameters: z.toJSONSchema(desktopArguments, { io: "input" }) } },
|
||||
{ type: "function", function: { name: "desktop", description: "Operate the XFCE desktop and receive a fresh screenshot. Empty actions captures only. Prefer click_target using a numbered accessibility label and its observationId from the latest screenshot. A target click must be the first action, with at most one per request. Labels are overlay annotations, not actual UI. If no suitable label exists, use coordinate clicks: draw a box with ymin, xmin, ymax, and xmax placing what you want to click in the middle of the box (the click is delivered to the center of the box). Coordinates must be normalized integers in the range [0, 1000], where (0, 0) is top-left and (1000, 1000) is bottom-right. Text replaces the clipboard and pastes with Ctrl+V; not appropriate for terminals. Use X11 key names such as ctrl, Return, Escape. A 500ms settling delay precedes post-action screenshots. Observe after uncertain transitions; slower applications may need an explicit wait. Total waits must not exceed 5000ms.", parameters: z.toJSONSchema(desktopArguments, { io: "input" }) } },
|
||||
{ type: "function", function: { name: "shell", description: "Run a bounded shell command inside home with the desktop user's permissions. Not for managed background jobs. Output is truncated to 16000 characters per stream.", parameters: z.toJSONSchema(shellArguments, { io: "input" }) } },
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user