Repository navigation
DSH | dsh-fork-relink | fork 后子 agent 记录自动跟随新会话 #6150
Enosensu
started this conversation in
Show Your Plugins!
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.
项目地址 / Project URL:
https://github.com/Enosensu/dsh-fork-relink
项目介绍 / Introduction:
官方 fork(会话列表的分支按钮)用新会话 id 承接被继承的历史,而子 agent 会话按头部的
parentSession挂在父会话下——fork 之后子 agent 记录留在旧会话上,新对话的子 agent 面板为空。本插件监听官方
session/created事件,自动把旧会话的直接子 agent(origin === 'subagent'的冷会话)的头帧parentSession重链到 fork 子会话:整棵子 agent 树统一跟随(含子 agent 的子 agent),并按 fork 子会话 seed 的引用过滤(被裁掉尾部的子 agent 不跟随)。只重写头帧,其余帧字节原样;每次重链前备份到 $DSH_HOME/trash。与 DSH 的集成方式 / How it integrates with DSH:
ctx.on('session/created')事件监听,零 UI、零路由、零依赖;dsh plugin add即装,官方原生实现 children relink 后可直接卸载、无残留。截图 / Screenshots:
本插件为纯后台伴随进程,无任何界面;以下为 fork 发生时的运行日志(dsh-fork-relink.log),替代截图展示实际工作:
{"t":"(首次 fork 后这里会出现 relink 记录)"}收录状态: awesome-dsh-plugin 收录 PR 见 #4789;fork 子 agent 跟随的官方原生实现提案见 Discussions #6149。
All reactions