memorax-ai/dsh-turn-fold

Codex-style completed-turn folding for DeepSeek Harness, powered by dsh-harmony.

Project Overview项目介绍

dsh-turn-fold is a native dsh-harmony provider built by memorax-ai specifically for the DeepSeek Harness WebUI, and it exists exclusively to add Codex Desktop-style turn folding to DSH conversations. It is installed by running dsh plugin --profile web add github:memorax-ai/dsh-turn-fold and then confirming each of the three source patches reports bound via dsh harmony status --profile web; the provider ships as a bundle-manifest and never modifies any installed DSH file on disk.

During an active turn the summary bar stays visible while native thinking, notes, commands, and tool calls keep streaming, and from the second item onward consecutive reasoning, context injections, and tool activity collapse into a single compact group. When the turn settles, known agent activity — including context injections — moves into one disclosure immediately before the final answer, with configurable metrics defaulting to wall time, tool-call count, and input/output tokens that render only when the loaded turn carries enough data. The final answer is located through the structural turn-tail.closing.finalNode reference rather than finish_reason or DOM position, and completed, stopped, and interrupted turns all collapse while keeping distinct status labels for the latter two.

Targets are pinned to DSH 0.1.0-rc.8 through 0.1.1-rc.2 (patching @deepseek-ai/dsh-client-ui-conversation) and to DSH 0.1.2-alpha.5 through the 0.1.6 line including prereleases (patching @deepseek-ai/dsh-client-ui-chat), so each selector must still match exactly once or the plugin fails closed without altering an uncertain compiled shape. The test suite runs with node test/run.cjs after npm install and covers completed, split-activity, post-closing, partial-history, failed, interrupted, open, accessibility, localization, settings, and state-retention cases against both supported shapes; release ships through GitHub Actions and npm Trusted Publishing via OIDC under an MIT license, and real-bundle compatibility is exercised by pointing DSH_TURN_FOLD_UPSTREAM_ROOT at an isolated DSH install before npm test.

dsh-turn-fold 是 memorax-ai 为 DSH(DeepSeek Harness)WebUI 打造的原生 Provider,隶属 dsh-harmony 生态,专为对话界面引入 Codex Desktop 风格的回合折叠体验。安装方式是在终端执行 dsh plugin --profile web add github:memorax-ai/dsh-turn-fold,再用 dsh harmony status --profile web 确认三条 Source Patch 全部 bound 即可生效,已安装的 DSH 源文件不会被改动。

在折叠回合中,顶部摘要栏始终保持可见,原生思考、注释、命令与工具调用继续流式输出;从第二条起相邻的推理、上下文注入和工具活动会合并进同一紧凑分组;回合收束后,代理活动(含上下文注入)统一折叠到最终回答前的一个 disclosure 中,可配置指标默认为耗时、工具调用数和输入/输出 Token。最终回答通过 turn-tail.closing.finalNode 定位,不依赖 finish_reason 或 DOM 位置。

依赖方面,插件针对 DSH 0.1.0-rc.8–0.1.1-rc.2 命中 @deepseek-ai/dsh-client-ui-conversation,对 0.1.2-alpha.5–0.1.6 转向 @deepseek-ai/dsh-client-ui-chat;任何选择器若不唯一匹配即失败关闭,绝不勉强改写。测试通过 node test/run.cjs 覆盖完整、拆分活动、回答后、失败、中断、未完成等回合,以及无障碍、本地化与状态记忆;license 为 MIT,发布走 GitHub Actions 加 npm Trusted Publishing(OIDC)。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 note1 项提示
  • 13 stars - an early-stage project星标 13,属于早期项目
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

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

CLI Install命令行安装

dsh plugin --profile web add github:memorax-ai/dsh-turn-fold

把 memorax-ai/dsh-turn-fold 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-turn-fold

English | 简体中文

Powered by Harmony

A dsh-harmony provider that adds Codex-Desktop-style turn folding to the DSH WebUI conversation.

https://github.com/user-attachments/assets/3c9dfdcf-a454-4750-9edf-76771ed5a9a6

During a turn, the summary bar remains visible while native thinking, notes, commands, and tool calls keep streaming. Consecutive reasoning, context injections, and tool activity share one compact group from the second item onward. When a turn settles, known Agent activity, including context injection, moves into one disclosure immediately before the final answer. Its configurable metrics default to wall time, tool-call count, and input/output tokens, and appear only when the loaded turn contains enough data to calculate them without guessing.

The final answer is located through turn-tail.closing.finalNode, not finish_reason or DOM position. Completed, stopped, and interrupted turns fold, with distinct status labels for the latter two. A turn remains expanded when DSH marks its closing branch unavailable, when any later node follows the closing answer, or while the user has keyboard focus or an active text selection inside its activity. Failed, max-token, closing-less, and open turns also stay expanded so errors and unfinished work are never hidden.

Expanding reuses the original native node renderers, so tool details, copy, and file links keep working. Open turns are remembered per session and turn while the WebUI remains loaded. The disclosure has keyboard-visible focus, accessible state and action labels, responsive wrapping, reduced-motion handling, and a short open/close transition that unmounts the activity after it closes.

How it works

Three shape-guarded Source Patches run in memory against the compiled browser bundle. For DSH 0.1.0-rc.8 through 0.1.1-rc.2, they target @deepseek-ai/dsh-client-ui-conversation; for DSH 0.1.2-alpha.5 through the 0.1.7 line (including prereleases), they follow the renderer into @deepseek-ai/dsh-client-ui-chat. Installed DSH files are never modified. Every selector must still match exactly once, so an incompatible compiled shape fails closed instead of modifying an uncertain target.

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-loop-guard 下一个 Next dsh-plugin-memory →