新增清空聊天记录和退出登录功能

This commit is contained in:
RockYang
2023-04-19 19:06:26 +08:00
parent 3e088cb76f
commit c08cef0765
2 changed files with 120 additions and 27 deletions

View File

@@ -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);