Conversation
…lag error `webcmd setup` dropped `--mode` and `--api-key` when it stopped configuring hosted mode (agentrhq#493). Passing either now falls through to the generic unknown flag branch, which prints the valid-flag list and leaves the user guessing whether they mistyped something or the flag is gone. Name both flags explicitly and point `--mode` at the `--browser` selection that replaced it, so anyone following an older doc or their own muscle memory gets an actionable error. Genuinely unknown flags keep the existing message.
Contributor
🟢 No documentation gap found — medium confidenceThe automated review found no documentation gap in the supplied changes. This review is advisory and does not block merging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
#493 removed
--modeand--api-keyfromwebcmd setup. Both now fall through to the generic unknown-flag branch:That message can't tell the user whether they mistyped something or the flag is gone, and it doesn't point at
--browser, which is what replaced--mode local.webcmd setup --mode local --browser ...was the documented form until recently, so it is still in older docs, in blog posts, and in muscle memory.Change
parseSetupArgsnow names removed flags before the generic branch:Handles the
--flag valueand--flag=valuespellings. Genuinely unknown flags (--bogus) keep the existing "unknown flag" message and valid-flag list, andSETUP_HELPis unchanged — removed flags are named on use, not advertised.Tests
Added a parameterized case in
src/hosted/setup.test.tscovering--mode local,--mode=local, and--api-key, asserting each is named and no longer reaches the unknown-flag branch.src/hosted/setup.test.ts: 49/49 pass.tsc --noEmit: clean.Notes
I originally had docs changes alongside this — the
setup --mode local --browser ...occurrences incli-reference.mdx/troubleshooting.mdx. Those are already fixed onmain, so this PR is the CLI-side half only.