存量前端:生图分组/灯箱/重生控件/导入文案/驳回横幅+SSE+总核销表
- ImageStrategyGroup/ImageLightbox/RegenControls/ImportTextModal/ RejectReasonBanner 新建组件 - tasks images/text/new + history + 配置/布局/SSE hooks 存量改动 - 总核销表进度更新 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -41,6 +41,7 @@ interface GenerationState {
|
||||
setTextProgress: (done: number, total: number) => void;
|
||||
addTextCandidate: (candidate: TextCandidate) => void;
|
||||
patchTextCandidateScore: (candidateId: number, score: TextCandidate['score']) => void;
|
||||
patchTextCandidateContent: (candidateId: number, content: string) => void;
|
||||
setImageProgress: (done: number, total: number) => void;
|
||||
addImageCandidate: (candidate: ImageCandidate) => void;
|
||||
markBatchFailed: (batch: string, reason: string, retryable: boolean) => void;
|
||||
@@ -86,6 +87,14 @@ export const useGenerationStore = create<GenerationState>((set) => ({
|
||||
}));
|
||||
},
|
||||
|
||||
patchTextCandidateContent(candidateId, content) {
|
||||
set((s) => ({
|
||||
textCandidates: s.textCandidates.map((tc) =>
|
||||
tc.candidate_id === candidateId ? { ...tc, content, edited: true } : tc
|
||||
),
|
||||
}));
|
||||
},
|
||||
|
||||
setImageProgress(done, total) {
|
||||
set({ imageDone: done, imageTotal: total });
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user