Skip to content

fix(studio): preserve chat history on follow-up sends#721

Merged
yaozheng-fang merged 1 commit into
volcengine:mainfrom
FirstayZheng:fix/studio-chat-history-preserve
Jul 23, 2026
Merged

fix(studio): preserve chat history on follow-up sends#721
yaozheng-fang merged 1 commit into
volcengine:mainfrom
FirstayZheng:fix/studio-chat-history-preserve

Conversation

@FirstayZheng

@FirstayZheng FirstayZheng commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

背景

Studio 多轮对话中,已有会话发送新 query 后,前面的历史对话会从前端 transcript 中消失。

bug来源于feat(studio): improve runtime management and chat startup (#707)。这个提交为了让新会话第一条消息在后端 session 创建完成前就先显示出来,它把原来的“追加一轮对话”改成了“用本轮 optimisticTurns 覆盖当前 session 的 turns”

修改

  • 修复已有会话发送消息时覆盖 turnsBySession[sid] 的问题,改为追加本轮 optimistic turns
  • 保留新会话首条消息在 session 创建完成前即时展示的体验
  • 增加回归测试,防止后续消息再次覆盖当前会话历史
  • 更新 Web UI 构建产物

验证

  • uv run pre-commit run --all-files
  • npm test
  • npm run build

@yaozheng-fang
yaozheng-fang merged commit ac33649 into volcengine:main Jul 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants