mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
Have /clear clear <Static> content by remounting (#250)
This commit is contained in:
@@ -28,6 +28,7 @@ const addHistoryItem = (
|
||||
|
||||
export const useSlashCommandProcessor = (
|
||||
setHistory: React.Dispatch<React.SetStateAction<HistoryItem[]>>,
|
||||
refreshStatic: () => void,
|
||||
setDebugMessage: React.Dispatch<React.SetStateAction<string>>,
|
||||
getNextMessageId: (baseTimestamp: number) => number,
|
||||
openThemeDialog: () => void,
|
||||
@@ -55,6 +56,7 @@ export const useSlashCommandProcessor = (
|
||||
// This just clears the *UI* history, not the model history.
|
||||
setDebugMessage('Clearing terminal.');
|
||||
setHistory((_) => []);
|
||||
refreshStatic();
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -48,6 +48,7 @@ const addHistoryItem = (
|
||||
// Hook now accepts apiKey and model
|
||||
export const useGeminiStream = (
|
||||
setHistory: React.Dispatch<React.SetStateAction<HistoryItem[]>>,
|
||||
refreshStatic: () => void,
|
||||
config: Config,
|
||||
openThemeDialog: () => void,
|
||||
) => {
|
||||
@@ -73,6 +74,7 @@ export const useGeminiStream = (
|
||||
// Instantiate command processors
|
||||
const { handleSlashCommand, slashCommands } = useSlashCommandProcessor(
|
||||
setHistory,
|
||||
refreshStatic,
|
||||
setDebugMessage,
|
||||
getNextMessageId,
|
||||
openThemeDialog,
|
||||
|
||||
Reference in New Issue
Block a user