mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
prevent crash on empty shell cmd with $ or ! (#240)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user