diff --git a/web/src/utils/storage.js b/web/src/utils/storage.js index b8ede43d..41489721 100644 --- a/web/src/utils/storage.js +++ b/web/src/utils/storage.js @@ -53,6 +53,10 @@ export function appendChatHistory(chatId, message) { Storage.set(ChatHistoryKey, history); } +export function clearChatHistory() { + Storage.remove(ChatHistoryKey); +} + // 获取指定会话的历史记录 export function getChatHistory(chatId) { const history = Storage.get(ChatHistoryKey); diff --git a/web/src/views/ChatFree.vue b/web/src/views/ChatFree.vue index fcb69fdb..5879f3e9 100644 --- a/web/src/views/ChatFree.vue +++ b/web/src/views/ChatFree.vue @@ -1,13 +1,16 @@