refactor: make --full/-f a command-level flag instead of global (#877)
* refactor: make --full/-f a command-level flag instead of global Move --full/-f from global flags (parsed in flags.rs) to command-level parsing in commands.rs, scoped to the three commands that actually use it: `screenshot`, `diff screenshot`, and `diff url`. This frees up `-f` for other commands (e.g. `--follow` on `console`/`errors`, see #867) and better reflects that full-page capture is not a global concern. Changes: - Remove `full` from Flags struct, Config struct, and global flag parsing - Remove `--full`/`-f` from clean_args global boolean flags list - Parse `--full`/`-f` inline in `screenshot` command handler - Accept `-f` shorthand in `diff screenshot` and `diff url` (previously only `--full` was accepted at command level) - Remove fallback from global `flags.full` in diff subcommands - Update tests to pass --full as a command argument rather than a global flag Fixes #876 * fix: remove stale AGENT_BROWSER_FULL env var from help and add -f shorthand tests - Remove AGENT_BROWSER_FULL from help text in output.rs since the env var is no longer read after moving --full to command-level parsing - Add test_screenshot_full_page_shorthand to verify screenshot -f works - Add test_diff_screenshot_command_full_flag_shorthand to verify diff screenshot -f works --------- Co-authored-by: ctate <366502+ctate@users.noreply.github.com>
This commit is contained in:
@@ -2655,7 +2655,6 @@ Environment:
|
||||
AGENT_BROWSER_EXTENSIONS Comma-separated browser extension paths
|
||||
AGENT_BROWSER_HEADED Show browser window (not headless)
|
||||
AGENT_BROWSER_JSON JSON output
|
||||
AGENT_BROWSER_FULL Full page screenshot
|
||||
AGENT_BROWSER_ANNOTATE Annotated screenshot with numbered labels and legend
|
||||
AGENT_BROWSER_DEBUG Debug output
|
||||
AGENT_BROWSER_IGNORE_HTTPS_ERRORS Ignore HTTPS certificate errors
|
||||
|
||||
Reference in New Issue
Block a user