Commit 8898a01
authored
fix(cua): use scroll notch count (wheel units) in all computer-use templates (#129)
updates scrolling logic across all computer use templates in the CLI.
- **Branch:** `fix-cua-templates-scroll-behavior`
Made with [Cursor](https://cursor.com)
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Changes scroll semantics across multiple computer-use templates from
pixel-based deltas to wheel-notch units, which can materially alter
agent navigation behavior and task success. Also includes a few runtime
guards (local execution gating, null-handling) that are low risk but
touch invocation paths.
>
> **Overview**
> **Unifies scroll behavior across computer-use templates** by switching
from pixel-based scroll deltas to *wheel unit (notch) counts* in
Anthropic (TS/Python), Gemini (TS/Python), Yutori (TS/Python), and
OpenAGI handlers, and updating tool outputs/prompts to reflect the new
units.
>
> **Gemini templates now convert `magnitude` (px) to capped notch
counts** (via `PX_PER_NOTCH`/`MAX_NOTCHES_PER_ACTION`) and add a few
safety checks (e.g., missing function names/content). Local test
entrypoints in Gemini are gated on `KERNEL_INVOCATION`, and the TS
Gemini session adds null-safe handling for returned URLs/IDs.
>
> **Template/QA naming is aligned** by changing the yutori template key
from `yutori-computer-use` to `yutori` in docs (`qa.md`) and
`pkg/create/templates.go`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
6f3501d. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 43fc638 commit 8898a01
File tree
30 files changed
+125
-140
lines changed- .cursor/commands
- pkg
- create
- templates
- python
- anthropic-computer-use
- tools
- gemini-computer-use
- tools
- openagi-computer-use
- yutori
- tools
- typescript
- anthropic-computer-use
- tools
- gemini-computer-use
- tools
- yutori
- tools
30 files changed
+125
-140
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
Lines changed: 11 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
373 | | - | |
374 | | - | |
375 | | - | |
| 373 | + | |
376 | 374 | | |
377 | 375 | | |
378 | 376 | | |
379 | | - | |
| 377 | + | |
380 | 378 | | |
381 | | - | |
| 379 | + | |
382 | 380 | | |
383 | | - | |
| 381 | + | |
384 | 382 | | |
385 | | - | |
386 | | - | |
387 | | - | |
| 383 | + | |
388 | 384 | | |
389 | 385 | | |
390 | 386 | | |
| |||
393 | 389 | | |
394 | 390 | | |
395 | 391 | | |
396 | | - | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
397 | 398 | | |
398 | 399 | | |
399 | 400 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
80 | | - | |
| 78 | + | |
| 79 | + | |
81 | 80 | | |
82 | 81 | | |
83 | 82 | | |
| |||
Lines changed: 16 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
131 | 133 | | |
132 | 134 | | |
133 | 135 | | |
134 | | - | |
135 | 136 | | |
136 | 137 | | |
137 | | - | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
| 140 | + | |
140 | 141 | | |
| 142 | + | |
141 | 143 | | |
142 | | - | |
| 144 | + | |
143 | 145 | | |
144 | | - | |
| 146 | + | |
145 | 147 | | |
146 | | - | |
| 148 | + | |
147 | 149 | | |
148 | | - | |
149 | | - | |
| 150 | + | |
150 | 151 | | |
151 | 152 | | |
152 | 153 | | |
| |||
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
167 | | - | |
168 | | - | |
| 168 | + | |
| 169 | + | |
169 | 170 | | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
| 171 | + | |
176 | 172 | | |
177 | | - | |
| 173 | + | |
178 | 174 | | |
179 | | - | |
| 175 | + | |
180 | 176 | | |
181 | | - | |
| 177 | + | |
182 | 178 | | |
183 | | - | |
184 | | - | |
| 179 | + | |
185 | 180 | | |
186 | 181 | | |
187 | 182 | | |
| |||
Lines changed: 21 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
45 | | - | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
| |||
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
55 | | - | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
61 | | - | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
239 | 240 | | |
240 | 241 | | |
241 | 242 | | |
242 | | - | |
| 243 | + | |
243 | 244 | | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
252 | 257 | | |
253 | 258 | | |
254 | 259 | | |
255 | 260 | | |
256 | | - | |
| 261 | + | |
257 | 262 | | |
258 | 263 | | |
259 | 264 | | |
| |||
298 | 303 | | |
299 | 304 | | |
300 | 305 | | |
301 | | - | |
| 306 | + | |
302 | 307 | | |
303 | 308 | | |
304 | 309 | | |
| |||
316 | 321 | | |
317 | 322 | | |
318 | 323 | | |
319 | | - | |
| 324 | + | |
320 | 325 | | |
321 | | - | |
322 | 326 | | |
323 | 327 | | |
324 | | - | |
325 | 328 | | |
326 | 329 | | |
327 | 330 | | |
328 | 331 | | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
| 332 | + | |
335 | 333 | | |
336 | 334 | | |
337 | 335 | | |
338 | 336 | | |
339 | 337 | | |
340 | | - | |
341 | 338 | | |
342 | 339 | | |
343 | 340 | | |
344 | | - | |
345 | 341 | | |
346 | 342 | | |
347 | 343 | | |
| |||
File renamed without changes.
File renamed without changes.
File renamed without changes.
0 commit comments