fix(web): persist thinking, title sessions distinctly, and send follow-ups from the answer
Thinking disappeared on failure and never reached session storage. Keep the sanitized chain on disk and on errors, and regroup the sidebar around reports, charts, favorites, and dated history titles. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+17
-1
@@ -5236,10 +5236,26 @@
|
||||
- 用户现象:生时纠正已有灰色「思考过程」、正文出来后折叠;普通咨询仍无思维链。
|
||||
- 触发条件:网页个人咨询 / 无分钟百科 / 声明窗口咨询。
|
||||
- 根因:BUG-305 / BUG-340 为保住可见 token 预算,把咨询 `consultationGenerationSettings` 固定为 thinking disabled,并丢弃 `reasoning-*`。BUG-345 只给纠正打开独立 `thinking.delta` 与折叠 UI。
|
||||
- 修复:咨询同样启用 provider thinking,8192 可见预算不变。`reasoning-delta` 经中文清洗后发 `thinking.delta`;契约未绿的 `text-delta` 仍按 BUG-277 丢弃,不升格为思维链。咨询页把 `thinkingText` 接到共用 `ChatMessageRow`,有正文后默认折叠。会话落盘不保存思维链。
|
||||
- 修复:咨询同样启用 provider thinking,8192 可见预算不变。`reasoning-delta` 经中文清洗后发 `thinking.delta`;契约未绿的 `text-delta` 仍按 BUG-277 丢弃,不升格为思维链。咨询页把 `thinkingText` 接到共用 `ChatMessageRow`,有正文后默认折叠。后续 BUG-347 把思维链写入会话落盘,并在失败时保留已展示的思考过程。
|
||||
- 验证:`frontend/tests/consultation-agentic-runtime.test.ts` 中文 reasoning 进 thinking 通道、英文过程自述不进正文;`consultation-workflow-contract.test.ts` 锁定 `thinking: "enabled"`;`chat-stream-layout.test.ts` 锁定咨询页与折叠 UI。
|
||||
- 防复发:咨询与纠正的思维链必须是 `thinking.delta`,不得混进 `answer.delta`。BUG-277 的契约前正文仍须丢弃。打开 thinking 不得降低 8192 可见预算,`finish_reason=length` 仍不得当完成。
|
||||
- 相关记录:BUG-277、BUG-305、BUG-340、BUG-345
|
||||
- 复发自:BUG-305(咨询关 thinking 保预算)、BUG-345(只修了纠正)
|
||||
- 修复版本:4e247c11
|
||||
|
||||
## BUG-347 | 咨询失败或刷新后思维链被清掉
|
||||
|
||||
- 状态:resolved
|
||||
- 首次发现:2026-08-22
|
||||
- 最近更新:2026-08-22
|
||||
- 影响面:咨询流式 UI、`complete_consultation_response` 落盘、`chatSessionWriteSchema`、会话读取
|
||||
- 用户现象:开始出回答时思维链消失;若随后报「Agent 回答未完成」或刷新,已展示的思考过程一起没了。
|
||||
- 触发条件:普通咨询流式生成中出现 `run.failed`、空正文,或成功后刷新页面。
|
||||
- 根因:思维链只活在 `streamingReply.thinkingText`。失败路径回滚到提问前的会话并清掉 streaming;成功路径虽然把 thinking 写进内存消息,但结算 RPC 与会话 PATCH 都不保存该字段,读取时也会丢掉额外消息字段。
|
||||
- 修复:失败时保留用户问题、已有思考过程和失败说明,不再把思维链卸掉。成功结算把清洗后的 `thinkingText` 写入 `p_response_message`;客户端会话读写契约同步接收该字段。界面改成时间线思考块,完成步骤一行一项。
|
||||
- 验证:`frontend/tests/chat-session-write.test.ts` 接受 thinkingText;`consultation-stream-recovery.test.ts` 锁定结算消息含思维链;`chat-stream-layout.test.ts` 锁定时间线 UI;失败路径保留 `thinkingText` 的源码合同。
|
||||
- 防复发:咨询结算消息与会话 PATCH 必须能保存 `thinkingText`。失败不得用回滚抹掉已展示的思考过程。读取会话时不得只保留 `role/text`。
|
||||
- 相关记录:BUG-277、BUG-346
|
||||
- 复发自:BUG-346(打开思维链通道但明确不落盘)
|
||||
- 修复版本:pending
|
||||
|
||||
|
||||
Reference in New Issue
Block a user