ATchangan/dsh-visual-sidebar ↗★ 0
@atchangan/dsh-visual-sidebar
DSH 右侧可视化多标签页侧边栏插件,提供总览、对比、洞察、上下文及收藏等功能面板。
AI 分析
核心用途是扩展 DSH 的右侧信息展示维度。适合需要深度分析会话数据、对比模型输出或收藏关键上下文的 Web 端用户。
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:ATchangan/dsh-visual-sidebar说明文档
阅读完整 README ↗@atchangan/dsh-visual-sidebar
A visual sidebar for the right details column of the DeepSeek Harness Web UI. It replaces the native tool-details panel with a resident, theme-aware, multi-tab sidebar: Overview / Compare / Insights / Context / Collection — each built on data that nothing else in the harness already surfaces.
中文文档见 README.zh-CN.md。
Association: this repository is the standalone installable package. ATchangan/dsh-visual-sidebar-fork is a fork of deepseek-ai/deepseek-harness whose tree hosts only this plugin (the same content at the repository root) — the fork keeps the upstream relationship visible while remaining a plain plugin package, not a full harness copy.
What it does
| Tab | Content | Data source |
|---|---|---|
| 总览 Overview | cross-session live board (running / awaiting input / stalled / background jobs / subagents) + current-session context health (used %, projected, window) | useSessions list (running, pendingInteraction, updatedAt, jobsBySession, subagentsByParent) + useProjection('contextPressure' / 'contextBreakdown') |
| 对比 Compare | per-session overview table (title, updated, tokens, turns) with a click-to-focus detail pane and a mini token trend for the current session | session list projectionValues (tokenUsage, sessionStats) + current chat window |
| 洞察 Insights | hand-drawn SVG charts: token curve (output / cache-read), turn durations, tool frequency, context pressure gauge, 7×24 activity heatmap, tool bottlenecks (calls / total / P50 / P95 / failures) with one-click save-to-collection | current-session chat snapshot (usage rows, turn timings, tool timings) + projections |
| 上下文 Context | context composition stacked bar (system / tools / messages), pressure gauge, and session fork lineage tree (ancestors + descendants, subagent-aware); click a node to open that session | contextBreakdown / contextPressure projections + session list parentId lineage |
| 收藏 Collection | cross-session library of saved items (tool result / message output / file / command): filter chips, search, copy, insert into composer, scroll to the chat node, delete | localStorage-backed collection store (root scope, shared across sessions) |
Features
- Takes over the
detailssingle slot atpriority: -1(official renderer stays atpriority: 0; lowest renders). It does not re-declareconversation.details.tool— the native tool-details panel and its seat are deliberately left to the framework's official entry (the trajectory view owns full tool/request inspection). - Per-session memory: open/tab/split are persisted per session through the framework store engine (
localStorage, keyrsp.sidebar.); switching back to a session restores its panel state, and the framework'scloseDetails()on session switch is re-opened from the panel's own mount effect when the session rememberedopen. - Entry points: a 面板 button in the conversation header action strip, plus the native drag-to-resize handle on the right edge.
- Theme & i18n: colors/fonts come from
--dsw-*/--ds-*tokens (light/dark follow the DSH theme automatically); dictionaries ship zh + en; registration respectsprefers-reduced-motion. - Extensibility: the panel declares two additive child slots —
rightpanel.toolbar(header tools) andrightpanel.extras(bottom extras) — for third-party plugins. - Zero runtime dependencies: charts are hand-drawn inline SVG; only the module table externals (
react,@deepseek-ai/dsh-client-runtime/client,@deepseek-ai/dsh-client-ui-primitives) are resolved at runtime.
Requirements
- DSH Web client
@deepseek-ai/*packages 0.1.x (built against0.1.1-rc.2; peer range>=0.1.0-rc.5 =24.0.0. - The plugin is a client-only DSH package: an empty node half (
lib/index.js) plus the lazy-CJS client bundle (lib/client.jsregistered throughwindow.__ModuleLoader__.load), discovered viadsh.client.platform = "web"andexports["./client"].
Install
DSH Desktop (market verification path)
The package carries a verifiable DSH bundle field:
"dsh": {
"bundle": { "patch": "./cordis.patch.yml" },
"client": { "inject": [...], "platform": "web" }
}
With the Desktop community market or the built-in terminal:
# inside a DSH Desktop terminal, for the active profile:
dsh plugin add --save-exact @atchangan/dsh-visual-sidebar@0.1.0
The bundle patch inserts the loader row:
- insert:
- id: ui-visual-sidebar
name: '@atchangan/dsh-visual-sidebar'
Manual profile install
npm pack(or clone the repo) and install the tarball into the profile:pnpm add --save-exact ./path/to/package.tgzin the profile directory (e.g.$DSH_HOME/profiles/desktop).- Add the row above to the profile's
cordis.patch.yml, or letdsh plugin addhandle both. - Restart DSH Desktop (or the
dsh webhost) and refresh the page.
Development
pnpm install # installs the dev toolchain (esbuild, typescript)
pnpm typecheck # strict TS check against the published 0.1.1-rc.2 type packages
pnpm build # emits lib/client.js (+map) and lib/index.js (+map)
pnpm verify # vm-based loader smoke test (single __ModuleLoader__ registration, apply/inject exports)
The client bundle replicates the in-repo clientBundle preset contract: CJS closure registered via window.__ModuleLoader__.load, externals resolved through the injected require (module table), everything else inlined; .css is inlined as text and injected at materialization under style[data-plugin-css].
Runtime contract this plugin relies on (verified against DSH 0.1.1-rc.2)
detailsslot:single/sessionscope, declared byui-layout's frame; shadowing at a lowerpriorityis the documented mechanism ("lowest renders").- Session standard kit:
useSession,useProjection,useSessions,useWorkspaces,useInput,inputActions(the last two viaui-conversation's standard provide channel). - Chat anchors:
[data-chat-anchor-key]on node rows inside the[data-conversation-scroll]scrollport (used by the click-to-scroll interaction). - Projections:
tokenUsage,sessionStats,contextPressure,contextBreakdown(host-provided whole values; read defensively). - Persistence: framework
defineStorepersist(per-session suffix) + a root snapshot store for the collection.
Known Limitations and Deferred Work
- No native tool-details replica (by design): the panel deliberately does not render
conversation.details.tooland cannot read the internalchatStoreselection; full tool/request inspection is the trajectory view's job. Clicking a tool row in chat only opens the panel column — it does not locate the tool. - Blank sessions: the conversation header (and thus the 面板 button) is hidden while a session is blank; the panel still mounts and shows its empty-state guidance once the column opens.
- Stalled detection is a heuristic: a running session with no
updatedAtactivity for 2+ minutes is flagged "长时间无更新", not a definitive deadlock. - Cross-session trends: per-session time series are not available from the list store, so the compare trend sparkline covers the current session only.
- File-type collection items are added manually (the panel accepts a file reference/path); produced-file references are rendered by
ui-deliverablesand deliberately not duplicated. - Panel width is owned by the framework layout store (native drag handle; default width on open) — the plugin persists tab/split/open, not the pixel width.
- Package name scope:
@atchanganmust be an npm scope registered to the publisher beforenpm publish; keep theidincordis.patch.ymland the__ModuleLoader__registration consistent withpackage.json#name(the build derives both from it).
License
MIT — see LICENSE.