MCPcopy Create free account
hub / github.com/aeroxy/chrome-devtools-cli / is_browser_level

Function is_browser_level

src/commands/executor.rs:118–120  ·  view source on GitHub ↗

Whether a command operates at the browser level (no page session needed). `inspect-heapsnapshot-node` is intentionally excluded: it is intercepted offline in the CLI before any daemon connection is established, so the daemon should never receive it. If it ever does, omitting it here lets it fall through to `inner_execute`'s catch-all `bail!("Unknown command")` rather than hitting the `_ => unreac

(cmd: &str)

Source from the content-addressed store, hash-verified

116/// rather than hitting the `_ => unreachable!()` arm in the browser-level
117/// dispatch and panicking.
118fn is_browser_level(cmd: &str) -> bool {
119 matches!(cmd, "list-pages" | "new-page" | "sw-logs" | "kill-daemon")
120}
121
122/// Execute a single command from a [`DaemonRequest`].
123///

Callers 2

validate_argsFunction · 0.85
execute_commandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected