Skip to content

Commit 571e0fe

Browse files
committed
refactor(cli): simplify bash command execution API
- Merge executeBashCommand and runBashCommand into single function - Get store functions internally instead of passing as options - Add /bash <command> inline execution support in command registry
1 parent 3aaaa60 commit 571e0fe

File tree

4 files changed

+486
-53
lines changed

4 files changed

+486
-53
lines changed

cli/src/__tests__/bash-mode.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@ import type { InputMode } from '../utils/input-modes'
66
* Tests for bash mode functionality in the CLI.
77
*
88
* Bash mode is entered when user types '!' and allows running terminal commands.
9-
* The '!' is displayed in a red column but not stored in the input value.
9+
* The '!' is displayed in a green column but not stored in the input value.
1010
*
1111
* Key behaviors:
1212
* 1. Typing '!' enters bash mode and clears input to ''
1313
* 2. In bash mode, input is stored WITHOUT '!' prefix
1414
* 3. Backspace at cursor position 0 exits bash mode (even with input)
1515
* 4. Submission prepends '!' to the command
16+
*
17+
* Note: Tests for runBashCommand and /bash slash command are in
18+
* cli/src/commands/__tests__/bash-command.test.ts
1619
*/
1720

1821
describe('bash-mode', () => {

0 commit comments

Comments
 (0)