summaryrefslogtreecommitdiff
path: root/packages/cli/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/cli/src')
-rw-r--r--packages/cli/src/ui/components/InputPrompt.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/cli/src/ui/components/InputPrompt.tsx b/packages/cli/src/ui/components/InputPrompt.tsx
index 072fe074..79062853 100644
--- a/packages/cli/src/ui/components/InputPrompt.tsx
+++ b/packages/cli/src/ui/components/InputPrompt.tsx
@@ -60,6 +60,7 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
const base = query.substring(0, slashIndex + 1);
const newValue = base + selectedSuggestion.value;
onChangeAndMoveCursor(newValue);
+ onSubmit(newValue); // Execute the command
} else {
// Handle @ command completion
const atIndex = query.lastIndexOf('@');
@@ -85,7 +86,7 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
resetCompletion(); // Hide suggestions after selection
},
- [query, suggestions, resetCompletion, onChangeAndMoveCursor],
+ [query, suggestions, resetCompletion, onChangeAndMoveCursor, onSubmit],
);
const inputPreprocessor = useCallback(