ai对话缓存

This commit is contained in:
sjy
2026-06-30 13:58:48 +08:00
parent 84559eaded
commit 240107ca34
6 changed files with 34 additions and 25 deletions
+5
View File
@@ -31,6 +31,7 @@ interface AppState {
durations: number[];
};
enginesele: any;
inputValue: string;
fetchProjects: () => Promise<void>;
createProject: (name: string, industry: Industry) => Promise<Project>;
@@ -56,6 +57,7 @@ interface AppState {
setVideoAspectRatio: (aspectRatio: string) => void;
setVideoResolution: (resolution: string) => void;
setEnginesele: (enginesele: any) => void;
setInputValue: (inputValue: string) => void;
resetGenerationConfig: () => void;
}
@@ -80,6 +82,7 @@ export const useAppStore = create<AppState>((set, get) => ({
durations: [5, 8, 10, 12, 15],
},
enginesele: [],
inputValue: '',
fetchProjects: async () => {
set({ loading: true });
@@ -168,6 +171,7 @@ export const useAppStore = create<AppState>((set, get) => ({
setVideoAspectRatio: (aspectRatio) => set({ videoAspectRatio: aspectRatio }),
setVideoResolution: (resolution) => set({ videoResolution: resolution }),
setEnginesele: (enginesele) => set({ enginesele }),
setInputValue: (inputValue) => set({ inputValue }),
resetGenerationConfig: () => set({
mediaType: 'image',
countType: '请选择',
@@ -184,5 +188,6 @@ export const useAppStore = create<AppState>((set, get) => ({
durations: [5, 8, 10, 12, 15],
},
enginesele: [],
inputValue: '',
}),
}));