mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-04 05:56:08 +00:00
perf: completion chatId
This commit is contained in:
@@ -65,12 +65,12 @@ export const useChatStore = create<State>()(
|
||||
},
|
||||
async delHistory(chatId) {
|
||||
set((state) => {
|
||||
state.history = state.history.filter((item) => item._id !== chatId);
|
||||
state.history = state.history.filter((item) => item.chatId !== chatId);
|
||||
});
|
||||
await delChatHistoryById(chatId);
|
||||
},
|
||||
updateHistory(history) {
|
||||
const index = get().history.findIndex((item) => item._id === history._id);
|
||||
const index = get().history.findIndex((item) => item.chatId === history.chatId);
|
||||
set((state) => {
|
||||
const newHistory = (() => {
|
||||
if (index > -1) {
|
||||
|
Reference in New Issue
Block a user