返回插件市场

dsh-turn-fold

界面与体验

CH4ACKO3/dsh-turn-fold

为 DeepSeek Harness 提供 Codex 风格的已完成回合折叠功能,由 dsh-harmony 驱动。

  • chat-ui
  • conversation
  • deepseek-harness
  • dsh
  • dsh-harmony
  • dsh-plugin
  • folding
GitHub Stars
11GitHub
浏览量
0DSH Plugin Hub
Forks
2GitHub
开放问题
1GitHub Issues
Manifest 版本
0.6.0@ch4acko3/dsh-turn-fold
最近推送
2026年9月2日GitHub
许可证
MITJavaScript
插件类型
Host运行于 DSH Host

验证与兼容性

这里展示目录实际采集到的证据;未声明的信息会明确标为未知。

运行时已验证
01精确来源: github · @ch4acko3/dsh-turn-fold@0.6.002验证时间: 2026年9月3日03验证版本: 0.1.0-rc.7
当前版本兼容性
已在当前目录版本验证
声明的 Harness 范围
未声明
声明的平台
未声明
适用 Profile
web
构建授权
未检测到需要
权限声明
未声明
外部服务
未声明
遥测声明
未知
未发现已知风险标记

这不是安全背书;安装前仍应查看源码、权限和配置。

查看证据与判定范围

验证仅覆盖标出的来源、版本和 Harness 环境,不代表未来版本仍然兼容。

  • github:CH4ACKO3/dsh-turn-fold#69867494627d58da4d17f5842bda7d1c36fa34d2
  • 插件已在隔离环境完成加载检查。

README

查看源文件

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.2 line, 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.

PatchSelector (expect 1)Effect
inject-turn-fold-runtimeFunctionDeclaration[name.name="ChatView"], VariableStatement:has(VariableDeclaration[name.name="ChatView"])Injects the fold renderer + disclosure UI into either native or decorated ChatView
rewrite-node-render-looplegacy order.map(...) / 0.1.2 ChatNodeList callReplaces the version-specific native node-list seam with the per-turn renderer
install-turn-fold-servicesVariableStatement:has(VariableDeclaration[name.name="t"][initializer.expression.name.name="bind"])Registers the bundled English and Chinese dictionaries through DSH's native locale service and binds the native settings scope

Install

dsh plugin --profile web add github:CH4ACKO3/dsh-turn-fold
dsh harmony status --profile web   # all three patches must be `bound`

Test

node test/run.cjs

npm install installs the dependencies required by the test harness. The test suite applies all three patches to both supported compiled shapes in memory, parses the final browser bundles, and covers completed, split-activity, post-closing, partial-history, failed, interrupted, open, accessibility, localization, settings, and state-retention behavior. A missing target or selector mismatch fails the test; it is never reported as a skipped pass.

CI and release

GitHub Actions runs the test suite and a package dry run for every pull request and every push to main. Version tags publish to npm through Trusted Publishing (OIDC), without a long-lived npm token.

Configure the npm trusted publisher once:

npx npm@^11.15.0 trust github @ch4acko3/dsh-turn-fold \
  --repo ch4acko3/dsh-turn-fold \
  --file release.yml \
  --allow-publish

Then create and push a version tag whose value matches package.json:

npm version patch
git push --follow-tags

评论

0
最新优先