diff --git a/features/steps/tdd_tui_suggestions_query_extraction_4741_steps.py b/features/steps/tdd_tui_suggestions_query_extraction_4741_steps.py index da21b648a..29246ba71 100644 --- a/features/steps/tdd_tui_suggestions_query_extraction_4741_steps.py +++ b/features/steps/tdd_tui_suggestions_query_extraction_4741_steps.py @@ -267,3 +267,13 @@ def step_assert_suggestions_query_4741( f" Got: '{actual}'\n" f" (The buggy value would have been: '{wrong}')" ) + + +@then("suggestions was not called for issue 4741") +def step_assert_suggestions_not_called_4741(context: object) -> None: + """Assert that suggestions() was not called (no @token in prompt).""" + actual = context._tui4741_captured_query + assert actual is None, ( + f"suggestions() was unexpectedly called with query: '{actual}'. " + f"Expected it not to be called when no @token is present in the prompt." + ) diff --git a/features/tdd_tui_suggestions_query_extraction_4741.feature b/features/tdd_tui_suggestions_query_extraction_4741.feature index b1dd6d852..9d6c6893a 100644 --- a/features/tdd_tui_suggestions_query_extraction_4741.feature +++ b/features/tdd_tui_suggestions_query_extraction_4741.feature @@ -40,3 +40,11 @@ Feature: TDD: suggestions() query extraction in on_input_submitted uses correct And I call on_mount on the app for issue 4741 And I submit "@actor:local/dev" to the app for issue 4741 and capture the suggestions query Then the suggestions query should be "actor:local/dev" not "@actor:local/dev" + + @tdd_issue @tdd_issue_4741 + Scenario: Prompt with no @token does not call suggestions + Given a mock command router and persona state for issue 4741 + When I instantiate the TUI app for issue 4741 + And I call on_mount on the app for issue 4741 + And I submit "analyse the codebase" to the app for issue 4741 and capture the suggestions query + Then suggestions was not called for issue 4741