DSH Plugins Marketplace

DSH Plugins

Plugins

/

Sessions & Messages

/

dsh-session-find

d

dsh-session-find

Identified

Literal full-text search across every DSH session log (Chinese sentences work, where the built-in FTS5 tokenizer fails), as a right-sidebar panel that scrolls to the matching line, plus a session_find

dsh-session-find

DeepSeek Harness 的会话原文检索插件:绕开内置 FTS5 分词,在全部会话日志里按字面文字搜索(中文整句也能搜到),并定位到会话、轮次、步骤与角色。

内置的 session_search 和侧边栏搜索走 SQLite FTS5 unicode61 分词器,中文整句基本搜不到。本插件直接扫描 $DSH_HOME/sessions 下的原始 .jsonl.zstd 日志做字面子串匹配。

两个入口

入口用途
右侧栏面板会话 header 右缘的放大镜按钮打开。搜索、按角色筛选、双击命中跳转到该会话并滚动到那句话(蓝色脉冲高亮 2.6 秒)。
session_find 工具模型可直接调用。说「帮我找找哪次对话里说过 XXX」即可。

两者共用同一套检索核心(lib/search.js),只有一份逻辑。

覆盖的内容

按 7 类角色分离正文:

用户 · 助手 · 思考(模型推理) · 工具调用 · 工具结果 · 标题 · 待发消息

每条命中给出:

  • 会话标题与 sessionId(标题会重名,ID 才是唯一依据)
  • 事件 seq(指回具体事件)
  • 第几轮 / 第几步 / 角色 / ISO 8601 时间
  • 命中位置两侧各 N 字符的上下文片段

关于日志格式

会话日志是 session.v<N>.jsonl.zstd,由多条 zstd frame 顺序追加而成。Node 的 zstdDecompressSync 只解第一帧,必须按帧魔数 28 B5 2F FD 切片逐帧解压。

轮次号优先取 turn/start 事件自带的 data.turn(权威值),缺失时才退回自增计数。

只读

不改会话日志、不改任何配置。

索引缓存在 $DSH_HOME/cache/dsh-session-find/index.json,按 (mtimeMs, size) 增量更新。删除该目录即强制重建。

安装

dsh plugin --profile <profile> add dsh-session-find

或在 profile 的 cordis.patch.yml 中插入:

- insert:
    - id: session-find
      name: dsh-session-find

安装后重启 DSH(宿主侧工具在启动时加载)。

工具参数

参数类型说明
querystring 必填要搜的字面文字,不区分大小写,上限 512 字符
rolesstring[]只在这些角色里搜。可选值见上
sessionstring限定会话 id 的一段
limitnumber最多返回几条,默认 20,上限 50
contextnumber片段两侧各保留多少字符,默认 100,上限 2000

输出有 24000 字符总预算,超出会截断并说明剩余条数与收窄建议。

HTTP 路由

浏览器面板使用(只读,三条 exact 路由):

GET /session-find/api/search?q=...&roles=用户,助手&limit=50&context=100&session=xxx&case=1&nocache=1
GET /session-find/api/sessions
GET /session-find/api/health

已知限制

  • 跳转精度的实现依赖 DOM 契约。面板通过聊天区的 data-chat-turn 与 [data-conversation-scroll] 属性定位,再在节点内部用 TreeWalker + Range 找到命中那句话。这些属性不是官方公开 API,DSH 升级后可能改名;失效时会退回「只切会话、不滚动」,不会报错。
  • 跨会话跳转有等待。目标会话内容挂载前用 MutationObserver 等待(上限 8 秒),期间不阻塞 UI。
  • 轮次外的事件无法滚动定位(如标题、待发消息),会明确提示。

License

MIT

Comments

Loading…

Similar plugins

dsh-session-history-search

by PluckSlugSorrow

Sidebar search across every past Session for DSH: literal substring matching that also works for Chinese, results grouped per Session with highlighted snippets, one click to reopen that conversation.

Sessions & MessagesManifest valid

★ 0

MIT

JavaScript

Nov 2, 2026

dsh plugin --profile web add dsh-session-history-search

by LeslieWylie

Search, list and read past and current sessions through the harness's own `sessionQuery` service: uses the SQLite FTS5 index where a deployment enables it, and falls back to a bounded newest-first sca

Sessions & MessagesManifest valid

★ 5

MIT

JavaScript

Aug 18, 2026

dsh plugin --profile web add dsh-session-search-pro

by Zn-Dk

Message-level full-text search across DSH sessions via an FTS5 trigram index (user / assistant / steering / tool with per-kind filters), deduplicated results across fork/continued sessions, read-only

Tools & CapabilitiesSessions & MessagesManifest valid

★ 6

↓ 80/wk

MIT

TypeScript

Sep 9, 2026

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

by fomalhaut1998

Ctrl+F find-in-session for the conversation, powered by the session store rather than the DOM - labels every hit by source (you / assistant / reasoning / tool call / tool result / system), groups resu

Development & InfrastructureSessions & MessagesManifest valid

★ 3

MIT

JavaScript

Oct 19, 2026

dsh plugin --profile web add dsh-session-find

Search every DSH chat session and jump straight to the matching message: multi-keyword AND search, scoped to the current session, all sessions or one project, anchored by call id for tool hits, with a

Sessions & MessagesManifest valid

★ 0

dsh plugin --profile web add dsh-session-finder

by 240xu

Cross-session full-text search over persisted DSH session logs: builds an incremental message-level index and returns sessionId, seq, and a short excerpt; exposes an agent tool and a standalone panel.

Tools & CapabilitiesSessions & MessagesManifest valid

★ 0

JavaScript

Oct 21, 2026

dsh plugin --profile web add @240xu/dsh-session-search