Preface¶
When having long conversations in DSH Web, a common annoyance is that if you want to review a previous question, you have to scroll bit by bit. The chat area uses virtualized rendering; once you scroll past a segment, earlier content isn’t loaded yet, so scrolling back means waiting. The left session list is full of “new sessions,” and just looking at the titles doesn’t clarify which is which.
dsh-usage-record addresses these two problems: it adds a vertical navigation track to the left of the chat area, where each horizontal line corresponds to a question, and clicking jumps to it; at the same time, it automatically fills in titles for the session list based on the question content. Below, I will introduce its features, installation method, and precautions.
What is this¶
dsh-usage-record is a DSH client plugin (web platform only), maintained by kkishapppy, and is MIT licensed. One-sentence positioning: a question navigation track on the left side of the DSH Web chat area—each line equals a question, clicking jumps to the corresponding position, supporting fisheye zoom, scroll following, and background full pre-loading.
All data comes from the server endpoint /plugins/dsh-usage-record/questions, extracted from session logs, and is not limited by the chat virtualization window, so the track shows the complete history, not just the currently rendered segment.
Core Features¶
Question Navigation Track and Click-to-Jump¶
The track is displayed on the left side of the chat, where each line represents a question. Hovering shows a tooltip with the question content. After clicking a line, the chat area smoothly scrolls to that question; if the target position hasn’t been rendered (it belongs to unloaded history), the plugin will automatically load it before jumping.
Fisheye Effect and Scroll Following¶
When the mouse moves on the track, the lines enlarge based on their distance from the pointer (σ=10), with padding on the edges to prevent clipping. The reverse is also true: when the chat area scrolls, the question corresponding to the center of the current viewport will be highlighted on the track (i.e., scroll-spy), and the track automatically follows the scroll position.
Background Pre-loading¶
As long as the track is visible, the plugin automatically batches loads all historical questions. Here is a client patch: the batch count for the history RPC is increased to 3000 (official default is 50), corresponding to the HISTORY_BATCH constant in the client source code, which can be adjusted as needed. With this patch, long sessions can achieve instant jumps on click.
Automatic Session Titles¶
The plugin wraps sessionPersistence.list() and adds a title to each row of the session list. The rules are as follows:
- Take the last real question in the session as a summary, with a length not exceeding 30 characters;
- When the last line is too short (fewer than 8 characters, such as “OK” or “1”), automatically merge it with an earlier one;
- During a conversation, the title remains stable, showing the last solidified result, not jumping with every sentence; the title is generated or updated and persisted to disk only after the session has been idle for 30 minutes, and the duration can be configured via
titleIdleMinutes.
The whole process is pure rules plus memory cache plus a single timer; it does not call LLMs or go online. Manual naming has the highest priority: names written in dataDir/titles.json will override automatic titles; the title is not modified if the session data itself already has one.
Installation and Enablement¶
Install from GitHub Release:
dsh plugin --profile web add https://github.com/kkishapppy/dsh-usage-record/releases/download/v0.1.0/dsh-usage-record-0.1.0.tgz
You can also install using a local tgz file:
dsh plugin --profile web add ./dsh-usage-record-0.1.0.tgz
Configuration is optional and is written in profiles/<profile>/cordis.patch.yml:
- id: usage-record
config:
dataDir: 'E:\DeepSeekHarness\data\usage-record' # Default: <cwd>/data/usage-record
Typical Usage¶
Manually Naming Sessions¶
To make a specific session always display a name you chose, edit titles.json (default path E:\DeepSeekHarness\data\usage-record\titles.json), with the following format:
{ "session-xxxx…": "My Name" }
The key is the session ID, and the value is the title. Manual naming has the highest priority; automatic titles will not override it.
Local Development Build¶
After changing the code, you need to rebuild:
npm i
npx -y tsdown@0.22.2 --config ./tsdown.config.ts
Note on how changes take effect: server-side changes require restarting DSH; client-side changes take effect with a hard refresh of the page.
Applicable Scenarios and Precautions¶
Suitable for two types of people: developers who often run long sessions in DSH Web and need to repeatedly review and jump to historical questions; and users whose session lists have accumulated many items and want to recognize the content of each session at a glance.
There are a few points to know before using:
- The plugin relies on the internal DOM structure of the DSH Web client (
[data-chat-flow],[data-chat-anchor-key], scroll containers, etc.). It may become invalid after upgrading the DSH version, which is a common trait of community client plugins; - The track only renders in the session view, and the session must have historical questions;
- The history RPC batch size has been increased to 3000; if you mind this change, you can adjust it at the
HISTORY_BATCHconstant in the client source code; - The plugin runs with the permissions of the current DSH process; it is recommended to check the source code and license before installing (this project is MIT, marked in both README and package.json).
Conclusion¶
dsh-usage-record solves the problem of reviewing long sessions with a single navigation track and conveniently fills in session titles. Implementation-wise, it is pure rules, offline, and has controllable cost. If you also manage long conversations in DSH Web, it is worth installing and trying.
- Plugin Directory Page: https://www.skillhub.cn/plugins/kkishapppy/dsh-usage-record
- GitHub Repository: https://github.com/kkishapppy/dsh-usage-record
It is worth noting that the plugin directory is a community-maintained independent site with no official affiliation with DeepSeek or HF. DSH’s philosophy is “Everything is a Plugin,” and community plugins like this are a daily part of the ecosystem.