feat: add dialog detection and document dialog commands (#999)
Fixes #992 When a JavaScript dialog (alert/confirm/prompt) blocks the page, agents had no way to detect it — all commands just timed out with generic errors. - Add `dialog status` command to check for pending dialogs - Track dialog state via CDP Page.javascriptDialogOpening/Closed events - Auto-inject `warning` field into all command responses when a dialog is pending, so agents can distinguish dialog-blocked timeouts from other issues - Document dialog commands in SKILL.md (was missing entirely), README.md, docs site, and --help output Co-authored-by: ctate <366502+ctate@users.noreply.github.com>
This commit is contained in:
@@ -223,8 +223,11 @@ The `frame` command accepts element refs (`@e3`), CSS selectors (`"#my-iframe"`)
|
||||
```bash
|
||||
agent-browser dialog accept [text] # Accept dialog (with optional prompt text)
|
||||
agent-browser dialog dismiss # Dismiss dialog
|
||||
agent-browser dialog status # Check if a dialog is currently open
|
||||
```
|
||||
|
||||
When a JavaScript dialog (`alert`, `confirm`, `prompt`) is pending, all command responses include a `warning` field with the dialog type and message.
|
||||
|
||||
## Debug
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user