nuwa-skill
alchaincyf
你想蒸馏的下一个员工,何必是同事。蒸馏任何人的思维方式——心智模型、决策启发式、表达DNA。Distill how anyone thinks.
PluckSlugSorrow/dsh-session-history-search
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.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:PluckSlugSorrow/dsh-session-history-search
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
A sidebar panel that searches the text of every past Session and jumps back to the conversation a hit came from. Built for the "I know I asked for this somewhere, but in which chat?" case.
dsh plugin --profile web add dsh-session-history-search
Or install it from the plugin market inside the app, and restart once if the panel does not appear right away.
sidebar.panellist, order 8) labelled 历史搜索 / History.main key session-history-search) with a search box, a "只看我发的消息 / Only my messages" toggle, a manual "重建索引 / Rebuild index" action, and result cards.POST /plugin/session-history-search/search
{ "query": "插件", "userOnly": true, "limit": 40, "refresh": false }
{
"query": "插件",
"items": [
{
"sessionId": "…",
"title": "…",
"cwd": "E:\\deepseek\\gerentisheng",
"createdAt": 1762000000000,
"live": false,
"latest": 1762000500000,
"matchCount": 3,
"matches": [{ "seq": 12, "type": "user", "time": 1762000500000, "snippet": "…创建一个可以搜索插件的…" }]
}
],
"stats": { "totalSessions": 41, "scanned": 41, "matchedSessions": 2, "returned": 2, "partial": false, "elapsedMs": 812 }
}
GET /plugin/session-history-search/health reports whether the Session Query service is mounted and how many Sessions are cached.
@deepseek-ai/dsh-session-query-sqlite indexes with tokenize = 'unicode61'. A run of CJK ideographs between punctuation becomes one token, so 插件 does not match 创建一个可以搜索插件的工具 — Chinese content is effectively unsearchable through that index (this is also why the workspace sidebar's built-in content search misses Chinese).
This plugin therefore uses sessionQuery.listSessions() + filterEvents(id, [{ kind: 'text', text: query }]). The kind: 'text' predicate is the first-party literal, case-insensitive scan over each event's semantic text — it is applied per Session, which keeps Chinese, English, mixed text and partial words all searchable with no word segmentation to get wrong.
Consequences worth knowing:
stats.partial when it runs out.(session, query, userOnly) for 5 minutes (capacity 400), and settled Sessions only. Repeating a search therefore finishes the sessions the previous run could not reach, within the same budget — coverage grows without ever rescanning what was already done. Live Sessions are always re-read.header.cwd === undefined) are skipped, matching what the sidebar shows.openSession cannot address a message inside a Session, so a result opens the Session at its end; the highlighted snippet is what tells you where to look.
| File | Role |
|---|---|
index.js |
Host half: the two routes, the per-Session text scan, the cache. Injects webServer, sessionQuery, connection. |
client.js |
Browser half: locale dictionaries, sidebar icon, panel view. No CSS file, no Client package imports, theme tokens only. |
cordis.patch.yml |
Bundle patch that inserts the plugin. |
locale/zh.json, locale/en.json |
Marketplace display metadata. |
icon.svg |
Package icon. |
sessionQuery: the panel renders a normal error with a retry action instead of crashing the slot.connection service marks untrusted are refused before any work happens.CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: session。