feat: 增加账单

This commit is contained in:
archer
2023-03-21 14:01:35 +08:00
parent dc467c26b5
commit 42c26bd155
15 changed files with 211 additions and 64 deletions

View File

@@ -19,6 +19,7 @@ export const useChatStore = create<Props>()(
chatHistory: [],
pushChatHistory(item: HistoryItem) {
set((state) => {
if (state.chatHistory.find((history) => history.chatId === item.chatId)) return;
state.chatHistory = [item, ...state.chatHistory].slice(0, 20);
});
},