Have /clear clear <Static> content by remounting (#250)

This commit is contained in:
Seth Troisi
2025-05-05 17:52:29 +00:00
committed by GitHub
parent 74f8f5eaa9
commit a0bed3e716
3 changed files with 15 additions and 3 deletions

View File

@@ -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();
},
},
{