Back to home

Starlight-bananice

dsh-status-bar

Know what your agent is doing at a glance — 17-segment configurable status bar for DeepSeek Harness: status/model/context/tokens/TPS/cost/jobs. 一眼看清你的 agent 正在做什么:17 段可配置 DSH 会话状态栏。

Stars
0
Language
TypeScript
Created
Aug 15, 2026
Updated
Aug 15, 2026

Introduction

dsh-status-bar · Know what your agent is doing — at a glance

A 17-segment, fully configurable status bar for the DeepSeek Harness composer dock. Replaces the built-in stats line with live session intelligence: status, model, context pressure, token burn, real-time generation speed, cost estimates, jobs and queue — toggled and reordered in two clicks, and it removes itself cleanly when you unload it.

DSH version license topic

English · 中文


Overview

The problem: the DSH composer shows one thin, fixed stats line. You cannot see the current model, how full the context window is, how fast tokens are streaming, or what a session has cost — and there is no way to arrange that information the way you work.

Who it is for: power users and teams running DSH daily — anyone who wants live session telemetry without leaving the composer, and without running a separate monitor.

What it does:

  • 17 toggleable, reorderable segments — status dot, model, title, workspace, agent preset, turns & steps, model/tool time, TTFT & decode speed, cache-hit rate, tokens, context pressure, live TPS, session time, cost estimate, jobs, queue, errors
  • Live throughput (TPS) — a host-side projection folds every assistant/chunk event, so the speed updates chunk by chunk while streaming; no polling, no external live-stats plugin
  • Cost estimation with a user-maintained model price book — per-model rates, per-model peak/off-peak schedules, per-session re-pricing, and a «Usage & cost» dialog with a stacked cost-trend chart (day / week / month)
  • Zero-config default — 13 segments ship enabled; everything else is a checkbox away
  • Clean takeover — the plugin's bar shadows the built-in stats cell at lower priority: while loaded it renders, when unloaded the built-in line returns untouched
  • Bilingual UI — client locale strings ship for English and Chinese, following the DSH locale system

Screenshots

The status bar replaces the built-in stats line with live session telemetry (status · model · turns · context · cache · TPS · session time · jobs · queue · errors), managed from a dedicated settings page — including a per-model price book with peak/off-peak pricing:

Settings & model price book

Toggle & reorder on the go (segment list)Usage & cost dialog (trend chart · stat cards · history)
Segment listUsage & cost dialog

Compatibility

ItemValue
DSH versions0.1.0-rc.5 (mainline master) — earlier RCs may work but are not verified
Last verified2026-08-15
RuntimeNode ≥ 22 (host) + modern browser (client); no external services
Peer relationCoexists with @linxin666/dsh-live-stats — both serve the liveTokenUsage key; the session-projection registry keeps the first registrant (one unit, no duplicate rows)

Install / Uninstall

Install

# From a local checkout (profile assembly; `web` is a hardcoded alias for `--profile web`)
dsh plugin --profile web add ../dsh-status-bar

# Or via the npm package
dsh plugin --profile web add @dsh-external/dsh-status-bar

# Or runtime injection without a restart (developer workflow)
#   dev_inject_plugin / dsh-super-injector → point at this repository

Then start/restart DSH Web. No configuration is required — the bar appears with its defaults.

Upgrade

dsh plugin --profile web update @dsh-external/dsh-status-bar   # or `update ../dsh-status-bar` for a local checkout

Disable

  • Hide the bar only — the client master switch (Settings → Plugins → Status Bar, or the gear menu) turns the bar off instantly; the host projections and usage ledger keep running.
  • Stop the plugin entirely — remove it from the profile's bundles list (equivalent to uninstall below); re-adding restores it.

Uninstall

dsh plugin --profile web remove @dsh-external/dsh-status-bar

Removal restores the built-in stats line automatically (shadow cell released). Data left behind: browser localStorage (dsh.statusBar.v1) and the host usage file (see Permissions & data) are not deleted — remove them manually if you want a clean slate.

Quick start

  1. Install (above), restart DSH Web.

  2. Start a session — the bar shows status · model · turns · durations · speeds · cache hit · tokens · context · TPS · session time · jobs · queue · errors by default.

  3. Open Settings → Plugins → Status Bar to toggle/reorder segments, enable wrapping, or reset.

  4. Want cost estimates? Add the models you use to the model price book:

    # In Settings → Plugins → Status Bar → Model price book:
    # model "deepseek-chat" → input 2 / cache read 0.5 / cache write 2 / output 8 (CNY per 1M tokens)
    # optional: enable peak/off-peak with DeepSeek's official windows 09:00–12:00, 14:00–18:00
    

    The bar then shows e.g. ≈¥0.0123 for the current session, re-priced automatically when you switch sessions/models. Click the chart button next to the gear to open the usage & cost dialog (stat cards, rate card, paged usage history, cost-trend chart with ‹ › period navigation).

Configuration

All configuration is client-side, stored in browser localStorage under dsh.statusBar.v1, edited via the settings page or the in-composer gear menu.

OptionDefaultMeaning
enabledtrueMaster switch; false hides the bar entirely
wrapfalseAllow the bar to wrap onto multiple lines instead of eliding
segments13 on / 4 off (see below)Ordered list of enabled segments
cost.currencyCNYCurrency for cost display (CNY / USD)
cost.models{}User-maintained model price book (model id → prices + schedule)

Default segment state: on — status, model, counts, durations, speeds, cache hit, tokens, context, TPS, session time, jobs, queue, errors; off — title, workspace, agent, cost.

Model price book entry (values added when a model is configured): input 2, cache read 0.5, cache write 2, output 8 (per 1M tokens, in the configured currency); peak/off-peak disabled by default; when enabled, defaults to DeepSeek's official windows 09:00–12:00, 14:00–18:00, timezone local.

Environment variables: DSH_HOME (host-side) — base directory for the plugin's local data (default ~/.dsh). No other env vars, no secrets, no tokens.

Segment reference (all 17, toggleable & reorderable):

SegmentShowsSource
Status● running / idle / error dotsnapshot running / partial / lastAgentError
Modelmodel of the latest responsesessionModel projection (host fold of assistant/message events)
Titlesession title (truncated)SessionSummary
Workspaceworkspace dir nameSessionSummary
Agent presetpreset nameSessionSummary
Turns & stepsN turns · M stepssessionStats projection (window-fold fallback)
Model & tool timeLLM · tool-call wall timesessionStats
TTFT & decodeavg first token · tok/ssessionStats
Cache hitprompt cache-hit share (2 decimals, capped at 99.99%)tokenUsage
Tokensbilled input/output totalstokenUsage
Contextcontext-window occupancy %contextPressure
Throughput TPSlive generation rate (default on)liveTokenUsage projection — folded from assistant/chunk in real time; block-aware estimation (~4 chars/token + block/role framing, re-priced at block-end, EWMA against burst flushes), exact once the provider reports usage; 0 while the session is not generating
Session timewall clock, ticks while runningturnTimings
Cost estimate≈¥0.0123 (off by default)tokenUsage × the model's effective price
Jobsrunning background jobsjobsBySession
Queuequeued messagessnapshot queue
Errorsfailed/retried/over-limit count (>0 only)node fold

Permissions & data

CategoryWhat the plugin touches
FilesHost writes the usage ledger to <DSH_HOME>/dsh-status-bar/usage.jsonl (~/.dsh/dsh-status-bar/usage.jsonl by default; one record per assistant message: timestamp, model, input/cacheRead/cacheWrite/output tokens). In-memory history is a rolling 120-day window.
NetworkNo outbound requests, ever. The only endpoint is the plugin's own local webserver route /status-bar/api/usage (same origin as DSH Web, 127.0.0.1), serving the chart buckets.
CredentialsNone. The plugin never reads, stores, or transmits API keys, tokens, or cookies.
User dataClient: localStorage["dsh.statusBar.v1"] (bar config + price book — no conversation content). Host: the usage ledger described above (token counts only, no prompts, no messages, no file contents).

Troubleshooting

SymptomCause & fix
Bar does not appearMaster switch off → enable it in Settings → Plugins → Status Bar, or via the gear menu. localStorage cleared? Config resets to defaults.
TPS segment is 0 / blankNo stream has started yet, or the stream is between retries. The measurement window restarts on each llm/retry; the carried rate never goes blank after the first stream.
TPS conflicts with another pluginIf @linxin666/dsh-live-stats is loaded, the registry keeps whichever registered first for the shared liveTokenUsage key — one unit, no duplicate rows.
Cost estimate missingThe model is not in the price book → add it in Settings → Plugins → Status Bar → Model price book. Costs are estimates at the book's flat rates, not provider billing.
Usage chart is emptyNo assistant messages with provider-reported usage in the period yet, or DSH_HOME points elsewhere than expected (check usage.jsonl location above).
UI looks broken after an upgradeHard-refresh the browser (stale client bundle) and verify the plugin version in Settings.

Logs: the plugin writes no log files of its own — host-side diagnostics appear in the DSH web process output (profile logs); client-side issues surface in the browser devtools console.

Rollback: the settings page has a one-click Reset (restores all defaults). For the plugin itself, uninstall → re-add the previous version with dsh plugin --profile web add <pkg>@<version>; the built-in stats line is always restored automatically on removal.

Development

npm run build          # junction links + host tsc + client typecheck
npm run build:client   # tsdown → lib/client.js (ModuleLoader bundle)

The build needs DSH_CHECKOUT (or a common-path probe) pointing at a dsh source checkout; client typechecking resolves against the checkout's lib/types through junction links. Host-side sources are plain TypeScript (Cordis plugin), client sources are React + the DSH client UI slots.

Contributing: fork the repository, branch off main, and open a PR — small, focused changes with a clear description are preferred. Report bugs via Issues with the DSH version, browser, and a minimal repro.

License & security