dsh-memory-search-plus
A local-first full-text memory search plugin for DeepSeek Harness, enabling fast cross-conversation search, message-level navigation, and intelligent retrieval of your AI coding history.
- Stars
- 1
- Language
- TypeScript
- Created
- Aug 25, 2026
- Updated
- Aug 26, 2026
Introduction
Memory Search Plus for DeepSeek Harness
English | 简体中文
Memory Search Plus is an independent DeepSeek Harness Web plugin that adds local, cross-session, full-text search over all of your conversations. It builds a SQLite FTS5 index (with Chinese word segmentation) in the background, then lets you search everything you have ever discussed — with a ChatGPT/VSCode-style results panel and precise jump-to-message targeting with highlight.
This repository is tagged with the dsh-plugin topic for discoverability.
What it does
- Search across all sessions, not just the open one. Every indexed user message, assistant answer and tool call becomes searchable from one place.
- Full-text index, not a filter. Built on SQLite FTS5 with a custom tokenizer pipeline (Intl.Segmenter for Chinese/English words, CJK bigrams and single characters, English case normalization), so Chinese substrings, English phrases, mixed-language queries and multi-keyword AND queries all work.
- Two-stage search for exact highlighting. Stage 1 reads a bounded FTS candidate window; stage 2 verifies candidates with literal matching, sorts the recalled hits by time, and computes exact
spansfor snippet highlighting.SearchHit.spansare[start, end)character offsets into the full message text (the snippet is only a windowed excerpt), so the client can render precise highlights at any width. False positives from the FTS tokenizer never reach the UI. - Precise message targeting. Results are grouped by session and time-descending; clicking a hit loads older history as needed, scrolls to the exact message and highlights it.
- ChatGPT/VSCode-style UI. A "find in conversations" pill in the wide sidebar opens a floating results panel with role filters (All / User / Agent / Tool). Open it with the pill or Ctrl/Cmd+Shift+F.
- Incremental indexing. New events are appended to the index as they arrive; compaction checkpoints rebuild only their session; removed sessions are deleted. Settings shows rebuild progress. A startup and every-5-minute background reconcile keeps the index consistent. Branch/fork conversations are indexed; true subagent sessions (
origin=subagent) are not. - Runs fully locally. The index lives in
${DSH_HOME}/storages/memory-search/index.db(WAL). The plugin performs no network requests and collects no telemetry.
Performance targets
| Scenario | Target |
|---|---|
| Local index write path, 1M synthetic messages | < 60 s |
| Query (mixed Chinese/English/phrase) | < 300 ms |
| Incremental update | only changed events are touched |
Measured numbers from the bundled benchmark (scripts/bench.mjs) are recorded in the QA output.
Install
Requirements: DeepSeek Harness 0.1.1-rc.2 or later and its supported Node.js version (^22.19 || >=24).
Install the plugin into the Web profile, then restart Web (or your existing dsh-tunnel / gateway process, so the Host half reloads):
dsh plugin --profile web add github:the-thinker0/dsh-memory-search-plus
dsh web
Local development install from a clone of this repository:
dsh plugin --profile web add ./
The repository commits the required lib/ artifacts, so these installs do not ask pnpm to run a package build script.
Open the actual URL printed after dsh web: in the startup output (default http://127.0.0.1:3080).
Remove the plugin with:
dsh plugin --profile web remove dsh-memory-search-plus
Note: the plugin registers
memory-searchas its Cordis plugin id; removing the package removes the whole plugin, including its index database (a prompt will confirm removal of the registered patch).
How this differs
- vs. built-in sidebar search / sidebar-conversation filters (e.g. dsh-better-sidebar): those filter or search within the currently open conversation. Memory Search Plus runs its own cross-session full-text index and jumps to the exact message in any conversation.
- vs. conversation-landmarks: that plugin provides a navigation rail over the open conversation's turns. Memory Search Plus is content search — find what was said, then jump.
- vs. official conversation search in the harness: this is a community index of your local session storage with Chinese-aware segmentation and message-level targeting; nothing leaves your machine.
Develop
pnpm install
pnpm run check # typecheck + build (tsdown) + pack dry-run
Layout: the package is a Cordis Service plugin. src/index.ts is the Host half (SQLite FTS5 indexer + two-stage search API, exported as { name, inject, apply } via lib/index.js); src/client/ is the Web half (sidebar pill + results panel, delivered as lib/client.js wrapped in window.__ModuleLoader__.load(...)).
The host API contract — module interfaces (tokenize, extractSessionEventText, anchorKeyFor, SearchIndex, computeSpans/buildSnippet), RPC result shapes and the degradation guarantees — is specified as an executable acceptance contract in tests/README.md (see its QA test contract section). Unit tests live under tests/; the reproducible benchmark is scripts/bench.mjs (--impl lib/index.js measures the real implementation).
Privacy
Everything is local: session events are read from your local DSH storage, indexed into a local SQLite database, and the plugin registers no network calls, no analytics, no telemetry and no external CDN assets. The only persistence is the local memory-search/index.db.
Status
This is a community project, not an official DeepSeek release. Current compatibility target: DeepSeek Harness 0.1.1-rc.2.
Feedback
Report bugs or request features in Issues. Please search existing issues before opening a new one.