fix(forwarder): 修复会话标题生成与持久化 - #237
Open
MeetSpringAndAutumn wants to merge 2 commits into
Open
Conversation
接入会话标题生成与元数据更新处理。 避免模型直接回答用户问题,并保持标题持久化与对话历史隔离。
移除标题请求中不受部分模型支持的显式 disabled thinking 参数。 避免标题生成失败后退化为原始用户输入。
MeetSpringAndAutumn
force-pushed
the
fix/conversation-title
branch
from
July 31, 2026 14:09
32135bb to
ef060ea
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更说明 / What
修复本地模式会话标题从触发、模型请求、解析、持久化到 UI 更新的完整链路。
AiService/NameTab,使用独立、低 token、无工具且不继承主会话思考配置的模型请求生成短标题。thinking.type=disabled参数。AgentService/UpdateConversationMetadata,将标题和工作区路径幂等、原子写入state.json。context.json、会话 replay、checkpoint、主会话请求性能和 prefix cache 不变。问题原因 / Why
标题请求原先将首条用户消息作为普通对话输入,部分 Anthropic 兼容渠道会直接回答该问题;同时本地模式缺少标题和会话元数据的处理路由,生成结果无法稳定持久化。后续强制发送
thinking.type=disabled又会被 Claude Fable 5 拒绝,导致标题请求失败。关联 Issue / Related Issue
Fixes #223
Supersedes #236
测试方式 / How to Test
go build ./...请帮我分析项目启动速度很慢的原因->分析项目启动缓慢你能做什么->了解助手能力检查清单 / Checklist
gofmt和go vet/ Code passesgofmtandgo vet(gofmt已通过;go vet仍报告两处仓库既有 protobuf lock-copy 告警)