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:
Archer
2024-09-23 10:17:49 +08:00
committed by shilin66
parent 3efecd7b7d
commit 07177272b2
38 changed files with 252 additions and 143 deletions

View File

@@ -195,7 +195,7 @@ const ChatContextProvider = ({
setHistories([]);
},
onFinally() {
onChangeChatId('');
onChangeChatId();
}
}
);

View File

@@ -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'

View File

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