@renyuluo/dsh-deepsearch 0.0.0-stage → 0.1.16

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 ADDED
@@ -0,0 +1,43 @@
1
+ # Changelog
2
+
3
+ ## 0.1.16
4
+
5
+ - Add public documentation images for the opt-in manual-unread settings, session context menu and left-side indicator, using fictional demo data.
6
+ - Reuse the native DSH `StateDot` unread component in the leading sidebar slot; native running, interaction and completion states retain priority.
7
+ - Stop result-list scrolling on mouse hover while preserving keyboard navigation and wraparound scrolling.
8
+ - Include the archive badges and confirmed restore-and-open workflow from the local 0.1.14–0.1.15 builds in the public release.
9
+ - Preserve existing local appearance and manual-unread preferences; manual unread remains off by default and local to each client.
10
+
11
+ ## 0.1.15
12
+
13
+ - Preserve the concurrently added, opt-in local manual-unread menu, blue dot and settings alongside the archive-navigation fix.
14
+ - Keep the scoped package identity and local preference keys unchanged.
15
+
16
+ ## 0.1.14
17
+
18
+ - Mark archived title and message hits with an explicit “已归档” badge.
19
+ - Confirm restoration before opening archived results in the native conversation.
20
+ - Recheck live workspace state and keep search results visible when restoration fails or is cancelled.
21
+ - Prevent duplicate restoration and stale navigation after closing or changing search scope.
22
+
23
+ ## 0.1.13
24
+
25
+ - Publish the public npm package as `@renyuluo/dsh-deepsearch`; the unscoped package belongs to another author.
26
+ - Align the Cordis bundle package reference and browser module ID with the scoped identity.
27
+ - Preserve product title, repository, local appearance settings and search behavior.
28
+ - Document explicit replacement of this project’s prior unscoped GitHub install to avoid duplicate plugin instances.
29
+
30
+ ## 0.1.12
31
+
32
+ First portable public GitHub release.
33
+
34
+ - Literal, case-insensitive Chinese and English conversation search.
35
+ - Current-session newest-first scanning and automatic bounded continuation.
36
+ - Highlighted compact previews and local minute-precision timestamps.
37
+ - Workspace/project filtering and optional archived sessions.
38
+ - Native conversation opening with exact-event checks and best-effort row navigation; no replacement transcript.
39
+ - Configurable glass, theme and custom appearance; wallpaper-plugin compatibility.
40
+ - Portable package-root bundle entry, localized metadata and manifest exports.
41
+ - No production dependencies, install scripts, external search endpoint or persistent conversation index.
42
+
43
+ Earlier versions were local development builds and are not part of this public repository history.
package/LICENSE ADDED
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DeepSearch contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.en.md ADDED
@@ -0,0 +1,166 @@
1
+ # DeepSearch · Full-text Conversation Search
2
+
3
+ [简体中文](README.md) | **English**
4
+
5
+ A local full-text search plugin for **DeepSeek Harness**. Find a conversation from a fragment you remember, without having to remember its title.
6
+
7
+ - **Search Chinese fragments**: literal substring matching without FTS tokenization, case-insensitive English matching, and literal punctuation.
8
+ - **Search message content**: conversation titles, user messages, and completed final assistant replies. Results show highlighted snippets and the message's local date and time.
9
+ - **Current conversation first**: search its newest messages first, then automatically scan the remaining conversations in batches.
10
+ - **Native conversation navigation**: open the original DSH conversation, load the exact message, and attempt to scroll to and highlight it—without replacing the conversation view.
11
+ - **Scope and appearance controls**: project/workspace filters, optional archived conversations, frosted glass, host theme, and custom color, opacity, and blur.
12
+ - **Optional manual unread**: enable session context-menu marking in settings, with the native leading unread dot, automatic clearing on re-entry, and local-only persistence.
13
+ - **No chat uploads**: reuse the host's authentication and history services with no additional production listener. Messages are never edited; archive state changes only after explicit restoration confirmation.
14
+
15
+ ## Feature Preview
16
+
17
+ Except for the explicitly labeled sidebar illustration, these images use the **actual plugin components in an isolated mock host with fictional demo data**. They are not screenshots of your chats or the native DSH conversation page. Native message navigation must be verified in the real host; the demo does not simulate successful navigation. The screenshots show the Chinese UI; this English README does not change the plugin's interface language.
18
+
19
+ ### Full-text search, highlighted snippets, and message timestamps
20
+
21
+ ![Full-text search with Chinese matches and local message timestamps](https://raw.githubusercontent.com/luorenyu/dsh-deepsearch/v0.1.16/docs/images/01-search.png)
22
+
23
+ ### Project and workspace filters
24
+
25
+ ![Narrow the search to a project or workspace](https://raw.githubusercontent.com/luorenyu/dsh-deepsearch/v0.1.16/docs/images/02-projects.png)
26
+
27
+ ### Archived conversations
28
+
29
+ ![Optionally include archived conversations](https://raw.githubusercontent.com/luorenyu/dsh-deepsearch/v0.1.16/docs/images/03-archived.png)
30
+
31
+ ### Three panel appearance modes
32
+
33
+ ![Frosted-glass search panel](https://raw.githubusercontent.com/luorenyu/dsh-deepsearch/v0.1.16/docs/images/04-glass.png)
34
+
35
+ ![Use the host theme](https://raw.githubusercontent.com/luorenyu/dsh-deepsearch/v0.1.16/docs/images/05-theme.png)
36
+
37
+ ![Customize background color, opacity, and blur](https://raw.githubusercontent.com/luorenyu/dsh-deepsearch/v0.1.16/docs/images/06-custom.png)
38
+
39
+ ### Optional extension: manual unread
40
+
41
+ Enable it in Settings, then mark a sidebar conversation unread/read from its context menu. Re-entering the conversation clears the mark. Preferences and marks remain local to this client. The settings image uses the actual plugin component. The context-menu image places a faithful fictional sidebar illustration inside the matching feature-card frame; it is not a native screenshot or runtime-verification evidence.
42
+
43
+ ![Enable manual unread in Settings](https://raw.githubusercontent.com/luorenyu/dsh-deepsearch/v0.1.16/docs/images/07-unread-settings.png)
44
+
45
+ ![Session context menu and leading unread indicator demonstration](https://raw.githubusercontent.com/luorenyu/dsh-deepsearch/v0.1.16-docs.1/docs/images/08-unread-menu.png)
46
+
47
+ ## Installation
48
+
49
+ The verified host is **DSH Desktop 0.2.2-rc.3**. Other versions and platforms have not completed real-desktop regression testing. The package's compatibility range is currently restricted to this host version.
50
+
51
+ ### Install from npm (recommended)
52
+
53
+ The public package is [@renyuluo/dsh-deepsearch](https://www.npmjs.com/package/@renyuluo/dsh-deepsearch). **0.1.16 has passed packaging and local installation checks, but npm publication is awaiting account two-factor authentication**; npm latest is currently 0.1.13.
54
+
55
+ ```sh
56
+ dsh plugin --profile desktop add @renyuluo/dsh-deepsearch
57
+ ```
58
+
59
+ The public package name is **`@renyuluo/dsh-deepsearch`**. The product name and GitHub repository name remain unchanged.
60
+
61
+ ### Install from GitHub
62
+
63
+ ```sh
64
+ dsh plugin --profile desktop add 'https://github.com/luorenyu/dsh-deepsearch.git#v0.1.16'
65
+ ```
66
+
67
+ Alternatively, download the package from [Releases](https://github.com/luorenyu/dsh-deepsearch/releases), then install it:
68
+
69
+ ```sh
70
+ dsh plugin --profile desktop add /path/to/renyuluo-dsh-deepsearch-0.1.16.tgz
71
+ ```
72
+
73
+ > **Important: do not install the unscoped npm package with `add dsh-deepsearch`.** That package belongs to another author and is unrelated to this repository. Use `@renyuluo/dsh-deepsearch` or this repository's GitHub/Release URL instead.
74
+
75
+ If you previously installed this project under its old unscoped name from GitHub, remove that entry before installing the scoped package so that two copies do not load at once:
76
+
77
+ ```sh
78
+ dsh plugin --profile desktop remove dsh-deepsearch
79
+ dsh plugin --profile desktop add @renyuluo/dsh-deepsearch
80
+ ```
81
+
82
+ This migration applies only to this project's old installation; it is not a recommendation to remove another author's similarly named plugin. The appearance storage key is unchanged, so existing preferences are preserved on the same host page origin.
83
+
84
+ Search and appearance screenshots were originally captured with the 0.1.12 demo components. The manual-unread settings screenshot uses the actual 0.1.16 plugin component in an isolated mock host; the menu scene is a fictional illustration. Version 0.1.16 also includes confirmed archive restoration and the hover-scrolling fix.
85
+
86
+ ### Discover it in the DSH plugin marketplace
87
+
88
+ [Marketplace submission #15379](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin/pull/15379) has been opened as a draft. It is awaiting the repository's 24-hour minimum age before being marked ready for maintainer review. [Awesome DSH Plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin) is the third-party community catalog used by `dshmarket`. Availability depends on the PR being merged and the marketplace being synchronized. **A GitHub release does not mean the plugin is already listed in the marketplace.**
89
+
90
+ Once accepted, search the relevant marketplace for **DeepSearch** or **会话全文搜索**. Check that the source is `luorenyu/dsh-deepsearch`, not another author's similarly named plugin. DSH also supports custom indexes, so catalog sources may differ between clients.
91
+
92
+ ## Usage
93
+
94
+ | Action | Shortcut / control |
95
+ | --- | --- |
96
+ | Open or close search | macOS `⌘⇧K`; Windows/Linux `Ctrl⇧K` (not tested on physical devices) |
97
+ | Select a result | `↑` / `↓` |
98
+ | Open a result | `Enter` |
99
+ | Close the panel | `Esc` or click outside |
100
+ | Set the search scope | All / Conversations / Projects, workspace dropdown, include archived |
101
+ | Adjust the panel and extensions | “设置” (Settings) in the upper-right corner |
102
+
103
+ DeepSearch does not take over DSH's native `⌘K` shortcut or the `⌘F` shortcut commonly used by other search plugins.
104
+
105
+ Enter a Chinese fragment or an English keyword. Search continues automatically, with results appearing as each batch is scanned—no manual paging is required. “No results” is shown only after a complete scan finds no matches. Read failures, timeouts, incomplete scans, and the 200-result limit are reported separately. Changing the query or closing the panel cancels the previous task.
106
+
107
+ Opening a message result takes you to the native conversation. The plugin verifies the exact message using `sessionId + seq`, then attempts to locate and highlight the corresponding native row. The status area lets you return to search or clear the highlight. Switching conversations or feature pages releases navigation resources. Title results only open the conversation; they do not claim successful message positioning.
108
+
109
+ ### Opening archived results
110
+
111
+ With “含归档” (Include archived) enabled, archived title and message hits display an **“已归档”** badge. Selecting one keeps the results visible and asks for confirmation. Only **“恢复并打开” (Restore and open)** calls the host unarchive command, then opens the native conversation and attempts message positioning. Cancel does not change archive state.
112
+
113
+ Failures or timeouts keep results visible with an error. DeepSearch does not silently navigate or automatically rearchive. An issued restoration request cannot necessarily be withdrawn: closing the panel or changing the query cancels subsequent navigation, but the host may still finish the explicitly confirmed restoration.
114
+
115
+ ## Appearance
116
+
117
+ - **Frosted glass**: prefer the host input field's glass background and blur only the area behind the search panel.
118
+ - **Follow DSH**: use an opaque background from the host theme.
119
+ - **Custom**: choose a color, opacity from 55–100%, and blur from 0–32px, or restore the defaults.
120
+
121
+ DeepSearch does not dim the screen or blur the entire DSH page. Its compatibility fix for wallpaper plugins' opaque-dialog rules applies only to its own panel. Preferences are saved locally in `localStorage`; if storage is blocked, settings remain usable for the current session. An opaque fallback is used when reduced transparency is requested or backdrop blur is unsupported.
122
+
123
+ ## Optional extension: manual unread markers
124
+
125
+ Enable “会话未读标记” in Settings (off by default). Right-click a sidebar conversation to mark it unread/read; the marker reuses DSH’s native unread `StateDot` component to the left of the title, with host-owned colors and dimensions. Entering a conversation clears its manual marker. Marking the already-open conversation does not immediately clear it.
126
+
127
+ Preferences and markers stay in this client’s local storage, do not sync across devices and do not change native completion notifications. Disabling the extension hides menus and dots but keeps markers. Markers share the native leading status seat; running, pending-interaction and native completion states take priority. Archived and blank conversations do not show manual dots. Storage failures are reported in Settings; changes remain usable for the current session.
128
+
129
+ ## Privacy and Limitations
130
+
131
+ - Reads history through the host's public services, not by parsing private chat files directly. It does not upload chats or write to original messages. The search API uses the host's owner-authenticated `connection.fetch` routes.
132
+ - By default, searches regular conversation titles, user messages, and completed final assistant replies. Tool output, reasoning, subagents, and unfinished replies are excluded. Archived conversations are excluded unless enabled.
133
+ - Uses bounded memory, short-lived cursors, and batch scanning—**not a persistent incremental index**. Initial searches through very long histories may be slower. At most 200 results are displayed. Cursors expire after two minutes of inactivity, requiring a new search.
134
+ - Each conversation's history snapshot at its first read defines the scope of that scan. Messages appended during scanning appear only after a new search. History revisions or truncation explicitly require restarting the search.
135
+ - Projects come from workspaces registered with the host. DeepSearch **does not search file contents on disk** or provide command search.
136
+ - Message timestamps use the local time zone and the format `YYYY/MM/DD HH:mm`. Missing or invalid timestamps are not invented.
137
+ - Exact positioning uses a DOM compatibility adapter for the current host, not a stable public scrolling API. Folded messages, Markdown transformations, non-Chat views, host upgrades, or native scrolling policies may prevent positioning or exact-text highlighting. The plugin reports these states without blocking the native conversation.
138
+
139
+ ## Development and Testing
140
+
141
+ No build step or third-party production dependencies are required. Use Node.js 22+:
142
+
143
+ ```sh
144
+ git clone https://github.com/luorenyu/dsh-deepsearch.git
145
+ cd dsh-deepsearch
146
+ npm test
147
+ npm run check
148
+ npm pack --ignore-scripts
149
+ ```
150
+
151
+ Core tests cover literal matching, Chinese and Unicode ranges, history projection, reverse pagination, automatic continuation, cancellation/timeouts/cursors, native navigation lifecycle, snippet rendering, timestamps, and appearance. Component screenshots and mock-service tests are not equivalent to real-host acceptance testing across every host version, theme, and platform.
152
+
153
+ Code overview:
154
+
155
+ - [client.js](client.js): search panel, shortcuts, snippets, appearance, and native navigation adapter.
156
+ - [host.js](host.js): authenticated routes and request limits.
157
+ - [search-core.js](search-core.js): conversation catalog, final-reply projection, substring matching, and pagination.
158
+ - [tests](tests): host-independent unit and contract regression tests.
159
+
160
+ Uninstall:
161
+
162
+ ```sh
163
+ dsh plugin --profile desktop remove @renyuluo/dsh-deepsearch
164
+ ```
165
+
166
+ [MIT License](LICENSE) · [Report an issue](https://github.com/luorenyu/dsh-deepsearch/issues)
package/README.md CHANGED
@@ -1,3 +1,165 @@
1
- # Temporary Holding Version
1
+ # DeepSearch · 会话全文搜索
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ **简体中文** | [English](README.en.md)
4
+
5
+ 为 **DeepSeek Harness** 制作的本地全文搜索插件。记得一小段内容,就能找回对应会话,而不必记住标题。
6
+
7
+ - **中文片段也能搜**:不依赖 FTS 分词,支持连续中文子串、英文大小写不敏感和字面符号。
8
+ - **正文搜索**:会话标题、用户输入、助手已完成的最终回复;命中摘要直接高亮,展示消息的本地日期与时间。
9
+ - **当前会话优先**:先从当前会话最新消息往前搜索,再自动逐批扫描其他会话。
10
+ - **原生会话定位**:打开 DSH 原生会话,加载精确消息并尝试滚动、高亮,不替换详情页。
11
+ - **范围与外观**:项目 / 工作区过滤、可选归档;毛玻璃、跟随主题、自定义颜色、不透明度与模糊。
12
+ - **可选手动未读**:设置开关控制侧栏右键标记,复用原生左侧未读点;再次打开自动已读,标记仅保存在本机。
13
+ - **不上传聊天**:复用宿主认证与历史服务,不开额外生产监听端口,不修改消息;仅在你确认“恢复并打开”时取消归档。
14
+
15
+ ## 功能预览
16
+
17
+ 除特别标注的侧边栏重绘示意外,以下图片使用**真实插件组件 + 隔离模拟宿主 + 虚构演示数据**生成;均非你的聊天记录或 DSH 原生页面截图。原生消息跳转需在真实宿主中验证,演示页不模拟“定位成功”。
18
+
19
+ ### 全文搜索、命中摘要与准确时间
20
+
21
+ ![正文搜索:中文命中摘要与消息日期时间](https://raw.githubusercontent.com/luorenyu/dsh-deepsearch/v0.1.16/docs/images/01-search.png)
22
+
23
+ ### 项目与工作区范围
24
+
25
+ ![按项目与工作区缩小搜索范围](https://raw.githubusercontent.com/luorenyu/dsh-deepsearch/v0.1.16/docs/images/02-projects.png)
26
+
27
+ ### 归档会话
28
+
29
+ ![可选搜索归档会话](https://raw.githubusercontent.com/luorenyu/dsh-deepsearch/v0.1.16/docs/images/03-archived.png)
30
+
31
+ ### 三种面板外观
32
+
33
+ ![局部毛玻璃搜索面板](https://raw.githubusercontent.com/luorenyu/dsh-deepsearch/v0.1.16/docs/images/04-glass.png)
34
+
35
+ ![跟随宿主主题](https://raw.githubusercontent.com/luorenyu/dsh-deepsearch/v0.1.16/docs/images/05-theme.png)
36
+
37
+ ![自定义底色、不透明度与模糊](https://raw.githubusercontent.com/luorenyu/dsh-deepsearch/v0.1.16/docs/images/06-custom.png)
38
+
39
+ ### 扩展小功能:手动未读
40
+
41
+ 在设置中开启后,通过侧栏右键菜单标记未读 / 已读;再次进入会话自动清除。标记和开关仅保存在本机。设置图来自真实插件组件;右键菜单图使用高还原侧边栏重绘,嵌入统一功能卡片。重绘图不是原生截图或运行验证证据。
42
+
43
+ ![设置中开启会话未读标记](https://raw.githubusercontent.com/luorenyu/dsh-deepsearch/v0.1.16/docs/images/07-unread-settings.png)
44
+
45
+ ![右键菜单标记未读与左侧状态点示意](https://raw.githubusercontent.com/luorenyu/dsh-deepsearch/v0.1.16-docs.1/docs/images/08-unread-menu.png)
46
+
47
+ ## 安装
48
+
49
+ 当前验证宿主为 **DSH Desktop 0.2.2-rc.3**;其他版本与平台尚未完成真实桌面回归。包的兼容性范围暂时限定该版本。
50
+
51
+ ### 从 npm 安装(推荐)
52
+
53
+ 公开包名为 [@renyuluo/dsh-deepsearch](https://www.npmjs.com/package/@renyuluo/dsh-deepsearch)。**0.1.16 已完成打包和本地安装验证,npm 发布尚待账号双重验证**;当前 npm latest 为 0.1.13。
54
+
55
+ ```sh
56
+ dsh plugin --profile desktop add @renyuluo/dsh-deepsearch
57
+ ```
58
+
59
+ 公开包名为 **`@renyuluo/dsh-deepsearch`**;产品名和 GitHub 仓库名不变。
60
+
61
+ ### 从 GitHub 安装
62
+
63
+ ```sh
64
+ dsh plugin --profile desktop add 'https://github.com/luorenyu/dsh-deepsearch.git#v0.1.16'
65
+ ```
66
+
67
+ 也可以从 [Releases](https://github.com/luorenyu/dsh-deepsearch/releases) 下载安装包后安装:
68
+
69
+ ```sh
70
+ dsh plugin --profile desktop add /path/to/renyuluo-dsh-deepsearch-0.1.16.tgz
71
+ ```
72
+
73
+ > **重要:不要运行 `add dsh-deepsearch` 来安装 npm 同名包。** 无作用域的 npm 同名包属于其他作者,与本仓库无关。请使用 `@renyuluo/dsh-deepsearch`,或本仓库 GitHub / Release 地址。
74
+
75
+ 从本项目旧版无作用域 GitHub 安装迁移时,请先卸载旧条目,再安装作用域包,避免两份搜索插件同时加载:
76
+
77
+ ```sh
78
+ dsh plugin --profile desktop remove dsh-deepsearch
79
+ dsh plugin --profile desktop add @renyuluo/dsh-deepsearch
80
+ ```
81
+
82
+ 这是替换本项目旧安装条目,不是建议卸载其他作者的同名插件。外观存储键保持不变;同一宿主页面来源下已有偏好会继续使用。
83
+
84
+ 全文搜索及外观截图最初来自 0.1.12 演示组件;手动未读设置图由 0.1.16 的真实插件组件在隔离模拟宿主中生成;菜单场景图为虚构内容重绘。0.1.16 同时包含归档恢复确认与鼠标悬浮滚动修复。
85
+
86
+ ### 在 DSH 插件市场中发现
87
+
88
+ 已提交 [市场收录申请 #15379](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin/pull/15379),目前为草稿,等待仓库创建满 24 小时后转为正式待审及维护者审核。[Awesome DSH Plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin) 是 `dshmarket` 使用的第三方社区目录;是否收录以 PR 合并和市场同步为准。**GitHub 发布不等于已经在市场上架。**
89
+
90
+ 审核通过后,可在相应市场搜索 **DeepSearch** 或 **会话全文搜索**。请确认来源是 `luorenyu/dsh-deepsearch`,不是其他作者的同名插件。DSH 本体也支持自定义索引,各客户端配置的来源可能不同。
91
+
92
+ ## 使用
93
+
94
+ | 操作 | 快捷键 / 入口 |
95
+ | --- | --- |
96
+ | 打开或关闭搜索 | macOS `⌘⇧K`;Windows / Linux `Ctrl⇧K`(未实机验证) |
97
+ | 选择结果 | `↑` / `↓` |
98
+ | 打开结果 | `Enter` |
99
+ | 关闭浮层 | `Esc` 或点击外部 |
100
+ | 搜索范围 | 全部 / 对话 / 项目,工作区下拉,含归档 |
101
+ | 调整面板与扩展功能 | 右上角「设置」 |
102
+
103
+ 不占用 DSH 原生 `⌘K`,也不占用其他搜索插件常用的 `⌘F`。
104
+
105
+ 输入中文片段或英文关键词后,搜索自动继续,不需要逐页点击。结果随扫描逐步出现;只有扫描完成且没有命中才显示没有找到。读取失败、超时、未完成与 200 条结果上限会单独提示。切换关键词或关闭面板会取消旧任务。
106
+
107
+ 点击正文结果后,插件打开原生会话,使用 `sessionId + seq` 检查精确消息是否存在,随后尝试定位原生行并高亮。提示区可以返回搜索或清除高亮;切换会话或其他功能页时释放定位资源。标题结果仅打开会话,不冒充消息定位成功。
108
+
109
+ ### 打开归档结果
110
+
111
+ 勾选“含归档”后,归档会话的标题与正文结果显示 **「已归档」** 标签。点击时保留搜索结果并请求确认;只有选择 **「恢复并打开」** 才调用宿主取消归档,然后进入原生会话并尝试定位。选择「取消」不会改变归档状态。
112
+
113
+ 恢复失败或超时会保留结果并提示原因,不静默跳转,也不自动重新归档。恢复请求发出后不能保证撤回;关闭面板或更换查询只会取消后续自动跳转,宿主仍可能完成已确认的恢复操作。
114
+
115
+ ## 外观
116
+
117
+ - **毛玻璃**:优先使用宿主输入框玻璃底色,仅对搜索面板覆盖区域模糊。
118
+ - **跟随 DSH**:使用宿主主题的实色底板。
119
+ - **自定义**:颜色、不透明度 55–100%、模糊 0–32px,可恢复默认。
120
+
121
+ 不暗化全屏,不模糊整个 DSH 页面。兼容壁纸插件的实色弹窗覆盖规则,修正只作用于 DeepSearch 自己。偏好存于本机 `localStorage`;禁止存储时仍可在本次使用。系统要求降低透明度或不支持模糊时使用实色回退。
122
+
123
+ ## 扩展小功能 · 手动未读
124
+
125
+ 在右上角「设置」开启「会话未读标记」(默认关闭)。右键侧栏会话可标记为未读或已读,未读标记复用 DSH 原生 `StateDot` 未读组件,在会话名称左侧显示,颜色与尺寸跟随宿主。再次进入会话时清除手动标记;在当前会话上标记不会立即清除。
126
+
127
+ 开关与标记保存在当前客户端本机,不跨设备同步,也不修改宿主原生完成提醒。关闭功能隐藏菜单和圆点但保留标记;与原生状态点共用左侧位置,运行中、待交互及原生完成提醒优先显示;归档和空白会话不显示手动圆点。无法保存本机存储时,设置区会提示,本次使用仍有效。
128
+
129
+ ## 隐私与限制
130
+
131
+ - 通过宿主公开历史服务读取,不直接解析私有聊天文件,不上传聊天、不写入原始消息。搜索 API 使用宿主 `connection.fetch` owner 认证路由。
132
+ - 默认搜索普通会话标题、用户输入及已完成助手最终回复;排除工具输出、推理、子智能体与未完成回复。默认不含归档。
133
+ - 搜索采用有界内存、短期游标和逐批扫描,**不是持久增量索引**。超长历史首次查询可能较慢;最多显示 200 条命中,游标闲置两分钟过期后需重搜。
134
+ - 每个会话首次读取的历史切面构成本次范围;扫描期间新追加内容需要重新搜索才会出现。版本变更或历史截断会明确要求重新搜索。
135
+ - 项目来自宿主已登记工作区,**不搜索磁盘文件内容**,也不提供命令搜索。
136
+ - 消息时间按本机时区显示为 `YYYY/MM/DD HH:mm`,缺失或非法时间不编造。
137
+ - 精确定位使用当前宿主 DOM 兼容适配,并非公开稳定滚动 API。折叠消息、Markdown 文本变形、非 Chat 视图、宿主升级或滚动策略可能导致无法定位或逐字高亮,插件会区分状态,不阻塞原生会话。
138
+
139
+ ## 开发与测试
140
+
141
+ 无需构建和生产第三方依赖,Node.js 22+:
142
+
143
+ ```sh
144
+ git clone https://github.com/luorenyu/dsh-deepsearch.git
145
+ cd dsh-deepsearch
146
+ npm test
147
+ npm run check
148
+ npm pack --ignore-scripts
149
+ ```
150
+
151
+ 核心测试覆盖字面匹配、中文与 Unicode 范围、历史投影、逆序分页、自动续搜、取消 / 超时 / 游标、原生定位生命周期、摘要渲染、时间和外观。组件截图和模拟服务测试不等于所有宿主版本、主题与平台实机验收。
152
+
153
+ 代码分工:
154
+ - [client.js](client.js):搜索浮层、快捷键、摘要、外观和原生定位适配。
155
+ - [host.js](host.js):认证路由和请求限制。
156
+ - [search-core.js](search-core.js):会话目录、最终回复投影、字串匹配和分页。
157
+ - [tests](tests):无宿主单元 / 合约回归测试。
158
+
159
+ 卸载:
160
+
161
+ ```sh
162
+ dsh plugin --profile desktop remove @renyuluo/dsh-deepsearch
163
+ ```
164
+
165
+ [MIT License](LICENSE) · [问题反馈](https://github.com/luorenyu/dsh-deepsearch/issues)