Repository navigation
功能提案:为 Web UI 增加「删除会话」(session.delete) #2772
War-God0108
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
功能提案:为 Web UI 增加「删除会话」(session.delete)
目前会话只能归档——归档会永久保留日志、工作区记账槽位与搜索索引行,用户无法彻底清除不需要的历史(如含机密或大型工具输出的转录)。侧边栏会话菜单止步于「归档会话」,宿主也没有任何删除 RPC。
实现内容(36 文件,+935/-43,含测试与文档)
session.delete全栈接线(命名遵循workspace.delete先例及 domain KV storage note 预留的端点名,该 note 原将会话删除列为 future work)createApiRemoteAgentResolver返回{ agentFor, disposeAgent }并跟踪铸造的 resume handle,使宿主能精确拆除代理agent-busy围栏 → flush 屏障(防止 write-behind 在 unlink 后复活工件)→ 拆除实时 agent → 工作区解绑 → unlink 持久化工件(sessionPersistence.locate)→ 冷删除经 host 流广播host/session-removedSessionManager.deleteSession(本地列表移除 + 当前会话被删时选择迁移 + 重拉基线)、SessionRuntime.delete暴露于ISessionsapi-proxy-delete.spec.ts(冷/热会话、工作区解绑、未知会话、子代理围栏、销毁失败、ENOENT、ENOTEMPTY 等 8 场景)+ resolver/runtime/rows/workspace-browser 扩展.agents/notes/implemented/feature/2026-08-17-session-delete.md(英中配对已记录)验证
tsc -b tsconfig.host.json/tsconfig.client.json全量通过(pre-push 钩子 typecheck 亦绿)提交方式
仓库关闭了社区 PR/Issue,故以此帖 + 补丁形式提交:
git am即可应用):https://github.com/War-God0108/deepseek-harness/blob/feat/session-delete/../ (可联系我获取 .patch 文件)如果维护者或社区希望调整实现(命名、范围、
SessionPersistence.delete后端原语等),我可以随时跟进修改。谢谢!All reactions