Introduction¶
When running agent tasks in the DSH Web GUI, a single session may involve multiple rounds of conversation, multiple tool calls, and multiple model calls. Information such as round count, step count, token usage, cache hits, and LLM/tool duration is scattered across session logs, making it difficult to verify by opening historical sessions one by one.
dsh-conversation-stats addresses this issue: it adds a “Session Statistics” tab at the top of the DSH Web GUI, parsing session data from session logs under ~/.dsh/sessions and displaying it in both summary and detail views. Below, we introduce its capabilities, installation methods, and points to note.
What is it¶
dsh-conversation-stats is a session statistics plugin for the DeepSeek Harness (DSH) Web GUI, maintained by wellcover, and licensed under the MIT License.
It registers a conversation.view tab after “Conversation” and “Trajectory” at the top, positioned after the tabs for “Conversation”, “Trajectory”, and the Usage plugin. The page lists the round count, step count, number of model calls, and token usage (input/output/cache) for each conversation, and summarizes LLM/tool duration, model distribution, and termination reasons; clicking on a conversation expands the detailed model call logs and tool call statistics.
It does not rely on persistent listening and directly parses ~/.dsh/sessions/**/session.jsonl.zstd, so both historical and current conversations are visible.
Core Features¶
Session Overview¶
- The session overview table includes: Title/Snippet, Rounds, Steps, Calls, Output Tokens, Input Tokens, Cache Tokens, Cache Hit Rate, Last Active.
- Sorted by Last Active in descending order by default.
- Cross-workspace sessions are listed together, marked as
cwdon each row. - Summary chips display: number of sessions, total rounds, total steps, total model calls, total tokens.
Cache Hit Rate¶
v1.0.6 introduces a cache hit rate column:
Hit Rate = Cache Reads / (Input + Cache Reads)
Displays “—” when both numerator and denominator are 0.
Session Details¶
After clicking on a session, you can view:
- Session Info Card
- Tool Call Table: Count, Total Duration, Failure Count
- Per-call Model Call Detail Table: Time, Model, Termination Reason, Input, Output, Cache, Tool
Refresh and Delete¶
- The page displays the scan time.
- Supports manual “Refresh”; the page auto-refreshes every 60 seconds.
- List results are cached for 30 seconds;
?refresh=1forces a rescan. - Since v1.0.2, there is a “Delete” column at the far right of the overview table; after clicking the red confirmation modal, the corresponding session directory
~/.dsh/sessions/…/<sessionId>(includingsession.jsonl.zstd) is deleted.
Loading Archived Sessions¶
Since v1.0.3, the overview table has a “Load” column. For archived sessions, a green “Restore” button is displayed. Clicking it removes the session ID from global.archivedSessionIds in the DSH storages/workspace.json, causing the session to reappear in the DSH conversation list. This operation takes effect after restarting DSH Web.
Installation and Activation¶
Environment Requirements¶
- Node engine requirement:
>=22 - The plugin reads the session directory accessible by the current
dshprocess; please check the source code and MIT license before installing.
Install from GitHub¶
dsh plugin --profile web add github:wellcover/dsh-conversation-stats
To lock to a stable version tag:
dsh plugin --profile web add github:wellcover/dsh-conversation-stats#v1.0.6
Install from Source¶
cd dsh-conversation-stats
npm pack
dsh plugin --profile web add dsh-conversation-stats-1.0.6.tgz
Restart¶
Restart dsh web after installation, or reopen the desktop application.
Manual Installation¶
If pnpm is not available, you can manually install using the steps below:
- Copy the package to
~/.dsh/profiles/web/node_modules/dsh-conversation-stats - Append
"dsh-conversation-stats"todsh.profile.bundlesin the profile’spackage.json - Append to
cordis.patch.yml:
- insert:
- id: conversation-stats
name: 'dsh-conversation-stats'
inject:
- fs
- webServer
- Restart
dsh web
Typical Usage¶
- Open the “Session Statistics” tab at the top of the DSH Web GUI.
- View the overview table, summary chips, and session details.
- Click “Refresh” when a rescan is needed, or wait 60 seconds for auto-refresh.
- Click “Restore” for archived sessions, then restart DSH Web.
- To confirm deletion of a session, operate on the “Delete” column at the far right of the overview table and wait for the confirmation modal.
Data Specification¶
- Session scan path:
$DSH_HOME/sessions, defaults to~/.dsh/sessions. - Data files:
.jsonl.zstdsession logs, parsed directly without persistent listening. - Token fields:
inputTokens,outputTokens,cacheReadTokens,cacheWriteTokens; different providers may be missing certain fields, defaulting to 0. - Cache hit rate: Cache Reads / (Input + Cache Reads).
- List cache is 30 seconds;
?refresh=1forces a rescan; page auto-refreshes every 60 seconds.
Suitable Scenarios and Notes¶
Suitable for these needs:
- Need to quickly verify round counts, step counts, and token usage for multiple DSH sessions in the Web GUI.
- Need to view tool call duration, failure count, model call details, and termination reasons.
- Need to manage historical sessions, including deleting sessions or restoring archived sessions.
Notes:
- The plugin runs with the permissions of the current
dshprocess and may read and delete session directories; it is recommended to read the source code and confirm the MIT license before installing. - If
DSH_HOMEpoints elsewhere or~/.dsh/sessionsis empty, the list may be empty. - If there is no “Session Statistics” tab at the top, first confirm that the profile bundles include this package and restart.
- If prompted that session statistics failed to load, check if the plugin line exists in
cordis.patch.ymland ifinjectincludesfsandwebServer, then restart. - Deleting a session deletes the corresponding directory, not just hides it from the interface.
- Restoring an archived session only takes effect after restarting DSH Web.
Links¶
GitHub: https://github.com/wellcover/dsh-conversation-stats