dsh-search-plus: DSH Cross-Session Full-Text Search Floating Window

Preface

DeepSeek Harness (DSH) stores a large volume of session logs locally, but its default session search is based on SQLite FTS5 with the unicode61 tokenizer, which treats consecutive CJK characters as a single token and therefore cannot match intra-word substrings. In practice, a query for 妇好 (Fùhǎo) yields hits, while 好修 and 妇 both return 0 results. Switching to trigram still fails to meet the search requirements for two-character Chinese words (e.g., “配乐 / 剧本 / 分镜”).

dsh-search-plus provides DSH with a cross-session full-text search floating panel: press Ctrl+F (or Cmd+F) to open it, search the complete body text across all sessions, support arbitrary Chinese substring matching, group results by session, and click a result to jump directly to that sentence.

What It Is

  • Plugin name: dsh-search-plus
  • Maintainer: pcysanji
  • Category: Memory
  • Description: DSH cross-session full-text search floating panel: Ctrl+F to search all conversation history, arbitrary Chinese substring matching, click a result to locate the sentence.
  • Highlight: Category: Memory
  • License: MIT

Installation & Enablement

Search for dsh-search-plus in the plugin marketplace (dsh.market), or install the npm package from DSH’s plugin page:

dsh plugin install dsh-search-plus          # Choose the command based on your DSH version

For local development, you can use a link: dependency to hook into the profile’s dsh.profile.bundles, then restart DSH after making changes for them to take effect.

Core Features

Opening & Shortcut Keys

The default shortcut is Ctrl+F / Cmd+F. You can also customize the key combination via the Ctrl+F badge in the top-right corner of the floating panel (must include at least one of Ctrl/Alt/Shift). Configuration is stored in localStorage. Press Esc to close. There is also a magnifying glass button on the right side of the session header.

Search Scope

Three scope levels are available:
- All Sessions: Search the body text of all sessions
- This Conversation Only: Only the current session
- Titles Only: Match only session titles; one result per session; clicking opens it at the latest position in the body

Result Filtering & Sorting

  • Time range: All / Today / Last 7 days / Last 30 days / Custom start-end date
  • Workspace: Filter by cwd; the filtering logic is performed on the host side
  • Sorting rules:
    1. At most 6 hits per session (the 6 most recent)
    2. Sessions ordered by message time in descending order; internal sub-sessions like mnemon-run-* are placed last
    3. Within the same session, also ordered by time in descending order (newest first)

Result List & Labels

  • ↑ ↓ to navigate, Enter to open, Esc to close
  • On an empty page, “Recent Searches” (up to 8 entries, with re-search, individual deletion, or clear-all) and “Recent Sessions” (click to open directly) are displayed
  • Left-side label for each result:
  • User message: User
  • Assistant message: Model name (with the deepseek- prefix removed; full name shown on hover)
  • Title search: Title
  • Assistant labels are color-coded by model family: deepseek purple, MiniMax green, spark amber, GPT blue, Doubao red, others gray

Localization & Highlighting

  • Click a result: switches to the corresponding session, scrolls the matched sentence to the center of the screen, and highlights it for 6 seconds
  • If the target message has not yet been loaded into the DOM, it first scrolls to the top to trigger loading, then locates the match
  • Cross-workspace: When clicking a session in another project, it first connects to that workspace before switching; a toast notification is shown on failure

Index & Privacy

  • Only two categories of body text are indexed: user messages and assistant reply bodies; tool call parameters, tool results, reasoning, skill directories, and skill bodies are excluded
  • Only sessions registered in the workspace record and not yet archived are indexed ($DSH_HOME/storages/workspace.json); residual sub-sessions on disk and archived sessions are marked invalid during indexing
  • Index files are stored in $DSH_HOME/cache/session-search-panel/, including:
  • corpus.bin: All searchable body text appended in UTF-8 order
  • docs.jsonl: One line per document, containing session id, seq, type, timestamp, start/end offsets in the corpus, and generation
  • state.json: Size/mtime/generation of each session log file, used for incremental catch-up
  • The plugin only reads $DSH_HOME/sessions, makes no network requests, and everything runs locally

Index Maintenance

  • 3 seconds after the plugin starts, it performs a background catch-up, re-reading only session logs whose size/mtime has changed
  • When a session log is compacted and rewritten (shrinks), the old body text for that session is invalidated (generation +1); if invalidated bytes exceed 30% of the corpus, a full rebuild is triggered
  • Manual index rebuild: GET /api/dsh-search-plus/reindex
  • While the index is not yet ready, a Building index X/Y indicator is shown at the top

Known Limitations

  • Localization relies on text matching rather than true anchors: DSH’s conversation flow does not have DOM attributes keyed by seq (only data-conversation-session / data-conversation-scroll / data-conversation-region), nor any scrollIntoView-like API
  • Very old sessions require continuous upward pagination to find the sentence; if it exceeds ~28 seconds, localization is abandoned and only the session switch is performed
  • Only indexes local $DSH_HOME/sessions; remote devices are not included
  • To troubleshoot “click does nothing,” check $DSH_HOME/cache/session-search-panel/diag.log, which records each step a click goes through (open-ok / open-failed / connect-workspace / no-switch) and service probe results

Use Cases & Notes

Ideal for developers who need to quickly retrieve specific information from a large volume of historical sessions, especially for Chinese substring search. The plugin runs with the permissions of the current DSH process. It is recommended to review the source code and license before installing.

Conclusion

dsh-search-plus achieves cross-session search for arbitrary Chinese substrings via a corpus + offset table approach without relying on a tokenization index, and integrates localization, highlighting, and filtering into a single floating panel. It is well-suited for development scenarios where conversations need to be stored long-term and frequently revisited.

  • Directory page: https://www.skillhub.cn/plugins/pcysanji/dsh-search-plus
  • GitHub: https://github.com/pcysanji/dsh-search-plus
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye