Introduction¶
DeepSeek Harness (DSH) natively provides sidebar search that can only filter sessions by title and invokes sessions.search to search within the body of sessions visible in the current workspace. This imposes two obvious limitations: first, it only searches sessions already loaded in the current workspace, making conversations from other workspaces unsearchable; second, the host uses SQLite FTS5, where quoteFtsData() wraps the entire query as a phrase and the unicode61 tokenizer does not perform tokenization for CJK characters, so Chinese queries must match exactly and continuously—searching for 历史聊天 returns no results, while 加速 can return 9 matches. The dsh-history-search plugin bypasses FTS5 by directly decoding ~/.dsh/sessions/*/session.v4.jsonl.zstd archives, performing native substring/regex matching across all workspaces and all sessions, including long-archived sessions that no longer appear in the sidebar.
Plugin Overview¶
- Name: dsh-history-search
- Maintainer: Noeau-AI
- Category: Memory
- Function: Cross-workspace, cross-session full-text search with CJK fragment matching, displayed as a sidebar panel and inline hits in the search box.
Core Features¶
- Archive parsing: Scans
~/.dsh/sessions/*/session.v4.jsonl.zstd, identifies zstd frames by magic number0xfd2fb528and decodes them; supports RFC 8878 multi-frame format. - Full-text search: Does not rely on FTS5; uses native substring or regex matching; any CJK fragment can be matched.
- Sidebar panel: Registered as a
sidebar.panellisticon entry (order 3), providing a full-page panel; input debounce at 260ms; supports role filtering (all / user messages only / assistant replies only), case sensitivity, regex mode, include tool outputs, include injected context; results are grouped by session with highlighted fragments; clicking a row opens the corresponding session; the panel is resizable at the bottom and displays archive size and cached session count. - Search controls: Can filter by workspace slug (
ws), modification time range (from/to), max number of sessions returned (limit, 1–200, default 30), and max hits per session (per, 1–20, default 3). - Session details & raw content:
/api/sessionreturns the full conversation of a single session (dialog text only by default); supportsany=1to load injected context and tool outputs, with further filtering by role. - Health check:
/api/selfcheckparses the largest archive and returns runtime information (node,frames,broken,decodedBytes,events,wholeFileBytes) along with a one-sentence verdict.
Installation & Activation¶
Install from GitHub (recommended):
dsh plugin --profile web add github:Noeau-AI/dsh-history-search
Or install from the pre-built tarball in GitHub Releases (skips build approval):
dsh plugin --profile web add "https://github.com/Noeau-AI/dsh-history-search/releases/download/v0.1.2/dsh-history-search-0.1.2.tgz"
After installation, you must fully exit and restart DeepSeek Harness. The plugin is loaded at startup; running instances do not support hot-loading. After restarting, a magnifying glass icon entry labeled “History Search” will appear in the sidebar.
Install from source for development:
cd <this repo>
node tools\install.mjs # Creates junction and writes cordis.patch.yml
node tools\install.mjs --check # Check wiring status only
node tools\install.mjs --uninstall
install.mjs will:
1. Create a junction at %DSH_HOME%\profiles\<profile>\node_modules\dsh-history-search pointing to the current source (removing any old @local\dsh-history-search wiring to avoid duplicate loading).
2. Append configuration to %DSH_HOME%\profiles\<profile>\cordis.patch.yml:
- insert:
- id: history-search
name: 'dsh-history-search'
All write operations are first backed up to %TEMP%\dsh-history-search-backup\ (overridable via DSH_HISTORY_BACKUP), committed via temp-file + rename to ensure idempotency.
Typical Usage¶
Click the “History Search” icon in the sidebar to open the search panel. Enter a keyword (e.g., 历史聊天), and the panel will display matched fragments grouped by session. Each result includes the session title, workspace, hit count, and other details. Click a row and DSH will open the corresponding session, allowing you to view or continue the conversation.
Parameters can be combined in the search box (via URL parameters or UI options):
- role: all (default: user + assistant), user, assistant.
- cs=1: Case-sensitive.
- regex=1: Enable regex mode.
- tools=1: Include tool outputs.
- any=1: Include injected context.
- ws=workspace-slug: Restrict to a specific workspace.
- from/to: Filter by modification time (millisecond timestamps).
- per: Max hits returned per session (1–20, default 3).
- limit: Max number of sessions returned (1–200, default 30).
The “Self-Check” button at the bottom of the panel calls /api/selfcheck to diagnose archive decoding capability and the runtime environment.
Use Cases & Notes¶
Ideal for developers and users who need to search for context and conversation records across workspaces and long time spans, especially when quickly locating keywords or fragments from a large number of historical sessions.
Notes:
- The plugin runs with the current dsh process permissions; ensure read access to the ~/.dsh/sessions directory.
- Installing from source creates a junction and writes to cordis.patch.yml; it is recommended to verify the source code and license before installation.
- Version 0.1.6 is a packaging adjustment with no behavioral changes; the marketplace entry will appear on the marketplace site after the PR (e.g., awesome-dsh-plugin PR #16364) is merged and passes CI validation, then the site is rebuilt.
Summary¶
dsh-history-search addresses the limitations of DSH’s native search in cross-workspace and CJK granularity by directly parsing zstd archives to enable full-text retrieval and hit display across all historical sessions. Through the sidebar panel and inline hits in the search box, it provides more complete search capabilities for agent development and long-term conversation management.
References¶
- Plugin directory page: https://www.skillhub.cn/plugins/Noeau-AI/dsh-history-search
- GitHub repository: https://github.com/Noeau-AI/dsh-history-search
- Marketplace entry PR: https://github.com/awesome-dsh-plugin/awesome-dsh-plugin/pull/16364
- Release tarball: https://github.com/Noeau-AI/dsh-history-search/releases/tag/v0.1.6