返回目录
模型与 MCP 插件

dsh-think-summary

Drifter-yh/dsh-think-summary

Codex-style thinking summaries for DeepSeek Harness: 1-3 bullet points per reasoning step, full chain one click away.

Stars
0
Forks
0
Issues
0
更新
16 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:Drifter-yh/dsh-think-summary

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

dsh-think-summary

English | 简体中文

npm license dsh

A DeepSeek Harness plugin that turns each reasoning step into one or two plain sentences, so a 30-minute long-horizon run stays skimmable. The full chain of thought is still one click away.

Community plugin. Not affiliated with or maintained by DeepSeek AI.

The problem

Harness renders the model's raw chain of thought. In a long task that means:

  • collapsed: a one-line excerpt that tells you nothing, plus a step list like "ran a command, read a file, searched code";
  • expanded: several thousand words of stream-of-consciousness, in the order the model happened to think it.

Codex feels different because it shows a summary that the model itself produces (OpenAI's reasoning-summary channel). DeepSeek has no such channel — the only way to get that experience is to generate the summary locally, one extra cheap call per step.

What it does

Before:

› 思考   The user reports a UI issue after the latest changes: a message shows raw
         evidence (the fallback) at the front, trace panel shows 24 tools…

After:

› 思考 · 进度
  我读完了插件的两半代码,确认摘要走的是本地端点;接下来改客户端的额度逻辑。

Click the row to read the original reasoning, rendered as Markdown exactly as before.

To get the Codex-like flow — a line of progress as each step settles, with no expanding — set collapseTiming: next-input for ui-chat in your profile's cordis.patch.yml. The latest turn then stays open until your next message.

Install

dsh plugin --profile <your-profile> add @drifter-yh/dsh-think-summary

Some builds also expose a plugin registry under Settings → Plugins; otherwise use the command above.

Restart Harness once after installing: the host half is loaded as a forked module and cannot be hot-swapped.

Configure

Configuration lives in your profile's cordis.patch.yml (or the plugin's config panel):

- id: think-summary
  name: '@drifter-yh/dsh-think-summary'
  config:
    provider: opencode-go          # any registered LLM route
    model: deepseek-v4.1-flash     # a cheap, fast model is the point
    enabled: true                  # master switch; false = no model calls at all
    maxOutputTokens: 2000          # budget for (reasoning + answer) tokens
    maxInputChars: 6000            # longer reasoning is clamped head+tail
    maxCallsPerSession: 300        # per-session cost ceiling
    maxCallsTotal: 600             # per-process cost ceiling
Key Default Meaning
enabled true Master switch. false keeps the UI but makes no model calls.
provider / model opencode-go / deepseek-v4.1-flash Route used for summarising.
maxInputChars 6000 Reasoning is clamped head+tail beyond this.
maxOutputTokens 2000 Total completion budget.
timeoutMs 25000 Per-call timeout.
minChars 160 Steps shorter than this are not worth a call.
maxCallsPerSession / maxCallsTotal 300 / 600 Hard cost ceilings.
cacheFile ~/.dsh/storages/think-summary/cache.json Persisted cache.

Emergency switch: localStorage.setItem('dsh-think-summary.enabled', 'false') in the browser disables requests for that page without touching the profile.

How it works

browser                                              host process
┌───────────────────────────┐   POST /summarize   ┌──────────────────────────────┐
│ shadows assistant-step    │ ──────────────────▶ │ ctx.llm.stream()             │
│ collapsed → progress line │ ◀────────────────── │   provider/model from config │
│ expanded  → raw reasoning │     1–2 sentences   │ content-hash cache + budget  │
└───────────────────────────┘                     └──────────────────────────────┘
  • The client registers conversation.chat.node at priority: -1 for assistant-step, filtering blocks exactly like the shipped renderer (groupPart rules, text / reasoning / image; tool calls stay separate nodes).
  • A summary is requested only when a step settles — never mid-stream.
  • Summaries are keyed by a SHA-1 of the (clamped) reasoning text, so identical text is never billed twice, and the cache survives restarts.
  • Any failure (no route, timeout, truncation, empty output) degrades to the original one-line excerpt. The plugin can never make the transcript worse than stock.

Cost and latency

One cheap call per settled step. On deepseek-v4.1-flash a typical step takes 3–20 s and a few thousand input tokens; the answer itself is ~3 short lines. A 40-step run is well under one unit of currency on most routes — but this is a paid feature, so the budgets above exist on purpose.

Rows older than three hours are not backfilled; opening an old session does not trigger a wave of calls.

The client also rate-limits itself with a sliding window of 60 requests per 10 minutes. When the window is full the row shows 摘要已暂停 (summary paused) and recovers automatically once it slides — replacing the old lifetime cap of 240 requests per page, which a long-lived desktop window could exhaust permanently. Host-side skipped answers (budget exhausted / disabled) suppress that text for ten minutes, so scrolling a row in and out no longer re-hits the endpoint.

Privacy and security

  • Reasoning text is sent only to the provider you configure — the same provider that already serves the conversation.
  • Summaries are cached locally at ~/.dsh/storages/think-summary/cache.json.
  • The HTTP endpoint (/dsh-think-summary/*) accepts loopback connections only, caps request bodies at 512 KB, requires POST for summarising, and runs at most two model calls at a time.
  • No telemetry, no analytics, no network calls other than the model request.

Compatibility

  • Harness >=0.2.2-rc.1 <0.2.3-0; verified on 0.2.2-rc.1 using the desktop profile (the same web client Harness serves).
  • The plugin shadows the shipped assistant-step renderer. A Harness release that changes the node contract can break rendering; the renderer is wrapped in an error boundary that falls back to plain text.

Limitations

  • File mentions (@path) inside assistant text render as plain text for now.
  • Chinese bullets only — the prompt asks for Chinese; other languages are not wired up.
  • Reasoning effort cannot be disabled on routes that only expose low/high/max, so maxOutputTokens must leave room for thinking. That is why the default is 2000.
  • History is not fully backfilled (3-hour window) to keep costs predictable.
  • Tool calls are still rendered by Harness itself; only assistant-step nodes are shadowed.

Troubleshooting

Symptom Check
No bullets anywhere Is the plugin enabled? curl http://127.0.0.1:<port>/dsh-think-summary/status
Row shows 摘要已暂停 Hover for the reason: rate window (wait for it to slide) or budget (raise the host ceilings)
skipped: budget Raise maxCallsPerSession / maxCallsTotal
摘要输出超长 in the host log Raise maxOutputTokens or lower maxInputChars
Summaries stop after a Harness update Open an issue with the Harness version and the console error

Development

node --check index.js
node --check client.js
npm pack --dry-run

Releases are published from CI on tag push (.github/workflows/release.yml) with npm provenance; it needs an NPM_TOKEN repository secret.

The host half is a Cordis plugin (apply(ctx, config)); the client half is an ESM module registered through window.__ModuleLoader__.load.

License

MIT — see LICENSE. Third-party notices: THIRD_PARTY_NOTICES.md.

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类模型与 MCP
规则置信度中

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。