RyensX/dsh-message-fold 预览 preview

RyensX/dsh-message-fold

插件Plugin 原生Native ⭐ 3 AGPL-3.0 其他Other

为 DeepSeek Harness 提供 Codex 风格的会话消息折叠。/ Provides Codex-style session message folding for DeepSeek Harness.

项目介绍Project Overview

dsh-message-fold 是为 DeepSeek Harness 提供 Codex 风格会话消息折叠的插件。它会自动合并连续两个及以上工具调用,并在最终回复后折叠中间过程,显示“耗时 x秒”,均可展开查看。适用于希望减少工具调用与中间步骤视觉干扰的场景。插件仅改变展示,不修改数据;当前锁定 DSH 0.1.0-rc.8、Cordis 4.0.1 和 React 18,折叠状态仅保存在页面内存。

dsh-message-fold is a DSH plugin that adds Codex-style folding to chat messages. It automatically merges two or more consecutive tool calls and folds intermediate steps after the final reply, showing “x seconds” with expandable details. Use it to reduce visual noise from tool calls and process messages. It changes presentation only, not data. Compatibility is currently locked to DSH 0.1.0-rc.8, Cordis 4.0.1, and React 18; fold state stays in page memory.

或使用命令行安装(适合开发者)Or use CLI install (for developers)

命令行安装CLI Install

dsh plugin --profile web add github:RyensX/dsh-message-fold

RyensX/dsh-message-fold 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-message-fold

中文 | English

为 DeepSeek Harness 提供 Codex 风格的会话消息折叠。

插件只改变展示效果,不修改任何数据。

效果

  • 连续2个及以上工具调用自动合并,可展开
  • 最终回复后,中间过程都会被自动折叠,展示为"耗时 x秒",可展开

折叠例子

安装

Github安装:

dsh plugin --profile web add github:RyensX/dsh-message-fold

源码安装:

pnpm install
pnpm build
dsh plugin --profile web add .

卸载:

dsh plugin --profile web remove dsh-message-fold

兼容边界

当前版本锁定 DSH 0.1.0-rc.8、Cordis 4.0.1 和 React 18。DSH 暂无正式的 renderer decorator API,因此唯一的临时兼容点集中在 src/client/adapter/dsh-slot-renderer-decorator.ts:业务组件只依赖 RendererDecoratorPort,将来可直接替换适配器。

适配器采用可撤销 lease,并在不兼容时整体 fail-open。外部装饰器后来包在本插件外层时,插件卸载不会覆盖它;内部 wrapper 会立即退化为原 renderer 的透明透传。

折叠选择只保存在插件的页面内存中,不写入 localStorage。会话删除及插件卸载都会清理对应状态。

开发验证

pnpm verify
npm pack --dry-run

verify 会依次执行类型检查、单元与 React 测试、Node/Web 双入口构建,以及 lazy-CJS handoff 检查。

友链

LinuxDo

上一个 Prev dsh-aseprite 下一个 Next dsh-client-ui-pet