修复 文件无法上传的问题;

修复 生成结果无法预览的问题;
This commit is contained in:
2025-09-19 02:04:42 +08:00
parent 9674740c0d
commit 29a326ac7d
7 changed files with 720 additions and 122 deletions

View File

@@ -215,7 +215,8 @@ export const useAppStore = create<AppState>()(
// 从存储中获取Blob
getBlob: (url: string) => {
return get().blobStore.get(url);
const state = get();
return state.blobStore.get(url);
},
addGeneration: (generation) => {
@@ -617,8 +618,6 @@ export const useAppStore = create<AppState>()(
const state = get();
const now = Date.now();
// 这里我们简单地清理所有Blob因为在实际应用中很难跟踪哪些Blob正在使用
// 在生产环境中,您可能需要更复杂的跟踪机制
state.blobStore.forEach((blob, url) => {
// 检查URL是否仍在使用中
const isUsedInProject = state.currentProject && (