mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 08:47:44 +00:00
fix: Ensure user written ! is treated opaquely if not in shell mode\n\n- Addresses an issue where commands prefixed with ! (e.g., !ls) were incorrectly handled by the shell command processor if the ! was added after initially typing the command.\n- Ensures that such commands are correctly forwarded to the Gemini model.\n- Updates useGeminiStream to be aware of shell mode to properly manage streaming state.\n\nFixes https://buganizer.corp.google.com/issues/418761305
This commit is contained in:
committed by
N. Taylor Mullen
parent
a756489f86
commit
323b1298f9
@@ -145,6 +145,7 @@ export const App = ({
|
||||
config,
|
||||
setDebugMessage,
|
||||
handleSlashCommand,
|
||||
shellModeActive,
|
||||
);
|
||||
const { elapsedTime, currentLoadingPhrase } =
|
||||
useLoadingIndicator(streamingState);
|
||||
@@ -154,16 +155,10 @@ export const App = ({
|
||||
(submittedValue: string) => {
|
||||
const trimmedValue = submittedValue.trim();
|
||||
if (trimmedValue.length > 0) {
|
||||
if (shellModeActive && !trimmedValue.startsWith('!')) {
|
||||
// TODO: Don't prefix (hack) and properly submit pass throughs to a dedicated hook:
|
||||
// https://b.corp.google.com/issues/418509745
|
||||
submitQuery(`!${trimmedValue}`);
|
||||
} else {
|
||||
submitQuery(trimmedValue);
|
||||
}
|
||||
submitQuery(trimmedValue);
|
||||
}
|
||||
},
|
||||
[submitQuery, shellModeActive],
|
||||
[submitQuery],
|
||||
);
|
||||
|
||||
const userMessages = useMemo(
|
||||
|
||||
Reference in New Issue
Block a user