Files
cleveragents-core/features/tui_input_modes.feature
T
HAL9000 b588de18d6 fix(tui): rebase onto master and add CHANGELOG entry for prompt symbol fix (#6431)
Rebases the TUI prompt symbol fix onto the latest master, resolving
conflicts with the TextArea→Input refactor and the dollar-prefix shell
mode addition. Adds the missing CHANGELOG.md entry for #6431 and
removes the now-obsolete tui_prompt_textarea feature/steps that tested
the old TextArea-based implementation.

ISSUES CLOSED: #6431
2026-05-08 11:15:36 +00:00

40 lines
1.6 KiB
Gherkin

Feature: TUI input modes
TUI prompt supports normal reference mode, slash command mode, and shell mode.
Scenario: Normal mode expands @ references
When I parse TUI references for "inspect @README.md"
Then the parsed line should include "@resource:README.md"
Scenario: Command mode dispatches slash command handler
When I route TUI input "/help"
Then the TUI mode should be "command"
And the TUI command result should be "ok:/help"
Scenario: Shell mode runs host command
When I route TUI input "!echo hello"
Then the TUI mode should be "shell"
And the TUI shell stdout should contain "hello"
Scenario: Shell mode blocks dangerous command by default
When I route TUI input "!rm -rf /"
Then the TUI mode should be "shell"
And the TUI shell stderr should contain "blocked dangerous shell command"
Scenario: Dangerous shell pattern detection helper
When I check shell danger detection for "rm -rf /tmp"
Then shell danger detection result should be "true"
When I check shell danger detection for "echo hello"
Then shell danger detection result should be "false"
Scenario: Reference catalog ignores .git and caches scans
Given a deterministic TUI reference fixture
When I parse and suggest TUI references using fixture
Then TUI walk count should be "1"
And TUI suggestions should not include ".git/secret.txt"
Scenario: TUI app fallback path reports missing textual dependency
When I check TUI app textual availability flag
Then TUI textual availability should be boolean
When I run fallback TUI app
Then fallback TUI app should fail with "Textual dependency missing."