seaislee1209
11c1cdf8cc
fix(records): TeamAssetsPage 重新编辑 prompt 丢失 — VideoDetailModal fallback 补 editorHtml
根因(4 层叠加):
1. TeamAssetsPage 没传 onReEdit prop 给 VideoDetailModal → 走 modal 内部 fallback
2. fallback 只 setPrompt(task.prompt),没设 editorHtml
3. PromptInput 是 contenteditable,渲染依据是 editorHtml,不是 prompt
4. assetVideoToTask 把 editorHtml 显式置 '' → fallback 拿到的就是空串
修法:fallback 跟 store/generation.ts:reEdit 对齐,
用 useInputBarStore.setState 一次性批量灌入所有字段,
关键补 editorHtml: task.editorHtml || task.prompt || '',
让 PromptInput 渲染 + rebuildMentionSpans 走完整路径
(原文 + assetMentions 重建带缩略图的 @ 标签)。
附带顺手补:
- mode 用 switchMode 而不是 setMode(switchMode 会清 keyframe 状态)
- assetMentions: task.assetMentions || []
- references 用 setState 批量传(原代码用 setState 又用 setX 混用,不一致)
影响范围:
- 团管 /team/assets → 任意视频 → "重新编辑" → /app prompt 文本框有内容 ✓
- 超管 /admin/assets → 同上 ✓
- 用户 /user-assets → reEdit 走的是另一条路(generation.ts:reEdit),不受影响
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 18:24:28 +08:00
..
2026-03-16 05:49:21 +08:00
2026-05-12 18:24:28 +08:00
2026-05-12 16:31:02 +08:00
2026-03-13 10:24:31 +08:00
2026-04-04 13:14:20 +08:00
2026-05-11 11:10:35 +08:00
2026-04-04 19:16:38 +08:00
2026-03-18 12:02:54 +08:00
2026-03-16 02:08:50 +08:00
2026-04-04 19:38:36 +08:00
2026-03-13 15:38:08 +08:00
2026-03-13 09:59:33 +08:00
2026-03-13 09:59:33 +08:00
2026-03-22 21:58:52 +08:00