Preface

In the Web interface of DSH (DeepSeek Harness), there are several types of information that are not easily seen during normal use: how much of the context window is used, how much money this session has cost, which files are in the workspace, and which files have been modified in this session. Although the right-side details column carries some of this content, it is automatically collapsed when switching or creating new sessions, requiring manual re-opening every time.

The approach of dsh-sidebar-panel is: add a panel collapse button in the top-right corner of the session header, put the four tabs of Overview, Files, Changes, and Tools into the right-side details column, and make the panel persistent—switching or creating new sessions does not automatically collapse it, and the collapsed state is also remembered.

What is this

dsh-sidebar-panel is a right-side panel plugin for the DSH Web profile, maintained by kee0012, current version 0.2.0, MIT license. The client side injects the collapse button in the top-right corner (consistent style with the left collapse button) and the panel itself; the server side provides a set of same-origin HTTP APIs to supply data for the panel.

Core Features

Overview: Account, Context, and Session Metrics

Above the Overview tab is the DeepSeek account card: the official balance is queried in real-time via GET https://api.deepseek.com/user/balance, refreshed every 15 seconds, accompanied by a recharge button that jumps to https://platform.deepseek.com/usage. Below it are listed in order:

  • Context window: Used / Total / Percentage / Remaining;
  • Current session context budget;
  • Session metrics: Hit rate, current session cost, runtime, number of requests, cumulative tokens;
  • Usage analysis: By source / By type, including input/output details and hit/miss breakdowns.

Server-side data refreshes automatically every 5 seconds, displaying “Updated at HH:MM:SS” in the top-right corner. The number of requests, cost, and runtime are derived by the server from session event logs; historical sessions accessed before plugin installation are calculated once upon first visit.

The cost is an estimated value: calculated by multiplying the usage of each request by the unit price per million tokens (with a lower price for cache hits), and weighted by the Beijing time peak/trough periods at the time of the request.

Files: File Tree, Preview, and Right-Click Menu

The Files tab displays the file tree of the current session’s workspace. Clicking a file allows for preview: text is displayed inline, PDF and images are embedded, and large files show a truncation hint. The right-click menu provides these operations:

  1. Show in file manager;
  2. Add file reference / Add file content (file);
  3. Add folder reference (folder);
  4. Copy absolute path / Copy relative path.

References and content will be written into the chat input box and sent directly.

Changes and Tools

The Changes tab lists the files that have been touched by file-writing tools (write/edit/str-replace-editor, etc.) during this session. This tracking only covers calls to file-writing tools; file changes occurring inside bash/pwsh cannot be reliably captured.

The Tools tab is a list of tool calls within this window, with parameter and result details, rendered by the plugin itself. The reason is that the plugin replaces the built-in DetailsPanel with priority: -1 (since only one renderer can occupy the single slot), so the tool details seat of the built-in panel cannot be reused; the Inspect button in the chat will still open the right column, but it will not automatically select the tool.

Panel Persistence Mechanism

The open/close state of the panel is stored in the browser localStorage (dshSidebarPanel:details-open), defaulting to open. When switching or creating a new session, the plugin automatically keeps the panel open until you actively click to collapse it; thereafter, all switches remain collapsed until clicked open again. During the blank (hero) phase of a new session, the plugin uses a declarative CSS rule to keep the panel persistent; structurally, the panel is fixed at a width of 360px on the right and will not cover the full screen or obstruct the chat area.

Same-Origin HTTP API

The server provides a set of same-origin routes for the panel to use: config, overview, files, file-content, file-raw, balance, reveal, changes. For example, viewing the configuration:

curl "http://127.0.0.1:3080/dsh-sidebar-panel/api/config"

In terms of cross-origin protection, GET requests do not perform Origin validation (same-origin GET requests do not carry the Origin header by default); POST relies on the defense line of “not responding to CORS preflight + accepting only JSON”.

Installation and Enablement

Execute in the terminal where DSH is running (Web profile):

dsh plugin --profile web add github:kee0012/dsh-sidebar-panel

After installation, restart DSH and refresh the browser (Ctrl+Shift+R).

Another npm installation method (dsh plugin --profile web add dsh-sidebar-panel) has not been released to the npm registry yet and is not recommended.

Configuration

In the DSH composite configuration (cordis.yml), simply add config for the plugin; if not provided, all defaults are used. Configurable items include fileBrowser (maxEntries / maxContentChars / includeHidden), reference (file / folder reference template), changes.writeTools, and pricing (enabled / currency / peak/trough hours / multiplier / model unit price table). The example given in the README:

- id: dsh-sidebar-panel
  name: dsh-sidebar-panel
  config:
    fileBrowser:
      maxEntries: 500
      maxContentChars: 40000
      includeHidden: false
    reference:
      file: '@<path>'
      folder: '@<path>/'
    changes:
      writeTools: ['write', 'edit', 'str-replace-editor', 'patch', 'run_code']
    pricing:
      enabled: true
      currency: CNY
      offPeakStartHour: 0.5
      offPeakEndHour: 8.5
      offPeakMultiplier: 0.5
      models:
        deepseek-chat: { inputPerM: 2, cacheHitPerM: 0.5, cacheWritePerM: 2, outputPerM: 8 }
        deepseek-reasoner: { inputPerM: 4, cacheHitPerM: 1, cacheWritePerM: 4, outputPerM: 16 }

If your model is not in the pricing.models table, pricing.defaultModel (default same as deepseek-chat) will be used; to match the actual bill precisely, adjust the unit price table according to your model’s actual price.

Development and Testing

After the installation steps above, the plugin works normally. If you want to participate in development, you can first do a syntax check and then run the server-side unit tests:

node --check src/index.js && node --check client/client.js
node test/unit.test.mjs

Unit tests mock ctx and do not require a DSH instance. API smoke test:

curl "http://127.0.0.1:3080/dsh-sidebar-panel/api/config"

GET does not require an Origin header; POST smoke test requires an Origin.

The server depends on @deepseek-ai/schemastery (configuration schema) and @deepseek-ai/dsh-credentials (reading DEEPSEEK_API_KEY credentials), both provided by the DSH runtime; when developing from source, run pnpm install in the plugin directory to resolve dependencies.

Applicable Scenarios and Notes

Suitable for users of DSH Web profile in the browser who want to see context usage / session cost / workspace files at a glance. Notes before use:

  1. Only supports DSH’s Web profile (HTTP same-origin routes); custom HTTP routes are unavailable in the desktop (Electron) form.
  2. Balance queries require configuring DEEPSEEK_API_KEY in DSH credentials or environment variables; otherwise, a “Not configured” prompt will be displayed. The key is never sent to the browser. Since the official website does not publicly expose a cumulative consumption / request count interface, the account card does not display these two items.
  3. The cost is an estimated value, and the matching accuracy depends on the pricing table configuration.
  4. Change tracking only covers file-writing tools; changes inside bash/pwsh are not within the scope of coverage.
  5. The plugin runs with the permissions of the current dsh process; it is recommended to read the source code and confirm the license (MIT) before installing.

The philosophy of DSH is “everything is a plugin,” and the plugin ecosystem is maintained by the community; the directory page at the end is an independent community site with no official affiliation with DeepSeek or High-Flyer.

Conclusion

dsh-sidebar-panel gathers scattered information such as context, cost, files, and tool calls into a persistent right-side panel, saving the operation of repeatedly opening the details column. Experience it with a single command:

dsh plugin --profile web add github:kee0012/dsh-sidebar-panel
  • Directory page: https://www.skillhub.cn/plugins/kee0012/dsh-sidebar-panel
  • GitHub: https://github.com/kee0012/dsh-sidebar-panel