When interacting with long conversations in the DSH Web interface, quickly locating historical questions is a common pain point. The dsh-indexbookmark plugin addresses this need by adding an index button on the right side of the input field. It is maintained by cuhaitiang0405-collab and is open sourced under the MIT license.
Core Features¶
Question Index
The plugin lists all user or message entries in the current session, sorted chronologically with global sequence numbers.
Click-to-Locate
Clicking any entry in the list automatically scrolls the conversation view to the corresponding message and highlights it with a flash for 1.6 seconds.
Search Filtering
The panel includes a built-in search box that supports case-insensitive substring matching. The header displays the current number of matches and the total count in real time.
Paged View
Supports customizing the number of items displayed per page (10 / 30 / 50 items). The pagination control uses the ‹ 1/3 › format and provides global page numbers.
Lazy Loading and Pagination
The panel fetches data only when opened and loads up to 200 messages per request. For earlier messages, you can load them on demand via the “Load Earlier Questions” button.
Session-Level Memory Cache
If the same session is reopened within 60 seconds, the panel reads directly from memory, providing a zero-request, zero-processing startup experience. The cache uses an LRU strategy and keeps up to 5 sessions.
Interaction and Adaptation
Panel expansion and collapsing include fade-in and fade-out animations. Clicking outside the panel or pressing Esc closes the panel. Wheel events inside the panel are captured and do not trigger page scrolling. For theme adaptation, all style variables are based on DSH theme variables (--dsw-alias-*), supporting automatic light and dark mode switching. Interface strings support both Chinese and English and switch with the interface language.
Install and Enable¶
Before installation, make sure the environment has the dsh CLI tool and pnpm installed (dsh plugin depends on pnpm).
dsh plugin --profile web add github:cuhaitiang0405-collab/dsh-indexbookmark
After installation is complete, restart the web version of DSH to apply changes.
dsh web
Usage Steps¶
- Open any session that contains historical messages.
- Click the ☰ button on the right side of the input field; the panel pops up.
- Enter a keyword in the search box to filter questions, then click an entry in the list. The conversation automatically scrolls to the location and highlights it.
- If there are many messages, adjust the number of items per page at the bottom of the panel, or click “Load Earlier Questions”.
- Click outside the panel area or press
Escto close the panel.
Use Cases and Notes¶
This plugin is suitable for developers who frequently need to review and jump between specific questions in long conversations. The plugin runs with the current dsh process permissions; it is recommended to check the source code and license before installation.
Known Limitations
- Location matching uses text prefix matching (the first 40 characters). If the prefixes are identical, it may locate an earlier message.
- The index only includes messages whose source is
append(appended), consistent with the actual conversation rendering. - The search feature only covers the questions currently loaded in the panel.
- The cache is at browser memory level; refreshing the page (F5) clears the cache.