Repository navigation
feat: 双能力自动标题(任务名 + 对话标题) - #58
Merged
Merged
Conversation
added 2 commits
October 27, 2026 12:33
新增 task_auto_title_enabled / chat_auto_title_enabled(默认关)、 共享 GenerateAutoTitle、spawn_task 同步写 name、对话首条先截断再异步 AI, 设置页「自动标题」双 Switch。closes #55
spawn_task 标题 20s 超时且父 ctx 取消不建任务;清洗循环剥前缀内外引号; 异步标题拒绝「新对话」并用条件更新防手改竞态;会话 profile 失败回退全局。
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.
Summary
closes #55
在设置中新增两个独立、默认关闭的开关,用共享短补全生成标题:
task_auto_title_enabled:Agentspawn_task创建任务时同步 AI 写tasks.name(不改 description/goal;MVP 不对 HTTP 建任务)。失败或无可用模型时 Name 留空,列表仍「未命名」。父 context 取消时不建任务;标题生成有 20s 超时。chat_auto_title_enabled:Conversation 首条在占位「新对话」时,先firstLine/「附件消息」立刻写入,再异步 AI 覆盖。手改不覆盖(条件更新);生成结果为空或「新对话」时拒绝回写。设置页一张「自动标题」卡、两个 Switch。共享
agent.GenerateAutoTitle(Thinking: disabled,清洗循环,硬上限 40 rune)。测试
go test ./agent -run TestGenerateAutoTitlego test ./server -run 'TestAutoTitle|TestIntelligenceHTTPSettingsAndScope'./build.sh通过UI checklist(请人工点验)