mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-03 21:48:02 +00:00
ts
This commit is contained in:
@@ -22,6 +22,7 @@ type State = {
|
||||
loadMyModels: () => Promise<null>;
|
||||
appDetail: AppSchema;
|
||||
loadAppDetail: (id: string, init?: boolean) => Promise<AppSchema>;
|
||||
clearAppModules(): void;
|
||||
// kb
|
||||
myKbList: KbListItemType[];
|
||||
loadKbList: () => Promise<any>;
|
||||
@@ -78,6 +79,14 @@ export const useUserStore = create<State>()(
|
||||
});
|
||||
return res;
|
||||
},
|
||||
clearAppModules() {
|
||||
set((state) => {
|
||||
state.appDetail = {
|
||||
...state.appDetail,
|
||||
modules: []
|
||||
};
|
||||
});
|
||||
},
|
||||
myKbList: [],
|
||||
async loadKbList() {
|
||||
const res = await getKbList();
|
||||
|
Reference in New Issue
Block a user