DSH Hub

Zn-Dk/dsh-session-explorer

dsh-session-explorer

UIWeb UI0 GitHub stars· updated 2026-08-27

DSH Web out-of-tree plugin: message-level full-text search + timeline visualization for sessions.

Install

npx @deepseek-ai/dsh plugin --profile web add dsh-session-explorer

Restart `dsh web` after install. Bundle APIs can change during the developer preview.

README badge

dsh-session-explorer DSH Hub badge
[![DSH Hub](https://dshhub.dev/badge/dsh-session-explorer.svg)](https://dshhub.dev/plugins/dsh-session-explorer)

Paste this into your README. The star count updates with every catalog sync.

From the README

Excerpt from Zn-Dk/dsh-session-explorer, cleaned of badges and images.

dsh-session-explorer

English | 中文

Out-of-tree DSH Web plugin: message-level full-text search across sessions. Search a specific message (user / assistant / tool / system-injected), preview context read-only, and jump to the real session with one click.

Features

  • Message-level full-text search — user / assistant / system-injected text at high weight, tool name / arguments / error summary at low weight. FTS5 trigram index supports arbitrary substrings without Chinese tokenization; queries shorter than 3 characters fall back to LIKE matching.
  • Four message kinds — user / assistant / steering (plugin-injected prompts, skill-catalog, skill-invocation, compaction summaries, …) / tool (tool name, arguments and error summary searchable).
  • Deduplicated results across fork/continued sessions — fork/continuation sessions share parent history, so the same message is stored once per session; search groups by (seq, kind, text) and keeps the session with a non-empty title and the latest index time.
  • Read-only preview — focused hit plus a surrounding context window; the focus message auto-scrolls to the center of the viewport, and one click opens it in the real session.
  • Session browser entry — sidebar tool entry + an overlay panel inside the conversation column (no global overlay); the top-left "back to session" button closes the panel.
  • i18n — full zh/en coverage (panel / dialogs / search / preview); language follows the DSH Host locale service (instant switch in Settings → General), no manual setting needed.
  • Rebuild (incremental / full + health check) — incremental mode fast-diffs via engine revision tokens (O(1) skip), re-flushes changed sessions by content fingerprint and removes ghost sessions; full mode resets the database and rebuilds session by session. The rebuild dialog runs a health check (integrity + table readability) and recommends a mode.
  • Index status (corrupted-session classification) — indexed / stale / failed (source log corrupted, not indexable); opening the panel triggers a light sync (live + not-yet-indexed sessions), turn end syncs incrementally, and startup reconciles.

Installation

From npm (recommended)

dsh plugin --profile web add dsh-session-explorer

Package page: https://www.npmjs.com/package/dsh-session-explorer

Build from source

pnpm install
pnpm pack
dsh plugin --profile web add ./dsh-session-explorer-*.tgz

After installation, restart dsh web; the "Session Explorer" entry appears in the sidebar tool area. The index lives at ~/.dsh/storages/session-explorer.sqlite (auto-created and indexed on first use).

Development

pnpm install
pnpm test      # 41 unit tests (requires Node ≥ 22.5, uses node:sqlite)
pnpm build     # tsc + rolldown client bundle

Architecture

  • src/protocol.ts — RPC contract types (shared Host/Client)
  • src/transcript.ts — SessionEvent log → indexable message entries, pure fold layer (zero deps, unit-testable)
  • src/indexer.ts — SQLite FTS5 trigram derived index (host side, application_id + user_version dual check, 0600 perms)
  • src/rpc.ts — RPC validation and routing
  • src/index.ts — host assembly (event sync + RPC + startup reconciliation)
  • src/client/ — browser bundle (sidebar entry + search/preview views + conversation-column overlay panel)

Known limitations

Related plugins