快速了解
它能做什么
用于查看智能体会话上下文组成、历史与变化的 DeepSeek Harness 插件。
本站提供的是中文说明,不代表该项目或 Plugin 自身提供中文界面;语言支持请以上游文档为准。
Web Profile
0.1.2-rc.1+
证据已验证
核对日期 2026/9/6 UTC 13:49
选择前先看
dsh-context 为 DeepSeek Harness 添加“上下文”标签页、/context 命令和插件设置。它可视化当前上下文占用、逐请求趋势、压缩与剪枝、已组装请求内容、文件活动以及父子智能体关系。
适合谁
需要排查上下文膨胀、理解 Token 组成,或追踪智能体会话演进的 DeepSeek Harness 用户。
常见任务
- 定位系统提示词、工具 Schema、消息或工具结果中哪些部分占用上下文窗口。
- 按请求查看上下文增长、压缩、剪枝,以及与估算值并列显示的提供商数据。
- 查看智能体在选定步骤中读取、写入或搜索过的文件。
- 在聊天中通过 /context 打开精简的上下文组成视图和上下文浏览器。
权限与数据
文档所述浏览界面会展示会话上下文和智能体活动,供用户检查。
权限- 向 DeepSeek Harness 的 web profile 添加宿主插件和 Web 客户端包。
- 文档说明“上下文浏览器”可显示请求组装的系统提示词、消息、推理内容、工具参数和工具输出。
- 文档说明“文件活动”视图会记录智能体活动中读取、写入或搜索的文件。
局限
- 仅声明兼容 DeepSeek Harness 0.1.2-rc.1+;本次未验证其他版本。
- 文档称分类 Token 数字采用固定密度估算;部分固定的趋势和环形图详情会同时显示提供商上报的实际值。
- 本次整理未实际执行安装或运行时测试。
DSHub 已核对
- dsh-context 0.43.0 的 Bundle 结构和不可变 Git 分发路径已验证。
- 清单声明了 Web 客户端集成,以及针对 DeepSeek Harness 0.1.2-rc.1 的兼容性条目。
- README 记录了“上下文”标签页、/context 命令、设置和 web profile 安装命令。
DSHub 未核对
- 未在真实 DeepSeek Harness 实例中测试安装成功、UI 加载或实际行为。
- 未审计 npm tarball 内容。
固定版本安装
安装 dsh-context
这个Plugin Bundle没有 DSH Plugin 安装操作,请根据源码文档使用真实交付方式。
维护者原文
项目 README

dsh-context
The best DeepSeek Harness plugin for Agent's context insights and management.
dsh-context provides full context lifecycle management features.
- Context tab — an UI context dashboard for DeepSeek Harness's context stats, composition, trend, events, and messages.
/contextcommand — the slash command shows the context model for current context composition and recent context evolution.
Install / Update
To Install from any DeepSeek Harness installation:
dsh plugin --profile web add dsh-context
Or to update the dsh-context plugin:
dsh plugin --profile web update dsh-context@latest
Then start the web UI with dsh web. No build step, no restart.
Use it
Three surfaces, one story — what your agent is carrying, how it got there, and what it did with it:
| Where | What you get |
|---|---|
| Context tab | The full dashboard: stats, composition, per-request trend, events, file activity, and the agent network — in every session. |
/context command |
A centered modal with the same composition and context browser, without leaving the chat. |
| Settings → Plugin configuration | Per-user defaults: trend granularity & mode, File Activity sort. |
📊 The Context tab
Open any session and click the Context / 上下文 tab:

| Card | The question it answers |
|---|---|
| Context Stats | Turns, steps, live tool calls & images, context-event tallies — plus a list-price cost estimate (hover the ? for per-1M rates). |
| Token Stats | Where the billed tokens went: cache read/write, uncached input, output — around the cache-hit ring. |
| Timing Stats | How active time split across model calls, tool runs, and overhead. |
| Current Context | What's in the window right now. |
| Context Trend | Every request's size — and its story. |
| Context Browser | What any request was actually assembled from. |
| Context Events | When and why the window changed. |
| File Activity | What the agent did to your files. |
| Agent Network | The whole agent family, live. |
The headline occupancy and composition read the same official token-meter projections as the chat composer's context ring (contextPressure / contextBreakdown), so the figures always match what the ring tells you.
🧱 Current Context — who ate the budget

A six-color stacked bar against the model's full window (hatching = free headroom): system prompt, tool schemas, user messages, injected context, assistant replies, tool results — each with its ≈token figure and share. When a conversation starts degrading, this is where you see which part is responsible.
📈 Context Trend — every request, sized and explained

One stacked bar per model request — finer than per-message — so you watch the window grow turn by turn:
- ✨ Step brief — three plain-language rows under the chart: User recalls the message that opened the turn, In lists what newly entered (usually the previous tool results), Response shows the reply and/or tools called. Click a row to open that exact message in the Context browser.
- ✂ marks the events — compactions and prunes are pinned to the bar where they happened, so the drops explain themselves.
- Read it your way — Step / Turn granularity, Total (cumulative makeup) or Delta (each request's signed change), and sideways scrolling through the whole session. In Delta mode, growth piles up above the baseline and a compaction dives below it:

- Hover & pin — scrub for an instant tooltip; click to pin the full breakdown, with provider-reported Actual Prompt / Output / Cache next to the estimates.
- Live linkage — hovering a bar previews that step's assembled context in the Context browser beside the chart; leaving the chart returns to your own pick.
🧭 Context Browser — open the box of any request
Pick Live (next request) or any retained step, and browse what that request was assembled from: six collapsible categories expand into one row per element with its token price, and every element expands again into its actual content — the system prompt, each tool's JSON schema, message text, reasoning, tool arguments, and tool outputs.
- Who provides each tool — every tool-schema row carries a best-effort source chip:
tool-*first-party packages,dsh-*capability packages,mcp:<server>proxies, or the exact plugin watched live fromtools.register(). Sort by size / name, and filter every category by its own searchable fields:

- Tool results open into the full call — the tool name and arguments with its OK/error status, the result body with line count and a Raw / Markdown toggle:

- Image payloads render as cards — thumbnails with name, dimensions, stored size, and the official DeepSeek image-token estimate (the dsh multimodal pipeline, e.g.
read_imageresults and image attachments):

- Diff against the previous turn — signed delta badges per category (
+Nitems,±Nktokens) tell you what a turn added or reclaimed at one glance. Steps older than a compaction are reconstructed from the removed-message archive — and the card says so when a step's makeup is only approximate.
⚡ Context Events — when and why the window changed

Every injection, compaction, prune, model switch, and plan-mode toggle — labeled with its producer (instruction file, plugin id, skill name), its net token delta (compactions show what they reclaimed), turn/step, and time. The Inject / Compact / Prune / Switch / Mode chips filter the log by kind.
📁 File Activity — what the agent did to your files

One row per touched file — read, written, or searched — aggregated up to whichever step you pick on the trend chart:
- Per-purpose counts with header chips doubling as filters (Read / Written / Searched / Images) and a path search box.
- Line deltas — every
edit/writecontributes its estimated+added / −removedfootprint, per file and summed. - Every mode counts — native tools, the Minimal preset's
str_replace_editor, and the nested calls inside PTCrun_codeprograms are all folded into per-tool rows. - Searches land on real files — matched files get their own ops rows with hit counts.
- Click a row to expand its full operation log — every op jumps straight to the exact tool result in the Context browser.
🕸 Agent Network — the family portrait

The current agent, its parents, and every subagent — one node per agent, colored edges for the lineage, multi-level delegation on one map. Each ring is that session's composition scaled to its window occupancy; hover for tokens, requests, billing, and active time; click to jump into that session's own Context tab. Running agents breathe with a green pulse.
⌨️ /context command
Type /context (or pick it from the / menu) and press Enter:

A centered dialog opens with the Current Composition card and the Context browser — the same composition bar, per-step picker, and vs previous turn diff badges as the tab:

⚙️ Settings
In Settings → Plugins → Plugin configuration, the Context card holds this plugin's per-user preferences — default trend granularity (Step/Turn), default trend mode (Total/Delta), and the File Activity default sort. In-chart and in-card toggles stay per-view and never overwrite the stored preference.

Good to know
- Estimates vs actuals — category figures use dsh's own fixed-density heuristic (the same one as its built-in token meter); the pinned trend details and Token/Timing rings show provider-reported actuals next to them.
- Compatibility — works on
@deepseek-ai/dsh0.1.2-rc1+. The per-release matrix and how it is verified: docs/compatibility.md. - I18n — UI in English and 简体中文.
Like it?
If dsh-context helped you understand what your agent is carrying around, a ⭐ on GitHub is much appreciated — and issues/PRs are welcome!
License
有意识地管理
安装与管理
前置条件与目标 Profile
目标: Web Profile
交付方式: Git Bundle — bowenliang123/dsh-context#7ffb13af91825ec7e95db5aec5c9be4df133405f。
验证、更新与移除
显示生命周期命令
dsh plugin --profile web list兼容性与访问范围
Declared compatible with DeepSeek Harness 0.1.2-rc.1+: 0.1.2-rc.1+。
风险事实
证据与编辑审查Manifest、Bundle patch、分发与新鲜度
不可变证据
审查状态与源码活动
若会话包含敏感内容,请先评估该插件对提示词和工具内容的可见范围。
AI 审查于 2026/9/10 UTC 11:36。GitHub 事实核对日期: 2026/9/10 UTC 11:36。
自当前证据基线以来,没有记录到重要源码变化。