feat(screenshot): hide scrollbars in headless screenshots (cherry-pick b4f2f37)
Cherry-picks upstream agent-browser #1396. Adds a configurable --hide-scrollbars flag (AGENT_BROWSER_HIDE_SCROLLBARS env, hideScrollbars config key, default true) that appends Chrome's --hide-scrollbars launch arg for headless (non-extension) launches so native scrollbars aren't painted into screenshots. Plumbed through flags.rs, connection.rs, main.rs, native/actions.rs and native/cdp/chrome.rs; help text in output.rs + skill-data. Fork adaptation: - the arg lands in the headless && !has_extensions block, separate from the stealth base args — no interaction with anti-detection. - dropped upstream docs/, agent-browser.schema.json and README hunks (removed or rewritten in this fork). Verified: cargo check --tests passes.
This commit is contained in:
@@ -243,6 +243,9 @@ agent-browser screenshot --full full.png # full scroll height
|
||||
agent-browser screenshot --annotate map.png # numbered labels + legend keyed to snapshot refs
|
||||
```
|
||||
|
||||
Headless Chromium screenshots hide native scrollbars for consistent image output.
|
||||
Pass `--hide-scrollbars false` when launching to keep native scrollbars visible.
|
||||
|
||||
`--annotate` is designed for multimodal models: each label `[N]` maps to ref `@eN`.
|
||||
|
||||
### Handle multiple pages via tabs
|
||||
|
||||
Reference in New Issue
Block a user