(ctx context.Context, durationMillis int64)
| 333 | } |
| 334 | |
| 335 | func (t *computerUseTool) wait(ctx context.Context, durationMillis int64) { |
| 336 | d := durationMillis |
| 337 | if d <= 0 { |
| 338 | d = 1000 |
| 339 | } |
| 340 | timer := t.clock.NewTimer(time.Duration(d)*time.Millisecond, "computeruse", "wait") |
| 341 | defer timer.Stop() |
| 342 | select { |
| 343 | case <-ctx.Done(): |
| 344 | case <-timer.C: |
| 345 | } |
| 346 | } |
| 347 | |
| 348 | func coordinateFromInt64(x, y int64) [2]int { |
| 349 | return [2]int{int(x), int(y)} |
no test coverage detected