Introduction¶
When handling long conversation flows in DeepSeek Harness (DSH), locating a specific question in a long list can be difficult. The dsh-qnav plugin adds a navigation bar on the right edge, enabling quick location and jumping to each actual user question. It is built for the DSH Web client, supports multiple platforms, and is maintained by lin-nanxing.
Core Features¶
- Precise extraction
Usesdata-chat-flow-kind="user"to read actual user questions, filtering steering/pending/context lines; if unavailable, falls back to[class*="userRow"]. - Element-reference navigation
StoresflowItemDOM element references rather than matching text prefixes; clicking directly callsscrollIntoView(), avoiding deduplication errors, prefix conflicts, and @ reference text-node splitting issues. - Automatic filtering of non-user rows
Excludes unsubmitted input and system-injected context usingdata-pending-steeringanddata-chat-flow-kind, ensuring there are no misleading empty checkmarks. - Proportional layout
Checkmarks are evenly distributed along the right edge, with density automatically adjusted as the number of questions increases. - Dark mode support
Uses CSScolor-scheme: light darkand@media (prefers-color-scheme: dark)to automatically switch highlight colors with the page theme. - Hover tooltip
On hover, displays “N.” on the left side; the tooltip is anchored to the left to avoid viewport overflow, and its size is measured before positioning to prevent flickering. - Current position highlight
Updates the highlighted state usinggetBoundingClientRect().top <= 120px, instead of fragile text-tree traversal, and is not affected by references in answer content. - MutationObserver synchronization
When content changes, rescans and renders checkmarks (with a 500 ms debounce); the highlight polling interval is 600 ms. - HMR safety
apply(ctx)returns a cleanup routine responsible for destroying observers, timers, and injected DOM/stylesheets, preventing leaks during hot reload or when disabled.
Installation and Activation¶
- Clone the repository:
git clone https://github.com/lin-nanxing/dsh-qnav.git
cd dsh-qnav
- Build the source code (only required when modifying source code):
npm run build
- Install via DSH:
dsh plugin --profile web add link:.
Use Cases and Limitations¶
- Visibility restriction: Only already rendered items can be scrolled to; questions beyond the pagination boundary (the “Load Earlier” cutoff) cannot be jumped to yet.
- Very long sessions: When the number of questions exceeds 500, checkmark density increases; a search panel will be used to optimize this in the future.
- User questions only: Currently only user
flowItemelements are used as jump targets; assistant answers are not clickable.
Conclusion¶
dsh-qnav targets the DSH Web client and can be used on multiple platforms without modifying Electron native code. By manipulating DOM references directly and using MutationObserver, it provides stable navigation for long conversation flows.