summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/hooks/shellCommandProcessor.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/cli/src/ui/hooks/shellCommandProcessor.ts')
-rw-r--r--packages/cli/src/ui/hooks/shellCommandProcessor.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/cli/src/ui/hooks/shellCommandProcessor.ts b/packages/cli/src/ui/hooks/shellCommandProcessor.ts
index 300f21fe..d716183d 100644
--- a/packages/cli/src/ui/hooks/shellCommandProcessor.ts
+++ b/packages/cli/src/ui/hooks/shellCommandProcessor.ts
@@ -41,7 +41,12 @@ export const useShellCommandProcessor = (
return false;
}
// Remove symbol from rawQuery
- const trimmed = rawQuery.trim().slice(1);
+ const trimmed = rawQuery.trim().slice(1).trimStart();
+
+ // Stop if command is empty
+ if (!trimmed) {
+ return false;
+ }
// Add user message *before* execution starts
const userMessageTimestamp = Date.now();