fix(cli): add -u short form to lsp add --update
CI / lint (pull_request) Failing after 1s
CI / typecheck (pull_request) Failing after 2s
CI / coverage (pull_request) Has been skipped
CI / security (pull_request) Failing after 1s
CI / quality (pull_request) Failing after 2s
CI / unit_tests (pull_request) Failing after 2s
CI / docker (pull_request) Has been skipped
CI / integration_tests (pull_request) Failing after 1s
CI / e2e_tests (pull_request) Failing after 2s
CI / build (pull_request) Failing after 1s
CI / helm (pull_request) Failing after 2s
CI / status-check (pull_request) Failing after 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Has been skipped
CI / lint (pull_request) Failing after 1s
CI / typecheck (pull_request) Failing after 2s
CI / coverage (pull_request) Has been skipped
CI / security (pull_request) Failing after 1s
CI / quality (pull_request) Failing after 2s
CI / unit_tests (pull_request) Failing after 2s
CI / docker (pull_request) Has been skipped
CI / integration_tests (pull_request) Failing after 1s
CI / e2e_tests (pull_request) Failing after 2s
CI / build (pull_request) Failing after 1s
CI / helm (pull_request) Failing after 2s
CI / status-check (pull_request) Failing after 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Has been skipped
Add the missing `-u` short-form alias for the `--update` option on the
`lsp add` command, aligning the implementation with the specification
(spec line 8645: `agents lsp add [--update|-u] (--config|-c) <FILE>`).
The Typer option declaration in `lsp.py` now includes `"-u"` alongside
`"--update"`. A new Behave scenario ("Add LSP server with -u short form
overwrites existing") and its step definition verify the short form works
end-to-end through the CLI runner.
No conflicts exist — `-u` was not claimed by any other option on
`lsp add` (existing short forms: `-c` for `--config`, `-f` for
`--format`).
ISSUES CLOSED: #912
This commit is contained in:
@@ -39,6 +39,14 @@ Feature: LSP CLI commands coverage
|
||||
Then the lsp CLI command should succeed
|
||||
And the lsp CLI output should contain "LSP Server Registered"
|
||||
|
||||
@lsp_cli_add
|
||||
Scenario: Add LSP server with -u short form overwrites existing
|
||||
Given a valid LSP server YAML config file
|
||||
And the LSP server has been registered via CLI
|
||||
When I run lsp CLI add with --config and -u short form
|
||||
Then the lsp CLI command should succeed
|
||||
And the lsp CLI output should contain "LSP Server Registered"
|
||||
|
||||
@lsp_cli_add
|
||||
Scenario: Add LSP server with --format json
|
||||
Given a valid LSP server YAML config file
|
||||
|
||||
@@ -218,6 +218,13 @@ def step_run_lsp_add_update(context: Context) -> None:
|
||||
)
|
||||
|
||||
|
||||
@when("I run lsp CLI add with --config and -u short form")
|
||||
def step_run_lsp_add_u_short(context: Context) -> None:
|
||||
context.lsp_cli_result = _runner.invoke(
|
||||
app, ["add", "--config", context.lsp_yaml_path, "-u"]
|
||||
)
|
||||
|
||||
|
||||
@when("I run lsp CLI add with --config and --format json")
|
||||
def step_run_lsp_add_json(context: Context) -> None:
|
||||
context.lsp_cli_result = _runner.invoke(
|
||||
|
||||
@@ -122,6 +122,7 @@ def add(
|
||||
bool,
|
||||
typer.Option(
|
||||
"--update",
|
||||
"-u",
|
||||
help="Allow overwriting an existing LSP server registration",
|
||||
),
|
||||
] = False,
|
||||
|
||||
Reference in New Issue
Block a user