Introduction¶
In DSH’s multi-turn sessions, when there are many historical messages, it is inconvenient to manually scroll to locate a specific round of user questions. dsh-turn-nav is a right-side session turn navigation plugin for DSH: it displays turn dots on the right side of the chat window, allows viewing summaries on hover, jumps to the corresponding turn on click, and automatically loads older history.
What is it¶
dsh-turn-nav is a DSH plugin maintained by flyHZJ, licensed under MIT. It does not replace the DSH official chat interface; instead, it uses the shell.overlay global overlay to display a navigation bar on the right side for quickly viewing and locating session turns.
Core Features¶
- Floating Navigation on the Right: By default, it only displays numbered dots, without obstructing chat content.
- Hover Card: When hovering over a dot, a tooltip card appears on the left side displaying “Q + user question summary”.
- Quick Jump: Clicking a dot smoothly scrolls to the corresponding turn.
- Highlight Current Position: Automatically highlights the current turn while scrolling; the highlight is a blue dot.
- Auto Refresh: Automatically rebuilds the navigation when new messages, streaming output, or history loading occurs.
- Auto-load Older History: Automatically calls DSH’s
loadOlder()to complete any previously paginated but unloaded turns, eliminating the need to manually scroll to the top and click “Load Older”. - Non-invasive to Official UI: Uses the
shell.overlayglobal overlay, does not replace or obstruct the DSH official chat interface. - DSH Bundle Compatible: Declares
dsh.bundle.patch, installable viadsh plugin add.
Installation and Enablement¶
Prerequisites before installation:
- DSH is installed and running.
- Node.js is required for building.
- Optional: DSH source code checkout for local building.
Install from GitHub:
dsh plugin --profile web add github:flyHZJ/dsh-turn-nav
Restart dsh web after installation, and the right-side navigation will take effect.
Typical Usage¶
Using After Installation¶
After installing and restarting dsh web, navigation dots will appear on the right side of the DSH chat window.
- Hover the mouse over a dot to view the tooltip card for that turn.
- Click the dot to smoothly scroll to the corresponding turn.
- As you continue scrolling, the current turn will be highlighted.
Local Development and Debugging¶
If using super-injector for runtime injection, execute:
dev_inject_plugin {"dir": "C:/Users/J/Desktop/新建文件夹/dsh-turn-nav"}
After modifying source code and rebuilding, you can execute hot reload:
dev_reload_package {"packageName": "dsh-turn-nav"}
Update and Uninstall¶
Update for bundle installation:
dsh plugin --profile web update dsh-turn-nav
Uninstall for bundle installation:
dsh plugin --profile web remove dsh-turn-nav
Auto-load Older History¶
The plugin automatically calls DSH’s loadOlder() to complete turns that were previously paginated but not loaded, bringing them within the range identifiable by the navigation. By default, it loads up to 200 pages, which can be adjusted via MAX_OLDER_PAGES.
Adjustable Items¶
| Configuration | Default | Description |
|---|---|---|
| Card Min Width | 240px | Minimum width of the hover card |
| Card Max Width | 400px | Maximum width of the hover card |
| Nav Right Margin | 10px | Margin of the nav bar from the right side |
| Nav Vertical Position | 50% | Vertical position of the nav bar |
| Max Older Pages to Load | 200 | Default value of MAX_OLDER_PAGES |
| Summary Length | 60 chars | Length of user question summary in hover card |
Applicable Scenarios and Notes¶
Suitable for developers using DSH for multi-turn, long-session debugging or reading. It reduces the operation of scrolling back and forth to find historical turns in long sessions.
Please note:
- The plugin runs with the current
dshprocess permissions and loads navigation and older history according to the current DSH environment; before installing, check the GitHub source code and MIT license to confirm that the current environment allows the plugin to access the session interface and history loading capabilities. - If the old version
@dsh-external/dsh-turn-navreportsdeclares no dsh.bundle, upgrade to the current versiondsh-turn-nav. - Auto-loading older history defaults to a maximum of 200 pages; if history exceeds this range, you need to adjust
MAX_OLDER_PAGESand rebuild.
Related Links¶
Plugin Directory Page:
https://www.skillhub.cn/plugins/flyHZJ/dsh-turn-nav
Plugin Source Code:
https://github.com/flyHZJ/dsh-turn-nav