mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-04 05:56:08 +00:00
feat: app detail
This commit is contained in:
@@ -15,8 +15,8 @@ type State = {
|
||||
setChatData: (e: InitChatResponse | ((e: InitChatResponse) => InitChatResponse)) => void;
|
||||
lastChatAppId: string;
|
||||
setLastChatAppId: (id: string) => void;
|
||||
lastChatId: string;
|
||||
setLastChatId: (id: string) => void;
|
||||
lastHistoryId: string;
|
||||
setLastHistoryId: (id: string) => void;
|
||||
};
|
||||
|
||||
const defaultChatData: InitChatResponse = {
|
||||
@@ -43,10 +43,10 @@ export const useChatStore = create<State>()(
|
||||
state.lastChatAppId = id;
|
||||
});
|
||||
},
|
||||
lastChatId: '',
|
||||
setLastChatId(id: string) {
|
||||
lastHistoryId: '',
|
||||
setLastHistoryId(id: string) {
|
||||
set((state) => {
|
||||
state.lastChatId = id;
|
||||
state.lastHistoryId = id;
|
||||
});
|
||||
},
|
||||
history: [],
|
||||
@@ -95,7 +95,7 @@ export const useChatStore = create<State>()(
|
||||
name: 'chatStore',
|
||||
partialize: (state) => ({
|
||||
lastChatAppId: state.lastChatAppId,
|
||||
lastChatId: state.lastChatId
|
||||
lastHistoryId: state.lastHistoryId
|
||||
})
|
||||
}
|
||||
)
|
||||
|
@@ -17,9 +17,6 @@ type State = {
|
||||
initUserInfo: () => Promise<UserType>;
|
||||
setUserInfo: (user: UserType | null) => void;
|
||||
updateUserInfo: (user: UserUpdateParams) => void;
|
||||
// model
|
||||
lastModelId: string;
|
||||
setLastModelId: (id: string) => void;
|
||||
myApps: AppListItemType[];
|
||||
myCollectionApps: AppListItemType[];
|
||||
loadMyModels: () => Promise<null>;
|
||||
@@ -63,12 +60,6 @@ export const useUserStore = create<State>()(
|
||||
};
|
||||
});
|
||||
},
|
||||
lastModelId: '',
|
||||
setLastModelId(id: string) {
|
||||
set((state) => {
|
||||
state.lastModelId = id;
|
||||
});
|
||||
},
|
||||
myApps: [],
|
||||
myCollectionApps: [],
|
||||
async loadMyModels() {
|
||||
@@ -119,7 +110,6 @@ export const useUserStore = create<State>()(
|
||||
{
|
||||
name: 'userStore',
|
||||
partialize: (state) => ({
|
||||
lastModelId: state.lastModelId,
|
||||
lastKbId: state.lastKbId
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user