fix(rectification): persist the collect stem on the same assistant turn
The live question slot disappeared on refresh because it was never written to assistant_message. Attach the current collect_spoken prompt to that turn before finalize so chat history keeps it. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7488,3 +7488,19 @@
|
||||
- 相关记录:BUG-352、BUG-451、BUG-467
|
||||
- 复发自:无
|
||||
- 修复版本:待发布
|
||||
|
||||
## BUG-487 | 口述采集题干在动作图标下方,刷新后聊天历史丢失
|
||||
|
||||
- 状态:resolved
|
||||
- 首次发现:2026-09-02
|
||||
- 最近更新:2026-09-02
|
||||
- 影响面:POST `/api/rectification/agent` opening/evidence、`finalize_agentic_rectification_turn`、重生成、`.rectification-question-slot__prompt`
|
||||
- 用户现象:开场助手气泡只打招呼,采集题干出现在点赞/复制/重生成图标下面的问题槽。刷新页面后气泡里没有那句题干,因为它从未写入 `assistant_message`。
|
||||
- 触发条件:新 Case `action=opening` 且 `current_question.kind=collect_spoken`;或同一采集题仍有效时刷新/重进会话。
|
||||
- 根因:BUG-471 / BUG-485 把口述题干真源放在 GET `current_question.prompt` 的直播槽。槽位不是 turn 历史。`shouldPersistFocusPromptTurn` 在已有非空正文时禁止第二条助手消息,所以刷新只能看到打招呼。
|
||||
- 修复:`composeCollectSpokenAssistantText` 按题干字符串精确身份接到同一条正文末尾。opening/evidence 在 `finalizeTurn` 之前 idle-persist 当前题、用 `answer.delta replace` 替换直播正文,并把组合文本写入 `p_assistant_message`。重生成同样回贴当前 `collect_spoken` 题干。前端仅在最新助手正文尚未带上该精确题干时才渲染采集槽;选择卡仍走问题槽。不 bump Skill 10.0.14,不放宽确认门,不用正文字符串判断「有没有问过」。
|
||||
- 验证:`rectification-collect-prompt`;`rectification-spoken-collect` 锁槽位兜底与 `composeCollectSpokenAssistantText`;`rectification-v9-agent` 锁 finalize 前写入组合正文;`rectification-v9-regenerate` 锁重生成回贴;`agent-voice-copy-contract` 锁服务器接题干并写入聊天历史。
|
||||
- 防复发:口述采集题干必须出现在同一条已完成助手消息里,刷新后仍在 `turns[].text`。不得只靠问题槽直播。不得再追加第二条 opening 题干消息。不得用 `includes` / 正则扫描正文决定是否已提问。
|
||||
- 相关记录:BUG-449、BUG-461、BUG-469、BUG-471、BUG-485
|
||||
- 复发自:BUG-485(槽位可见但不是聊天历史)
|
||||
- 修复版本:待发布
|
||||
|
||||
Reference in New Issue
Block a user