鱼皮AI导航
鱼皮AI导航
  • 主页
  • 社区
  • AI工具
  • AI知识库
  • AI提示词
  • MCP
  • Skills
  • AI学习资源
  • AI资讯
  • GitHub开源
登录/注册

dsh-turn-fold

面向 DSH Web UI 的 Codex 风格回合折叠:保留最终答复,合并连续的推理与工具活动,并以多语言摘要展示可配置的实时耗时、工具调用和 token 指标。

界面增强
访问 GitHub
文档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 of @deepseek-ai/dsh-client-ui-conversation (lib/client.js) from 0.1.0-rc.8 up to, but not including, the 0.2.0 prerelease line; 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-loopCallExpression[expression.name.name="map"][expression.expression.name="order"]Replaces the order.map(...) node loop 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

▼
sh
复制代码
dsh plugin --profile web add github:CH4ACKO3/dsh-turn-fold dsh harmony status --profile web # all three patches must be `bound`

Test

▼
sh
复制代码
node test/run.cjs

npm install installs the dependencies required by the test harness. The test suite applies all three patches in memory, parses the final browser bundle, 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:

▼
sh
复制代码
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:

▼
sh
复制代码
npm version patch git push --follow-tags
界面增强

快捷安装

复制到终端去安装插件

dshplugin--profilewebaddgithub:CH4ACKO3/dsh-turn-fold

温馨提示

装插件等于在本机跑第三方代码,权限与你相同,能读文件、用凭据、访问网络,工具审批管不到。请只装可信来源,并尽量锁定 commit。

站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
🔥热门工具
朱雀AI检测朱雀AI检测
朱雀AI检测助手朱雀AI检测助手
LovartLovart
老鱼简历老鱼简历
WritePass官网WritePass官网
面多多面多多
CursorCursor
星月写作星月写作
零感AI零感AI
墨得问题墨得问题
dsh 插件推荐
DSH-agent-bridge
在 Web 输入框中切换原生 DSH Agent 与 Grok Build,并通过 ACP 代理 Grok Build 会话及斜杠命令。
dsh-gui-hanhua
DeepSeek Harness 界面信息汉化插件:工具调用卡片、插件列表、命令菜单与权限选择器显示中文,保留英文原名。
ai-plugin#dsh-plugin
aipx 工具包:技能之外还有 Hub Console 控制台——用约 4 个元工具代理全部 MCP 服务器,含服务器池健康、工具级启停、工具目录,以及直观展示 mcp_search 返回结果的搜索试验场。
dsh-gpu-pulse
DSH Web 界面内置的悬浮 GPU 监控:紧凑可拖动的条带,每张独立 GPU 一行(精确名称、利用率、显存、温度、功耗),数据来自 nvidia-smi;侧边面板或侧边卡片打开时保持在最上层;驱动支持时还列出显存占用最高的进程;无 NVIDIA 驱动的机器会退化为 n/a 胶囊。
dsh-sticky-notes
泡泡猫的即时便签 — 支持彩色标签、置顶、定时提醒与密码保护。