基线:全量源码首提(D1 版本控制落地,含第一轮优化 B1-B4/A1/A4/缩放修复)
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
# Screenshots
|
||||
|
||||
This is lookup-only guidance. Do not use it for ordinary navigation, reading, search, or form interaction when a DOM snapshot answers the question.
|
||||
|
||||
Capture a screenshot only when the user explicitly requests one, visual layout/rendering/image content must be judged, or the required target is absent from the DOM snapshot. Do not request a snapshot and screenshot together by default.
|
||||
|
||||
`await tab.screenshot(opts?)` returns PNG bytes as `Uint8Array` internally. Those bytes are not a model-visible screenshot and must never be returned as the JS result.
|
||||
|
||||
Every screenshot call must pass the bytes to `nodeRepl.emitImage` in the same JS cell so the tool returns a standard image content block:
|
||||
|
||||
```js
|
||||
nodeRepl.emitImage(await tab.screenshot());
|
||||
```
|
||||
|
||||
Never use `await tab.screenshot()` as the final expression.
|
||||
|
||||
Supported screenshot options:
|
||||
|
||||
- `{ fullPage: true }` captures the whole page.
|
||||
- `{ clip: { x, y, width, height } }` captures a viewport region.
|
||||
|
||||
If a screenshot times out, do not immediately issue the same screenshot again. The underlying Chromium
|
||||
capture may still be completing; wait before retrying, or reopen the tab if the explicit in-flight error
|
||||
does not clear.
|
||||
Reference in New Issue
Block a user