You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: route ask/docs/diff options past root-command flag collisions (#52)
The root command defines -b/--branch, --model, --format, --full-clone, --keep-temp, etc. Because the root has options + an action alongside subcommands, Commander captures those flags at the root before the subcommand parses them, so several subcommand options were silently ignored:
- ask: --branch, --model
- docs: --branch
- diff: --format, --full-clone, --keep-temp
Extract pure, tested getFlagValue/hasFlag helpers in src/utils.ts and read the affected options from raw argv (the approach diff already used for --output). Removed the masking default on diff --format so the fallback can take effect (runPullRequestDiff already defaults to markdown).
Tests: getFlagValue/hasFlag unit tests; an in-process cli routing test that mocks the command runners and asserts values reach them; a real-CLI diff e2e asserting --format html and --keep-temp take effect.
Co-authored-by: Arthur742Ramos <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
43
43
44
44
### Fixed
45
45
46
+
-`bootcamp ask`, `docs`, and `diff` now honor options whose flag names collide with the root command. `ask --branch/--model`, `docs --branch`, and `diff --format/--full-clone/--keep-temp` were captured by the root command and silently ignored; they are now read from raw argv (via shared, tested `getFlagValue`/`hasFlag` helpers in `src/utils.ts`).
46
47
-`bootcamp health` now honors `--branch` and `--max-files`. These short flags (`-b`/`-m`) collide with the root command's options, which captured them before the subcommand could; the command now falls back to reading raw argv (matching the `diff --output` approach). The `--json` output also gained a `filesScanned` field.
47
48
- Reused shared prompt helper builders in `src/agent.ts` for standard/fast prompt construction.
48
49
- Preserved caught error causes in `src/watch.ts` non-fast-forward rethrows.
0 commit comments