Skip to content

GooodWei/context-vista

41Last commit Aug 15, 2026

context-vista DSH plugin

Context Vista adds a `/context` slash command to DeepSeek Harness, displaying a donut chart of token allocation (system/tools/messages/remaining) and a floating mini card on the right side showing real-time usage and estimated cost. The floating card can be dragged, collapsed, and includes a "Compress Context" button to trigger `/compact`.

How to install the context-vista DSH plugin

dsh plugin --profile web add github:GooodWei/context-vista

Copying does not run this command. Review the repository and version before installing the context-vista DSH plugin.

context-vista DSH plugin data source

context-vista DSH plugin snapshot date: Aug 16, 2026

discovered

What the context-vista DSH plugin can do

  • Display a donut chart of context composition via `/context` command
  • Real-time floating mini card showing token usage and estimated cost, draggable and collapsible
  • Compress context button on the floating card that triggers `/compact`
  • Customizable pricing via YAML configuration file with hot-reload support

Where the context-vista DSH plugin fits

  • Monitor token consumption to prevent exceeding limits
  • Estimate per-session cost for API calls
  • Understand context allocation between system, tools, and messages
  • Decide when to compress context to optimize costs

Who the context-vista DSH plugin is for

  • DeepSeek Harness users who want to manage token usage
  • Developers needing cost estimation for their AI conversations

context-vista DSH plugin limitations

  • Only works within DeepSeek Harness environment
  • Requires DSH plugin system and pnpm
  • Pricing is only an estimate, not actual billing
  • Custom pricing requires manual editing of YAML file

context-vista DSH plugin: from the repository README

Quoted from the GooodWei/context-vista README, the upstream source of the context-vista DSH plugin. Copyright remains with the original authors.

> 一眼看清你的上下文窗口 —— token 用量、压缩收益、成本估算,尽收眼底。 为 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 提供 `/context` 斜杠命令,用**环形图**实时展示当前上下文 token 用量与分配。对话区右侧还常驻一张迷你悬浮卡,实时显示占用率与估算费用,可拖动、可收起。 ## 安装 ```sh npx @deepseek-ai/dsh plugin --profile web add github:GooodWei/context-vista npx @deepseek-ai/dsh web ``` > 需先安装 pnpm(`dsh plugin add` 内部会调用它)。已全局安装 dsh 时,`npx @deepseek-ai/dsh` 可简写为 `dsh`。 ## 使用 输入 `/context` 回车,展示一张卡片:上下文组成环形图(系统 / 工具 / 消息 / 剩余)、占用进度条、会话累计与估算费用。 右侧的迷你环形图悬浮卡实时更新、无需输入命令;按住标题栏可上下拖动(位置自动记忆),点右上角箭头可收起/展开。悬浮卡底部还有「压缩上下文」按钮,点击即触发 `/compact`(效果等同输入命令),压缩进行中会显示「压缩中…」并禁用。 ## 自定义定价 内置 DeepSeek 官方定价(人民币 ¥,含峰谷)。要覆盖或新增,编辑 `~/.dsh/settings.yaml`(热加载,无需重启)。**货币单位与峰谷定义都跟随 API(路由)**,每个路由可各自指定。 ### 最简示例 ```yaml context-vista: pricing: "https://api.deepseek.com": models: deepseek-v4-pro: peak: { hit: 0.3, miss: 9, output: 27 } offpeak: { hit: 0.15, miss: 4.5, output: 13.5 } ``` ### 完整示例(DeepSeek ¥ + OpenAI $,标注全部键值对) ```yaml context-vista: pricing: # 定价表:外层键 = 路由名 或 baseURL "https://api.deepseek.com": # 路由①:DeepSeek,人民币 + 北京时间峰谷 currency: "¥"

Read the full READMERepository license: MIT

context-vista DSH plugin questions

How do I install Context Vista?

Run `npx @deepseek-ai/dsh plugin --profile web add github:GooodWei/context-vista` then `npx @deepseek-ai/dsh web`. Make sure you have pnpm installed globally, as the plugin command uses it internally.

How do I use the context visualization?

Type `/context` in the chat input and press Enter. A card with a donut chart and progress bar will appear. Additionally, a floating mini card on the right side shows real-time usage and can be dragged or collapsed.

Can I customize the pricing for different API routes?

Yes, edit `~/.dsh/settings.yaml` with a `context-vista.pricing` section. You can set currency, timezone, peak windows, and model prices per route. The configuration is hot-reloaded, no restart needed.

What does the floating mini card do?

The floating card shows real-time token usage and estimated cost. It can be dragged by its title bar, collapsed with the arrow button, and includes a 'Compress Context' button that triggers `/compact` to compress the context.

Is the cost estimation accurate?

The cost is calculated based on the pricing you configure or the built-in defaults. It is only an estimate and does not represent actual billing. Always check your API provider's invoice for actual charges.