fix(subagents): 子会话始终跟随主会话,去掉单独归档 / 删除 - #100
Merged
Merged
Conversation
用户决策:子会话(星型后台任务、网状 agent)没有自己的生命周期,不能单独归档或 删除,只在主会话归档后被永久删除时一起删除,否则事后分析缺上下文。 - 后台任务面板去掉「归档」按钮,TUI 去掉 /tasks clear;已结束的子任务一直留在 面板 / 列表里。 - ?parent= 列表与 TUI /tasks 列表不看归档标记(上一版留下的标记不再让子会话消失)。 - 归档路由与线程工具 set_thread_archived 拒绝归档子会话(取消归档仍允许); ?purge=1 两条路由与线程工具 delete_thread 拒绝单独删除子会话(含子会话删自己); 两条 purge 路由统一为只收已归档主会话。 - 新增 domain/session/session_tree_purge:子会话在前、主会话最后的删除顺序,Web 永久 删除、TUI 设置中心(此前只删主会话、也不清搜索索引)与 delete_thread 共用。 - 删除网状 agent 恢复时取消归档的逻辑与对应用例;文档同步。
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.
背景
上一版(#99)把后台任务面板的「清除」改成了「归档」。用户决定:子会话(星型后台任务、网状 agent)没有自己的生命周期,不能单独归档或删除,始终跟随主会话;只在主会话归档后被永久删除时一起删除,否则事后分析缺上下文。
改动
/tasks clear;已结束的子任务一直留在面板 / 列表里。?parent=与 TUI/tasks列出主会话的全部子会话,上一版留下的归档标记不再让子会话消失。set_thread_archived拒绝归档子会话,取消归档仍允许。?purge=1两条路由、线程工具delete_thread拒绝单独删除子会话,包括子会话删自己。domain/session/session_tree_purge:子会话在前、主会话最后。Web 永久删除、TUI 设置中心、delete_thread共用。TUI 设置中心此前只删主会话、也不清搜索索引,这次一并修好。验证
SessionTreePurge.*(2 条)ThreadTools.SubagentThreadsCannotBeDeletedOrArchivedSeparatelyWebServerHttp.PurgeRejectsSubagentAndUnarchivedMainSessionWebServerHttp.PurgingArchivedMainSessionCascadesToItsSubagentsWebServerHttp.CompatibilityPurgeAcceptsArchivedMainSessionSubagentHost.ListShowsRunningAndEverySettledTasksubagentPanelSplitArchitecture.test.jsrun_fast_tests.py --profile fast执行 4941 个,0 失败;pnpm test全过,pnpm build成功;分层与所有权闸门通过。builtin_commands.cpp行数超 R12 基线(master 上原本 2077 > 2060),本 PR 去掉/tasks clear后降到 2069,仍未达标。