@ryuu-64/dsh-find-all 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +14 -2
- package/docs/compatibility.md +62 -0
- package/lib/client.js +1169 -212
- package/lib/index.js +12 -10
- package/lib/search-host.js +223 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.12
|
|
4
|
+
|
|
5
|
+
- Add opt-in archived conversation search with explicit Unarchive and open actions, current-state verification, and cancelled navigation when the search changes.
|
|
6
|
+
|
|
7
|
+
- Name the independent entry “对话全文搜索” / “Full-text conversation search”, and clarify title/body matching in the input while retaining the title-only filter.
|
|
8
|
+
|
|
9
|
+
- Keep conversation search compact with the native headless Modal, an input-first header, stable search controls, independently scrolling two-line results, and a quiet completed-result count.
|
|
10
|
+
|
|
11
|
+
- Search ordinary unarchived conversations by title and saved user/assistant body text by default, using public immutable Host reads even with the official default FTS provider disabled.
|
|
12
|
+
- Match Chinese short substrings, English and literal code with the same Unicode case-insensitive rule as in-conversation find; return real snippets and original-text highlight ranges.
|
|
13
|
+
- Add title-only mode, bounded conversation batches, explicit continuation and progress, cancellation, and partial/read-failure states without allowing title matches to displace body results.
|
|
14
|
+
- Preserve query and results when opening a conversation and returning. Keep the current-conversation find handoff without claiming an exact snippet-to-message jump.
|
|
15
|
+
- Keep compaction-era append transcript text, exclude model-only replacements and superseded assistant retries, and avoid a persistent second index or body-bearing diagnostics.
|
|
16
|
+
|
|
3
17
|
## 0.1.11
|
|
4
18
|
|
|
5
19
|
- Match the Host’s filled three-dot options icon and show readable idle, searching, empty, and incomplete count states; only available results open match-number navigation.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# dsh-find-all
|
|
2
2
|
|
|
3
|
-
DeepSeek Harness(DSH
|
|
3
|
+
DeepSeek Harness(DSH)的对话查找插件。按 **⌘F / Ctrl+F** 查找当前对话;点侧栏的「对话全文搜索」寻找其他对话。
|
|
4
4
|
|
|
5
5
|
## 安装
|
|
6
6
|
|
|
@@ -21,7 +21,19 @@ DeepSeek Harness(DSH)的当前会话查找插件。按 **⌘F / Ctrl+F** 查
|
|
|
21
21
|
|
|
22
22
|
「完整会话」搜索已保存的消息;如果无法使用,可改选「已加载内容」。不搜索图片里的文字或附件内容。最多显示前 5000 个结果;没搜完或无法准确跳转时会提示。
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
## 对话全文搜索
|
|
25
|
+
|
|
26
|
+
点侧栏的「对话全文搜索」,无需先打开聊天。也可从当前查找栏的 `⋯` 进入,并带上关键词。
|
|
27
|
+
|
|
28
|
+
默认同时搜索标题和正文,也可勾选「仅标题」。范围是当前连接服务中、所有工作区的普通对话,默认不含归档;勾选「包含归档」后可查看归档命中及正文摘要,主动点击「取消归档并打开」才会恢复并打开。正文直接使用宿主公开的已保存历史读取能力,不要求开启 SQLite 全文索引,也不改变宿主的默认配置。
|
|
29
|
+
|
|
30
|
+
输入中文短词、英文或代码片段即可按字面子串查找,不区分大小写。结果显示标题、工作区和真实正文片段;标题和片段中的命中会高亮。输入后会自动分批扫描并逐步显示结果;一页结果满后,点击「继续加载结果」查看更多。正文结果不会被标题结果挤掉。界面会区分尚未搜完、读取失败、已停止和确实没有结果。
|
|
31
|
+
|
|
32
|
+
点击结果会打开该对话,带上关键词继续会话内查找;「返回搜索结果」保留查询和列表位置。摘要不承诺直接跳到原句。跨对话匹配的是保存的文本块,含原始 Markdown;跨格式标记的渲染后短语不保证匹配。详细范围和限制可在「搜索说明」查看。
|
|
33
|
+
|
|
34
|
+
普通用户消息和助手已完成的正文包括压缩前仍可阅读的历史;不搜索工具、思考过程、子代理、附件、图片文字或未发送草稿。每次查询固定候选对话,期间新增或改动的内容可在输入框按 Enter 重新搜索。极大或无法读取的会话会显示未完整搜索,不会冒充零命中。
|
|
35
|
+
|
|
36
|
+
搜索只使用当前连接的 DSH 服务,不改聊天记录,不把搜索词或正文发送到外部 AI。浏览器只接收匹配片段;插件不建持久正文索引。首次搜索需要逐个读取会话,大型历史可能较慢。当前宿主缺少所需公开接口时会提示服务不可用,原有会话内查找仍可使用。
|
|
25
37
|
|
|
26
38
|
## 更新
|
|
27
39
|
|
package/docs/compatibility.md
CHANGED
|
@@ -1,3 +1,59 @@
|
|
|
1
|
+
# Full-text conversation search
|
|
2
|
+
|
|
3
|
+
The Full-text conversation search entry targets public DSH `0.2.0-rc.2` at [`639ed015`](https://github.com/deepseek-ai/deepseek-harness/tree/639ed015397290b3745d163aafe02ffee4aa3f84). This is the implementation target, not a new claim that every historical peer version or Electron Desktop has passed acceptance. Package version and peer ranges remain unchanged.
|
|
4
|
+
|
|
5
|
+
## Host and client contract
|
|
6
|
+
|
|
7
|
+
The same package now contains an optional Host half. A Cordis child scope acquires `connection`, `sessionQuery`, and `workspaceRegistry`; the authenticated `connection.fetch` registry owns POST `/api/dsh-find-all/search`. The browser addresses `api/dsh-find-all/search` relative to the document, preserving reverse-proxy mount paths. There is no new listener, direct database/log reader, provider replacement, or external upload. Missing services leave current-conversation find installed and make cross-conversation search explicitly unavailable.
|
|
8
|
+
|
|
9
|
+
`sessionQuery.listSessions(signal)` establishes Host identity/cwd/origin availability; `observeSession(id, { signal, projectionMode: 'none' })` supplies each immutable cut. The official Web default remains `session-query-sqlite.openAt: never`. No FTS handle, extra persistent index, or package dependency is required.
|
|
10
|
+
|
|
11
|
+
The root sidebar entry and current find menu use native Modal/Button/Input/Checkbox primitives. The search surface uses the public `Modal` headless contract: `title` still supplies the dialog aria-label, while the Host owns the mask, focus trap, Escape handling and return focus. A top-aligned card stays inside the native padding and available height, keeping the input and scope row stationary without reserving a large empty result area. The two-line result region grows to a bounded height and scrolls independently; low-frequency expanded help is separately bounded. Search progress, partial states and paging actions stay below results; a successful complete scan shows a short result count. Details remain collapsed unless requested. No default shortcut is added or replaced. Client catalog membership comes from ready `sessions.list.ids`, not arbitrary `byId` entries. Ordinary, nonblank rows across connected workspaces are eligible. Archived conversations are excluded by default; the independent Include archived checkbox expands this scope. The Host independently excludes missing-cwd and subagent sessions, and excludes archives in the default scope, including candidates forged into the request. Workspace labels are display metadata only. This scope does not inherit another view's archive toggle.
|
|
12
|
+
|
|
13
|
+
Archived results use a noninteractive row with an Archived label, matched snippet and explicit Unarchive and open button. The public `uiWorkspace.unarchiveSession` command is followed by a fresh, ready workspace/session snapshot check before opening. A successful RPC alone does not prove the session exists or the latest archive state has synchronized. An uncertain result stays in search with a retry message; confirmed unarchive followed by an open failure is reported separately. Only one restore RPC runs at a time. Changing query, mode or scope, closing search, choosing another result, or resetting the connection invalidates its automatic navigation. The public command has no cancellation signal: these actions do not undo a restore already sent, and the extension never automatically rearchives a conversation. Search scope changes discard prior results and continuation tokens.
|
|
14
|
+
|
|
15
|
+
## Matching and transcript coverage
|
|
16
|
+
|
|
17
|
+
A query is a trimmed literal substring of at most 500 UTF-16 code units, without null characters. Escaped `RegExp(..., 'giu')` uses the existing in-conversation matcher's locale-independent Unicode simple case folding, without normalization or full-fold expansion. Punctuation, quotes and code operators cannot become regex or SQL syntax. Chinese two-character substrings can match within longer Chinese text. Titles and body use the same rule.
|
|
18
|
+
|
|
19
|
+
Body search includes append-origin `user/message` with `source.kind === 'user'`, and the last settled append-origin `assistant/message` for each turn/step. Step start or `llm/retry` clears an earlier settlement. This follows the official Chat transcript rather than the model's current surface: compaction-shadowed append text remains searchable, while model-only replacement copies, checkpoints, reasoning, tools, queued drafts and assistant attempts are excluded. The public append-transcript contract is documented in [session/surface.ts](https://github.com/deepseek-ai/deepseek-harness/blob/639ed015397290b3745d163aafe02ffee4aa3f84/packages/core/session/src/surface.ts#L78-L92). User text blocks are joined as the existing reader presents them; assistant text blocks stay separate.
|
|
20
|
+
|
|
21
|
+
Body matching uses saved text including raw Markdown syntax. It does not promise to find a rendered phrase spanning formatting markers. Snippets and their exclusive-end UTF-16 ranges come from exactly the same text and immutable cut; the response also carries message ID, event seq, content index and observation cursor. The client validates ranges and renders text/mark nodes, never source HTML. These raw offsets are not DOM coordinates. Opening a result retains the reviewed conversation-find handoff and does not claim an exact snippet jump. If the selected conversation scope/projection has no match, its existing notice explains the difference and offers Return to search results.
|
|
22
|
+
|
|
23
|
+
## Batches, consistency and limits
|
|
24
|
+
|
|
25
|
+
Start freezes the client's ordered eligible IDs; catalog titles are fallback hints only. Native cold-list metadata can lack a title cache. In title/body mode, the latest `session/title` event from the same observation supplies the actual title; title-only uses the public `readTitleSnapshot(id, signal)` to obtain the saved title, without body matching. Returned titles replace missing or stale UI metadata in result rows. The Host processes at most eight candidates per request and yields between sessions; a 100 ms soft batch budget is checked between sessions, not represented as a hard latency bound. The client automatically requests successive batches, including empty ones, until roughly 20 additional results are displayed or every candidate is scanned. Continue requests the next result page, not each internal scan batch. Title/body results share scan order without a title-first truncation. Title-only does not call the body scanner or `observeSession`; the public title reader may still read a complete cold log internally. It cannot promise metadata-only I/O.
|
|
26
|
+
|
|
27
|
+
A random request ID owns one in-memory search. Opaque continuation tokens bind its query, mode, fixed scope, protocol version and frozen candidates. Concurrent next requests receive 409. The preceding continuation response can be replayed without advancing again; replay rechecks visibility and expires with 410 if a returned conversation disappeared or became excluded by scope. Included archives retain a freshly checked archive flag on replay. Every page also rechecks visibility before sending snippets. This is a per-session scan, not a global instantaneous snapshot. Each conversation is read once per scan; new or edited conversations require a fresh search (Enter in the input). Historical pages already shown are not retroactively rewritten, but the client always filters displayed/opened rows against its current catalog.
|
|
28
|
+
|
|
29
|
+
Failed reads preserve confirmed title matches and increment failure counts. Policy changes or hard per-session limits increment skipped counts. Complete scanning plus any failed/skipped count remains incomplete coverage; zero matches is asserted only with complete, failure-free coverage. The scanner caps one observation at 200,000 events and 32 Mi UTF-16 text units, and searches text in 65,536-unit chunks with overlapping boundaries and cancellation yields. These limits do not bound the Host's internal cold restore allocation: the public API still prepares a whole session, and its synchronous restore cannot be instantly interrupted. Very large sessions can therefore delay other work before the plugin gets control.
|
|
30
|
+
|
|
31
|
+
Query/mode changes, Close, Stop, connection reset and scope withdrawal abort the HTTP read, invalidate a client generation and send a best-effort explicit cancellation for its own request ID. Leases are disposed in `finally`. Completed or confirmed partial result rows remain available for Back; a cancelled incomplete scan requires Retry. Successful results have no Retry action; Enter refreshes the query with composition/repeat guards. A search expires after five idle minutes, at most eight searches coexist, and a start accepts at most 100,000 unique candidates with bounded request/title sizes. The Host keeps only query/catalog state and one bounded replay page of snippets in memory; it clears state on cancel/disposal/expiry. Neither searches nor body snippets are logged or persisted by this plugin.
|
|
32
|
+
|
|
33
|
+
## Verification for this candidate
|
|
34
|
+
|
|
35
|
+
- Reproducible client build, Host/client syntax, registration, whitespace checks, and the existing 17 tests in `text-matching.test.mjs`, `bundle-registration.test.mjs`, and `client-registration-check.test.mjs` pass. No test files or assertions were added to the repository; no historical long CI or release matrix was run.
|
|
36
|
+
- A bounded inline protocol exercise checks exact source ranges across chunk boundaries, Unicode/literal matching, append/replacement/retry selection, title preservation after read failure, idempotent cursor replay, query mismatch, archive invalidation, concurrent next rejection, explicit cancellation, title-only without observation, and lease disposal.
|
|
37
|
+
- A real official RC2 service probe uses Session/JSONL cold fixtures and `SqliteSessionQueryEngine` with `openAt: never`; native FTS is confirmed disabled and no index file appears. Its 28 ordinary synthetic candidates (plus a separately rejected subagent candidate) include 24 title matches, an old body-only conversation, a 160-turn conversation with about 5.2 million text code units, literal code and unrelated text. A separate forged-candidate check includes a subagent. Chinese “问题” finds 26 ordinary conversations, including the old/long body-only hits; code punctuation, Unicode case matching, no-hit and title-only queries pass. After the cold-catalog title gap was found in browser acceptance, title matching was changed to public saved-title reads and rechecked with intentionally empty catalog titles. The forced subagent is skipped.
|
|
38
|
+
- In that Node 24.19.0 service probe, title/body first batches took 82–129 ms and complete scans 331–772 ms; title-only public-title scans completed in 882–1047 ms. These sequential samples include cold and cached reads. A separate cold-read cancellation requested after 10 ms settled with HTTP 499 at 10 ms, and the next independent query passed. These are one small synthetic service measurement, not UI latency, production scale guarantees, or a benchmark. The default Web overlay does not enable FTS.
|
|
39
|
+
|
|
40
|
+
An isolated official RC2 Web browser run with the default `openAt: never` configuration passed on 2026-10-12:
|
|
41
|
+
|
|
42
|
+
- A single body query automatically scans all 28 ordinary conversations, finds both old/long body-only matches, and highlights the exact snippet text.
|
|
43
|
+
- Cold titles appear without opening each conversation first. Result pagination reaches 26 matches (24 title matches plus two body-only matches); title-only reaches 24 and excludes the body-only query.
|
|
44
|
+
- Successful results have no Retry action; Enter starts a fresh same-query scan. Stop reports incomplete coverage, and rapid query changes leave only the latest literal-code result.
|
|
45
|
+
- Opening the 160-turn long conversation and returning preserves the query and input focus. The final client/Host artifact hashes were unchanged throughout this clean acceptance run.
|
|
46
|
+
|
|
47
|
+
The compact-layout follow-up passed at 1180×757 and 501×403 in Chrome/Web. Input top position stayed at 44 px for empty, zero-match, two-result and paged results; the two-result card was 234 px high rather than a fixed empty panel. The 501 px view had no horizontal overflow. Expanded help and result lists scrolled separately; Stop, Retry and Load more stayed reachable. Tab trapping, Escape and return focus passed, with unchanged client/Host artifact hashes.
|
|
48
|
+
|
|
49
|
+
Archived-search acceptance on the same isolated RC2 Web profile verified default exclusion, opt-in body/title matches with archive labels and snippets, and scope changes discarding excluded rows. Clicking archived title text left the durable archive state unchanged; keyboard activation of the explicit restore action unarchived the synthetic conversation and opened Chat with the query. Returning showed the ordinary row. The 501×323 view had no horizontal overflow and its actions remained reachable. Independent-entry Close/Escape returned focus; after restore → Back → Escape, the original trigger had been removed by navigation and focus fell to the page. No exact return-focus guarantee is made for that path.
|
|
50
|
+
|
|
51
|
+
Bounded component/protocol checks additionally covered cross-scope cursor rejection, fresh archive flags on replay, deletion during replay, archive changes during reads, late old-scope responses, repeated restore activation, uncertain/rejected restore responses, confirmed restore followed by open failure, and navigation invalidation on Close/query/mode/scope/reset/another result. Delayed restore races and failure UI were not independently reproduced in the browser. The smallest actual browser width was 501 px; 320 px reflow remains unverified.
|
|
52
|
+
|
|
53
|
+
No real read-failure UI was produced in browser acceptance; failure/partial behavior has the bounded component/protocol checks above. Dark mode, 360/390 px widths, compaction/retry history through the UI, and Electron Desktop remain unverified. Compaction/retry selection has the source-contract and bounded service/protocol evidence described above. The historical host-version matrix was not rerun.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
1
57
|
# Full-session search compatibility
|
|
2
58
|
|
|
3
59
|
The unreleased full-session path targets the official DSH `0.2.0-rc.2` contract at [`639ed015`](https://github.com/deepseek-ai/deepseek-harness/tree/639ed015397290b3745d163aafe02ffee4aa3f84). The historical matrix below describes the pre-existing loaded/DOM-paging implementation; it is not acceptance evidence for this data-search path.
|
|
@@ -14,6 +70,12 @@ Assistant Markdown is projected through the Host's public `MarkdownText` compone
|
|
|
14
70
|
|
|
15
71
|
Saved source identity is retained separately from renderer offsets. Navigation uses the selected session's `loadThrough`, validates the native semantic node and content part, opens only the corresponding native disclosures, and compares complete text-block sequences before making a Range. React replacement nodes are revalidated during settling. Capped process fades and the find bar are excluded from the readable area. If a boundary prevents scrolling clear of the bar, a temporary in-panel displacement preserves its saved manual position; cancellation and user movement end that displacement.
|
|
16
72
|
|
|
73
|
+
Match navigation uses the first non-empty Range fragment while highlighting the entire match. It leaves that fragment in place when the outer reading area has one measured line-height of space above and below; otherwise it centers the fragment in the reachable area above the composer and clear of the find bar. Inner code and process scrollers retain nearest alignment and their fade exclusions. At a history boundary, a readable fragment can succeed without the full margin.
|
|
74
|
+
|
|
75
|
+
Before moving a match, navigation waits for the selected session to stop loading and uses the exact loaded Turn control, when mounted, to release the Host’s retained paging anchor. It then resolves the source again and checks measured geometry over successive polls. The [RC2 Turn navigator](https://github.com/deepseek-ai/deepseek-harness/blob/639ed015397290b3745d163aafe02ffee4aa3f84/packages/client/ui-chat/src/client/chat/TurnNavigator.tsx) omits the rail for a single turn and virtualizes its marks. When the exact control is absent but the session is ready and the target Range is valid, navigation tries direct placement once; this does not establish a Host ownership handoff. If that placement is reversed, it reports the existing positioning failure without retrying the scroll or selecting another turn. Loading or unknown session state never permits a write.
|
|
76
|
+
|
|
77
|
+
The Host exposes no navigation-completed event. After a native Turn action, the bounded geometry check permits an initial placement and one layout correction, then reports failure if the Host keeps moving the match back. A readable boundary can succeed without ideal centering. Reader input, a new query, closing Find, or a changed session cancels the attempt. Loaded-content text rescans wait for the attempt to finish and do not initiate another jump. The existing `loadThrough` request is awaited separately; its completion is not evidence that the rendered match has landed.
|
|
78
|
+
|
|
17
79
|
Read, Diff, Search and supported terminal cards use validated first-party presentation data. Context follows the final RC2 Chat visibility filter: ordinary background context and system prompts are excluded; turn triggers and context containing tool changes use their native form and DOM markers. Saved but unrendered attempts/fields and Host display limits remain explicit navigation limitations. Authored image descriptions are independent saved-text results; images, OCR and attachment internals are excluded. Unknown required text types or unverified custom tool presentation report incomplete coverage rather than a false zero or complete count.
|
|
18
80
|
|
|
19
81
|
## Build and verification scope
|