diff --git a/features/lsp_cli_new_coverage.feature b/features/lsp_cli_new_coverage.feature index 82510b8d9..6e87465fa 100644 --- a/features/lsp_cli_new_coverage.feature +++ b/features/lsp_cli_new_coverage.feature @@ -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 diff --git a/features/steps/lsp_cli_new_coverage_steps.py b/features/steps/lsp_cli_new_coverage_steps.py index 5759ed989..a1f944498 100644 --- a/features/steps/lsp_cli_new_coverage_steps.py +++ b/features/steps/lsp_cli_new_coverage_steps.py @@ -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( diff --git a/src/cleveragents/cli/commands/lsp.py b/src/cleveragents/cli/commands/lsp.py index 221dc91fe..a620a0fca 100644 --- a/src/cleveragents/cli/commands/lsp.py +++ b/src/cleveragents/cli/commands/lsp.py @@ -122,6 +122,7 @@ def add( bool, typer.Option( "--update", + "-u", help="Allow overwriting an existing LSP server registration", ), ] = False,