mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-30 10:28:42 +00:00
4.8.11 perf (#2768)
* perf: watch local * perf: dataset list ui * perf: Check workflow invalid edges in saved * remove log * perf: Forbid touch scale * perf: rename dataset process * feat: support child app unstream mode * feat: Dispatch child app will record detail * feat: Save childApp run log * fix: share page init error * perf: chatId reset
This commit is contained in:
@@ -195,7 +195,7 @@ const ChatContextProvider = ({
|
||||
setHistories([]);
|
||||
},
|
||||
onFinally() {
|
||||
onChangeChatId('');
|
||||
onChangeChatId();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@@ -1,22 +1,22 @@
|
||||
import { create } from 'zustand';
|
||||
import { devtools, persist } from 'zustand/middleware';
|
||||
import { immer } from 'zustand/middleware/immer';
|
||||
import type { ChatHistoryItemType } from '@fastgpt/global/core/chat/type.d';
|
||||
import { customAlphabet } from 'nanoid';
|
||||
const nanoid = customAlphabet(
|
||||
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWSYZ1234567890_',
|
||||
24
|
||||
);
|
||||
|
||||
type State = {
|
||||
localUId: string;
|
||||
setLocalUId: (id: string) => void;
|
||||
};
|
||||
|
||||
export const useShareChatStore = create<State>()(
|
||||
devtools(
|
||||
persist(
|
||||
immer((set, get) => ({
|
||||
localUId: `shareChat-${Date.now()}-${nanoid()}`
|
||||
localUId: '',
|
||||
setLocalUId(id) {
|
||||
set((state) => {
|
||||
state.localUId = id;
|
||||
});
|
||||
}
|
||||
})),
|
||||
{
|
||||
name: 'shareChatStore'
|
||||
|
@@ -90,7 +90,7 @@ export const useUserStore = create<State>()(
|
||||
if (!useSystemStore.getState()?.feConfigs?.isPlus) return [];
|
||||
|
||||
const randomRefresh = Math.random() > 0.7;
|
||||
if (!randomRefresh && !init && get().teamMembers.length)
|
||||
if (!randomRefresh && !init && get().teamMembers?.length)
|
||||
return Promise.resolve(get().teamMembers);
|
||||
|
||||
const res = await getTeamMembers();
|
||||
|
Reference in New Issue
Block a user