DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

yuan-xin-9997 /

yuan-xin-9997/dsh-global-session-search

Verified

DeepSeek Harness plugin: search the content of every session - CJK-friendly literal matching, grouped snippets, jump-to-session. Web UI, local-only.

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@89b9d512

Global Session Search

Search every session you have ever had in DeepSeek Harness — messages, tool output, commands, compaction summaries and titles — from one panel, then open the session that matters.

A plugin for DeepSeek Harness (DSH) that adds a search entry to the sidebar and a dialog over the whole app.

中文说明


License: MIT · Version: 1.0.0 · Tested with: DSH 0.2.2-rc.3 (Desktop, Windows 11) · Platforms: Windows, macOS, Linux

Table of contents

  • Why this plugin
  • Features
  • Install
  • Usage
  • How it works
  • Configuration
  • Privacy
  • Compatibility and limits
  • Development
  • Related
  • License

Why this plugin

DSH ships a session search box, but on a stock profile it only matches session titles and workspace names. Two separate reasons cause that:

  1. Full-text content search is opt-in. The shipped session-query-sqlite row is configured with openAt: never, so content hits are disabled until a deployment changes it.
  2. When the index is enabled, it is SQLite FTS5 with the unicode61 tokenizer. That tokenizer treats a whole run of Chinese characters as a single token, so 会议 does not match 今天开了会议讨论项目进度 — the exact query a Chinese-speaking user types first.

This plugin takes the other route. It scans the durable session logs literally, so a keyword matches anywhere inside the text, including CJK substrings, without a tokenizer or query syntax. It also reaches what the built-in path deliberately skips: archived sessions, subagent sessions, sessions from other workspaces, tool results, commands and compaction summaries.

Features

Feature What it does
Literal substring search Case-insensitive for ASCII, exact for CJK. No phrase syntax, no wildcards to escape.
Whole corpus Every stored session under the sessions root: archived, subagent, and cross-workspace sessions included.
Grouped results Up to three snippets per session with the query highlighted, plus match count, title, folder and relative time.
Readable ranking Within a session, user and assistant messages come before tool output; sessions are ordered by their most recent matching activity.
Jump to session Click a row, or press ↑/↓ then Enter, to open that session through the Workspace navigation service.
Keyboard and IME safe Esc closes, Tab stays inside the dialog, and Enter/arrow keys never steal an IME candidate from the input method.
Native look Host theme tokens (light and dark), host modal geometry, and the same 42 px row metrics as the Settings entry above it.
Local only No network calls, no telemetry, no writes: the Host route only reads the session logs.

Install

Requirements: DeepSeek Harness 0.2.x, Web or Desktop. No separate Node.js installation is needed — the plugin runs inside the Harness.

  1. Clone or download this repository:

    git clone https://github.com/yuan-xin-9997/dsh-global-session-search.git
    
  2. In DSH open Plugins → Add plugin and choose the cloned directory. The plugin manager installs the bundle into the current profile.

  3. Enable the bundle when prompted, then reload the page (Ctrl+R / Cmd+R) so the browser half joins the module graph.

  4. The entry appears at the bottom of the left sidebar, just above Settings.

From a source checkout the same step is plugin_manager install_bundle with the directory as target; the bundle then appears in dsh.profile.bundles of the profile's package.json.

Usage

Click Search session content at the sidebar foot (a magnifier icon when the column is collapsed). The panel opens with the input focused.

  • Type — the search runs about 0.3 s after you stop typing, or immediately on Enter.
  • Read — the status line shows sessions, total matches and elapsed time; the footer shows how many session logs were scanned.
  • Choose — ↑ / ↓ moves the selection, Enter opens it, Esc or a click on the mask closes the panel. Clicking a row opens it directly.
  • Range — matching covers user and assistant messages, tool results, commands, compaction summaries, titles, goals, plans, todos, approvals and delivered team messages. System prompts and raw request bodies are excluded so boilerplate does not flood the results.

Each row shows the session title, its workspace folder, the time of the most recent matching event, the number of matches, and up to three snippets. When a session has more matches than shown, the row says so.

How it works

Browser (client.js)                          Host (index.js)
─────────────────────                        ────────────────
sidebar.footer.action  ── click ──┐
shell.overlay dialog   ◄──────────┘
        │  GET  api/global-session-search.search?q=…&limit=…
        ▼
                                  list  $DSH_HOME/sessions/**/session.v*.jsonl.zstd
                                  walk Zstandard frame headers, decompress one
                                  frame at a time, match, drop, yield every 24
        ┌───────────────────────────────  frames so the event loop stays free
        └──► JSON { items[], hits[], counts, timing }
  • Session artifacts are concatenated Zstandard frames, one frame per durable batch. The Host walks frame headers without decoding them, decompresses one frame at a time and releases it, so memory stays bounded by the largest frame rather than the corpus.
  • The scan yields to the event loop every 24 frames. A search on a large history does not freeze chat streaming or the UI.
  • Only content-bearing event types are matched. A raw JSONL line is cheaply gated on its "type" prefix before parsing, and the human text is collected from the parsed event, so JSON escapes never reach a snippet.
  • A new query cancels the running scan. Identical queries within 30 s reuse the previous result instead of rescanning.
  • Role ranking. A session collects up to twelve candidate hits, then the three best are chosen by role (user → assistant → title → tool) before display.
  • Bounded by default. A budgetMs deadline (8 s by default) stops the scan and returns partial results with a notice instead of blocking forever.

Configuration

The Host row accepts two optional settings. Override them in the profile's cordis.patch.yml:

Key Default Meaning
root $DSH_HOME/sessions Sessions directory. Set it only if the JSONL persistence backend was pointed elsewhere.
budgetMs 8000 Deadline for one search, clamped to 1000–60000. When it is reached the response is marked as partial.
- id: global-session-search
  config:
    root: D:/custom/dsh-sessions
    budgetMs: 12000

Privacy

Everything stays on the machine. The panel calls one same-origin route served by this bundle's Host half; that route is authenticated by the page's own session and only reads files under the sessions root. The plugin makes no outbound network request, collects no telemetry and writes nothing to disk.

Compatibility and limits

  • Storage format coupling. The Host reads the dsh-session-persistence-jsonl v4 container (session.v4.jsonl.zstd, concatenated Zstandard frames). A future DSH storage format would need a matching update. Files that do not match the pattern are skipped, not treated as errors.
  • Latency grows with history. On a corpus of roughly 110 sessions and 55 MB of compressed logs a full scan takes about 2–3 s. Larger histories take longer, and budgetMs then returns partial results with a notice.
  • Persisted content only. A message that has not been flushed to the log yet is not searchable.
  • Opens the session, not the message. DSH exposes no cross-session anchor, so the panel cannot scroll to the exact matching event.
  • Attachments by reference only. Binary attachment contents are not searched; their references in the log are.
  • Windows title-bar layout. With the Windows desktop title bar, the host hides the whole sidebar foot when the column collapses, so the icon-only rail entry is not available there — expand the sidebar instead. This matches how the Settings entry behaves.

Development

.
├── index.js              Host half: registers the read-only search route
├── client.js             Browser half: sidebar entry + overlay dialog
├── cordis.patch.yml      Inserts the Host row
├── package.json          Bundle manifest (`dsh.bundle` + `dsh.client`)
├── locale/{en,zh}.json   Display metadata and UI strings
├── icon.svg              Plugin icon
├── README.md             This file
└── README.zh.md          Chinese README

Local checks, no dependencies required:

node --check index.js
node --check client.js
node -e "for (const f of ['package.json','locale/en.json','locale/zh.json']) JSON.parse(require('fs').readFileSync(f,'utf8'))"

To iterate on the Host half without the UI, import apply with a fake context whose connection.fetch.register captures the route, then call it with a Request — the search logic, the scan and the response shape are all exercised without a browser.

The GitHub Actions workflow runs the same checks on every push and pull request.

Related

DSH also ships an opt-in bundle, @deepseek-ai/dsh-experimental-session-search, which exposes five model-facing read tools over the full-text index. It is agent-facing rather than UI-facing, its search is workspace-scoped, and with the index disabled it cannot find content either. The two are complementary: the experimental bundle gives the model tools, this plugin gives the user a panel.

License

MIT © 2026 Yuan Xin

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout
—/ 5

No ratings yet

Verified DSH bundle

Commit 89b9d512abc8

Community comments

No comments yet. Be the first to write one.