diff --git a/README.md b/README.md index 255a54c..02d2e42 100644 --- a/README.md +++ b/README.md @@ -511,7 +511,6 @@ The `snapshot` command supports filtering to reduce output size: ```bash agent-browser snapshot # Full accessibility tree agent-browser snapshot -i # Interactive elements only (buttons, inputs, links) -agent-browser snapshot -i -C # Include cursor-interactive elements (divs with onclick, etc.) agent-browser snapshot -c # Compact (remove empty structural elements) agent-browser snapshot -d 3 # Limit depth to 3 levels agent-browser snapshot -s "#main" # Scope to CSS selector @@ -521,13 +520,10 @@ agent-browser snapshot -i -c -d 5 # Combine options | Option | Description | | ---------------------- | ----------------------------------------------------------------------- | | `-i, --interactive` | Only show interactive elements (buttons, links, inputs) | -| `-C, --cursor` | Include cursor-interactive elements (cursor:pointer, onclick, tabindex) | | `-c, --compact` | Remove empty structural elements | | `-d, --depth ` | Limit tree depth | | `-s, --selector ` | Scope to CSS selector | -The `-C` flag is useful for modern web apps that use custom clickable elements (divs, spans) instead of standard buttons/links. - ## Annotated Screenshots The `--annotate` flag overlays numbered labels on interactive elements in the screenshot. Each label `[N]` corresponds to ref `@eN`, so the same refs work for both visual and text-based workflows. diff --git a/cli/src/commands.rs b/cli/src/commands.rs index d47a2c6..d29797f 100644 --- a/cli/src/commands.rs +++ b/cli/src/commands.rs @@ -533,6 +533,7 @@ pub fn parse_command(args: &[String], flags: &Flags) -> Result { + // deprecated, cursor-interactive elements are referred by default now obj.insert("cursor".to_string(), json!(true)); } "-d" | "--depth" => { diff --git a/cli/src/native/actions.rs b/cli/src/native/actions.rs index b05c521..c5a751e 100644 --- a/cli/src/native/actions.rs +++ b/cli/src/native/actions.rs @@ -1734,7 +1734,6 @@ async fn handle_snapshot(cmd: &Value, state: &mut DaemonState) -> Result Result and (standard interactive – ARIA tree, NOT in cursor section) + // -