DeepSeek Harness plugin

dsh-trajectory-collapse

DeepSeek Harness web GUI: collapse the agent trajectory (tool calls, thinking, workflow steps) while always keeping the agent's final output. A setting controls whether the trajectory is

Jump to install

Source facts

Repository
AwesomeHou/dsh-trajectory-collapse
Latest update
Aug 15, 2026
Category
Workflow & Automation
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/AwesomeHou/dsh-trajectory-collapse
Plugin: dsh-trajectory-collapse
Author: AwesomeHou

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer4 files
README.mdSource · read only
README language

dsh-trajectory-collapse

一个 DeepSeek Harness Web 界面 永久插件:可以折叠 Agent 的轨迹(中间的思考步骤、工具调用、steering、workflow 运行、上下文注入等),同时始终保留 Agent 的最终输出

English: README.en.md

演示

![折叠前 / 折叠后对比](docs/before-after.gif)

折叠前,完整的 Agent 轨迹(思考、工具调用、上下文注入)都可见;点击轨迹顶部的「折叠轨迹」按钮后,只保留用户提问与 Agent 的最终输出,需要时随时可以展开。

折叠前(轨迹展开)折叠后(仅保留最终输出)
![折叠前](docs/before.png)![折叠后](docs/after.png)

功能

  • 逐轮次折叠 Agent 轨迹 — 折叠是以轮次为单位的:每个已完成的 Agent 输出顶部都有一个克制的 展开轨迹 / 折叠轨迹 小按钮,你可以单独控制每一次输出的轨迹折叠。该按钮位于轨迹上方、用户消息下方,且只出现在确实有轨迹可折叠的轮次。
  • 始终保留最终输出 — 即使折叠后,用户消息与收尾的助手输出也始终可见;只有中间的轨迹被隐藏。
  • 可折叠的轨迹类型 — 工具调用(tool-call)、思考步骤(非最终的 assistant-step)、steering、workflow 运行、上下文注入行(context,例如 system prompt / skill-catalog)以及 unknown 行。
  • 设置 — 在 设置 → 通用 中有一个勾选项 最终输出完毕后默认折叠 Agent 轨迹(在最终输出完成后默认折叠轨迹)。该项默认勾选。取消勾选后,轨迹默认保持展开,直到你按轮次手动折叠。

![设置:默认折叠 Agent 轨迹](docs/setting.png)

工作原理

该插件是安装到 web profile 的永久 bundle:

  • cordis.patch.yml — 插入 loader 行。
  • lib/index.js — Host 半边(空操作;功能都在浏览器端)。
  • lib/client.js — 浏览器半边。它观察聊天流([data-chat-flow]),把流节点按轮次分组,并用 data-dsh-traj 属性标记轨迹节点。注入的 CSS 会隐藏被标记的节点。它还注册了设置行,并在每个已完成轮次的轨迹顶部注入逐轮次折叠按钮。

安装

方式一:在 DeepSeek Harness 检出目录(profile web):

dsh plugin --profile web add <本仓库路径>

然后重启 harness。

方式二:直接叫agent帮你安装:

帮我安装这个插件:https://github.com/AwesomeHou/dsh-trajectory-collapse

方式三:先安装插件市场:https://github.com/AwesomeHou/dsh-plugin-marketplace 然后从插件市场里面搜索安装,还可以追踪后续更新。

开发

pnpm run check   # 对两个半边分别执行 node --check

许可证

MIT