dsh-locator 0.7.7 → 0.8.0

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.0 — 2026-11-12
4
+
5
+ Search and locate: all three stores in one panel, and a Word/Notepad++-style highlight in the conversation.
6
+
7
+ * **One combined search**: the new `POST /dsh-locator/combined` route queries content (bodies and sessions), files and folders in one request, keeps the old `/search` and `/content` routes for tools and compatibility, and returns grouped results in content → files → folders order with per-group counts. Paths found by both content and name are merged into the content row and counted.
8
+ * **All scopes on by default**: the panel now has three independent checkboxes (Content, Files, Folders), all checked; unchecking one narrows the search. Empty queries and one-character queries never start the lazy content build, so opening the panel stays cheap.
9
+ * **Conversation highlight**: double-clicking (or pressing Enter on) a session hit opens the conversation and paints the matched words with a translucent amber highlight (CSS Custom Highlight API, follows scrolling, centered on arrival). The scroll lock releases as soon as the reader scrolls or presses a key; `Esc` clears the highlight. Long sessions load older pages until the message is present, and `hidden="until-found"` rows are expanded with `beforematch`.
10
+ * **Panel rebuild**: grouped listbox with sticky group headers, per-group counts and truncation hints, relevance ordering for content and the sort menu for names, scope preference persistence, content-index progress with a retry, and light/dark theme tokens instead of `prefers-color-scheme`.
11
+ * **Keyboard and accessibility**: Enter activates the selected hit, `Ctrl+Shift+C` copies the path (Everything-style), `Ctrl+Shift+O` reveals it, `Alt+1–3` toggle scopes, Home/End/PageUp/PageDown move the selection, and a minimal dialog focus trap restores focus on close. Rows expose `role=option` / `aria-selected`; the panel is a combobox + listbox with a polite live region.
12
+ * Fixed: duplicate React keys for several session hits, the unstyled snippet line, and the fake content total. Tests: 37 unit tests (combined scope gating, merge/dedupe, lazy-build guards, plus the existing content/plugin suites); `scripts/verify.mjs` now also syntax-checks `client.js` and asserts the new route and highlight markers.
13
+ * No content-index schema change: upgrading does not rebuild the database. File-body hits still reveal the file in the file manager (line-level preview in DSH is the next step); assistant messages are located by phrase because their DOM rows carry no message id.
14
+
3
15
  ## 0.7.7 — 2026-11-11
4
16
 
5
17
  Documentation release.
package/README-es.md CHANGED
@@ -174,7 +174,11 @@ Pulsa `Ctrl+Shift+F` en cualquier parte de la GUI web, o haz clic en la lupa del
174
174
  - Doble clic en un archivo lo muestra en Explorer/Finder/`xdg-open`; doble clic en una sesión abre la conversación en el mensaje encontrado.
175
175
  - El texto del panel sigue `navigator.language` (zh/en/es/pt/hi).
176
176
 
177
- El panel usa rutas del mismo origen — `/dsh-locator/search`, `/dsh-locator/content`, `/dsh-locator/content/rebuild`, `/dsh-locator/status`, `/dsh-locator/reveal`, `/dsh-locator/open` — así que no necesita otro servidor ni otro puerto. Los perfiles sin servidor web no lo montan.
177
+ El panel usa rutas del mismo origen — `/dsh-locator/search`, `/dsh-locator/content`, `/dsh-locator/content/rebuild`, `/dsh-locator/combined`, `/dsh-locator/status`, `/dsh-locator/reveal`, `/dsh-locator/open` — así que no necesita otro servidor ni otro puerto. Los perfiles sin servidor web no lo montan.
178
+
179
+ - **Los tres ámbitos están activos por defecto**: contenido (cuerpos + sesiones), archivos y carpetas; desmarca cualquiera para acotar. Los resultados se agrupan **contenido → archivos → carpetas** con el recuento por grupo; el contenido se ordena por relevancia y los grupos de nombres siguen el menú de orden.
180
+ - **Doble clic o `Enter` activa un resultado**: una sesión abre la conversación y pinta las palabras encontradas con un resaltado ámbar translúcido que sigue el desplazamiento, se centra al llegar y se limpia con `Esc`; archivos y carpetas se muestran en el gestor de archivos. `Ctrl+Shift+C` copia la ruta, `Ctrl+O` abre, `Ctrl+Enter` inserta `@file` y `Alt+1–3` alterna los ámbitos.
181
+ - Las consultas de contenido requieren al menos dos caracteres; las consultas vacías o de un carácter no inician la construcción del índice.
178
182
 
179
183
  ## Herramientas
180
184
 
@@ -384,6 +388,9 @@ DeepSeek Harness
384
388
  - macOS usa FSEvents (recursivo) en los binarios publicados; una compilación con `CGO_ENABLED=0` cae a kqueue, limitado a 4.096 directorios, con cambios de contenido dependientes de la reconstrucción periódica.
385
389
  - USN/MFT de Windows es opcional y solo se usa si el proceso puede leer el volumen y el diario está activo; si no, se usa el recorrido portátil.
386
390
 
391
+ - Los aciertos en el cuerpo de un archivo se muestran por ahora en el gestor de archivos (la vista por línea dentro de DSH es el siguiente paso); los mensajes del asistente se localizan por frase porque sus filas del DOM no llevan messageId.
392
+ - El resaltado dentro de la conversación usa la API CSS Custom Highlight; los navegadores antiguos sin ella caen a un contorno de fila.
393
+
387
394
  ## Memoria
388
395
 
389
396
  El motor es un único proceso Go y respeta las variables estándar `GOMEMLIMIT` y `GOGC` (o `memoryLimitMB` en la configuración). Un índice de 1,2–1,5 M de entradas alcanza varios cientos de MB de RSS con el GC por defecto; usa `GOMEMLIMIT=600MiB` (límite blando, el runtime cambia CPU por memoria) o `GOGC=50` cuando el host vaya justo de RAM. Ninguno cambia el formato de la instantánea. En la instalación en vivo usada para las cifras anteriores, el proceso anfitrión de DSH (incluida la caché de páginas de la base de contenido) rondaba los 700 MB de RSS con el índice construido, y la latencia del host en reposo se mantenía en p50 2 ms.
package/README-hi.md CHANGED
@@ -174,7 +174,11 @@ Web GUI में कहीं भी `Ctrl+Shift+F` दबाएँ, या स
174
174
  - फ़ाइल पर डबल-क्लिक Explorer/Finder/`xdg-open` में दिखाता है; सेशन पर डबल-क्लिक उस बातचीत को मिले संदेश पर खोलता है।
175
175
  - पैनल का टेक्स्ट `navigator.language` का पालन करता है (zh/en/es/pt/hi)।
176
176
 
177
- पैनल उसी ओरिजिन के रूट इस्तेमाल करता है — `/dsh-locator/search`, `/dsh-locator/content`, `/dsh-locator/content/rebuild`, `/dsh-locator/status`, `/dsh-locator/reveal`, `/dsh-locator/open` — इसलिए अलग सर्वर या पोर्ट नहीं चाहिए। बिना Web सर्वर वाले प्रोफ़ाइल में यह माउंट नहीं होता।
177
+ पैनल उसी ओरिजिन के रूट इस्तेमाल करता है — `/dsh-locator/search`, `/dsh-locator/content`, `/dsh-locator/content/rebuild`, `/dsh-locator/combined`, `/dsh-locator/status`, `/dsh-locator/reveal`, `/dsh-locator/open` — इसलिए अलग सर्वर या पोर्ट नहीं चाहिए। बिना Web सर्वर वाले प्रोफ़ाइल में यह माउंट नहीं होता।
178
+
179
+ - **तीनों क्षेत्र डिफ़ॉल्ट रूप से चालू हैं**: सामग्री (बॉडी + सत्र), फ़ाइलें और फ़ोल्डर; किसी को हटाकर दायरा घटाएँ। परिणाम **सामग्री → फ़ाइलें → फ़ोल्डर** में समूहित होते हैं और हर समूह पर गिनती दिखती है; सामग्री प्रासंगिकता से क्रमबद्ध होती है और नाम-समूह क्रम मेन्यू का पालन करते हैं।
180
+ - **डबल-क्लिक या `Enter` पर परिणाम सक्रिय होता है**: सत्र परिणाम बातचीत खोलकर मिले शब्दों पर पारभासी अंबर हाइलाइट लगाता है जो स्क्रॉल के साथ चलता है, पहुँचने पर केंद्रित होता है और `Esc` से हटता है; फ़ाइल/फ़ोल्डर फ़ाइल मैनेजर में दिखते हैं। `Ctrl+Shift+C` पथ कॉपी करता है, `Ctrl+O` खोलता है, `Ctrl+Enter` `@file` डालता है और `Alt+1–3` क्षेत्र बदलता है।
181
+ - सामग्री खोज के लिए कम से कम दो अक्षर चाहिए; खाली या एक-अक्षर की खोज सामग्री इंडेक्स नहीं बनाती।
178
182
 
179
183
  ## टूल्स
180
184
 
@@ -384,6 +388,9 @@ DeepSeek Harness
384
388
  - macOS भेजे गए बाइनरी में FSEvents (रिकर्सिव) इस्तेमाल करता है; `CGO_ENABLED=0` बिल्ड kqueue पर जाता है, 4,096 डायरेक्टरी सीमा के साथ, और कंटेंट बदलाव समय-समय पर रीबिल्ड पर निर्भर रहते हैं।
385
389
  - Windows USN/MFT वैकल्पिक है और केवल तब इस्तेमाल होता है जब प्रोसेस वॉल्यूम पढ़ सके और जर्नल सक्रिय हो; वरना पोर्टेबल वॉक चलता है।
386
390
 
391
+ - फ़ाइल-बॉडी परिणाम अभी फ़ाइल मैनेजर में दिखते हैं (DSH के अंदर पंक्ति-स्तरीय पूर्वावलोकन अगला कदम है); असिस्टेंट संदेश फ़्रेज़ से खोजे जाते हैं क्योंकि उनकी DOM पंक्तियों में messageId नहीं होता।
392
+ - बातचीत के अंदर हाइलाइट CSS Custom Highlight API पर निर्भर है; पुराने ब्राउज़र में पंक्ति की रूपरेखा (outline) दिखती है।
393
+
387
394
  ## मेमोरी
388
395
 
389
396
  इंजन एक Go प्रोसेस है और मानक `GOMEMLIMIT` और `GOGC` (या कॉन्फ़िग में `memoryLimitMB`) मानता है। 1.2–1.5 M एंट्री का इंडेक्स डिफ़ॉल्ट GC के साथ कई सौ MB RSS तक जाता है; होस्ट पर RAM कम हो तो `GOMEMLIMIT=600MiB` (सॉफ़्ट सीमा, रनटाइम CPU देकर मेमोरी बचाता है) या `GOGC=50` रखें। इनसे स्नैपशॉट फ़ॉर्मेट नहीं बदलता। ऊपर के आँकड़ों वाले लाइव सेटअप में DSH होस्ट प्रोसेस (कंटेंट डेटाबेस पेज कैश सहित) इंडेक्स बने रहने पर लगभग 700 MB RSS पर था, और खाली बैठे होस्ट की देरी p50 2ms रही।
package/README-pt.md CHANGED
@@ -174,7 +174,11 @@ Pressione `Ctrl+Shift+F` em qualquer lugar da GUI web, ou clique na lupa no pé
174
174
  - Duplo clique em um arquivo revela no Explorer/Finder/`xdg-open`; duplo clique em uma sessão abre a conversa na mensagem encontrada.
175
175
  - O texto do painel segue `navigator.language` (zh/en/es/pt/hi).
176
176
 
177
- O painel usa rotas de mesma origem — `/dsh-locator/search`, `/dsh-locator/content`, `/dsh-locator/content/rebuild`, `/dsh-locator/status`, `/dsh-locator/reveal`, `/dsh-locator/open` — então não precisa de outro servidor nem de outra porta. Perfis sem servidor web não o montam.
177
+ O painel usa rotas de mesma origem — `/dsh-locator/search`, `/dsh-locator/content`, `/dsh-locator/content/rebuild`, `/dsh-locator/combined`, `/dsh-locator/status`, `/dsh-locator/reveal`, `/dsh-locator/open` — então não precisa de outro servidor nem de outra porta. Perfis sem servidor web não o montam.
178
+
179
+ - **Os três escopos vêm ativados por padrão**: conteúdo (corpos + sessões), arquivos e pastas; desmarque qualquer um para restringir. Os resultados são agrupados **conteúdo → arquivos → pastas** com a contagem por grupo; o conteúdo é ordenado por relevância e os grupos de nomes seguem o menu de ordem.
180
+ - **Duplo clique ou `Enter` ativa um resultado**: uma sessão abre a conversa e pinta as palavras encontradas com destaque âmbar translúcido que acompanha a rolagem, é centralizado ao chegar e é limpo com `Esc`; arquivos e pastas são mostrados no gerenciador de arquivos. `Ctrl+Shift+C` copia o caminho, `Ctrl+O` abre, `Ctrl+Enter` insere `@file` e `Alt+1–3` alterna os escopos.
181
+ - Consultas de conteúdo exigem pelo menos dois caracteres; consultas vazias ou de um caractere não iniciam a construção do índice.
178
182
 
179
183
  ## Ferramentas
180
184
 
@@ -384,6 +388,9 @@ DeepSeek Harness
384
388
  - O macOS usa FSEvents (recursivo) nos binários publicados; uma compilação com `CGO_ENABLED=0` cai para kqueue, limitado a 4.096 diretórios, com mudanças de conteúdo dependendo da reconstrução periódica.
385
389
  - USN/MFT do Windows é opcional e só é usado se o processo puder ler o volume e o diário estiver ativo; caso contrário, usa-se a varredura portátil.
386
390
 
391
+ - Resultados no corpo de arquivos abrem o gerenciador de arquivos por enquanto (a visualização por linha dentro do DSH é o próximo passo); mensagens do assistente são localizadas por frase porque as linhas do DOM não carregam o messageId.
392
+ - O destaque dentro da conversa usa a API CSS Custom Highlight; navegadores antigos sem ela caem para um contorno na linha.
393
+
387
394
  ## Memória
388
395
 
389
396
  O motor é um único processo Go e respeita as variáveis padrão `GOMEMLIMIT` e `GOGC` (ou `memoryLimitMB` na configuração). Um índice de 1,2–1,5 M de entradas chega a várias centenas de MB de RSS com o GC padrão; use `GOMEMLIMIT=600MiB` (limite suave, o runtime troca CPU por memória) ou `GOGC=50` quando o host estiver apertado de RAM. Nenhum altera o formato do snapshot. Na instalação ao vivo usada para os números acima, o processo anfitrião do DSH (incluindo o cache de páginas do banco de conteúdo) ficava por volta de 700 MB de RSS com o índice construído, e a latência do host ocioso permanecia em p50 2 ms.
package/README.en.md CHANGED
@@ -174,7 +174,11 @@ Press `Ctrl+Shift+F` anywhere in the Web GUI, or click the magnifier at the side
174
174
  - Double-click a file hit to reveal it in Explorer/Finder/`xdg-open`; double-click a session hit to open the conversation at the matched message.
175
175
  - Panel text follows `navigator.language` (zh/en/es/pt/hi).
176
176
 
177
- The panel talks to same-origin host routes — `/dsh-locator/search`, `/dsh-locator/content`, `/dsh-locator/content/rebuild`, `/dsh-locator/status`, `/dsh-locator/reveal`, `/dsh-locator/open` — so it needs no second server and no extra port. Profiles without a Web server never mount it.
177
+ The panel talks to same-origin host routes — `/dsh-locator/search`, `/dsh-locator/content`, `/dsh-locator/content/rebuild`, `/dsh-locator/combined`, `/dsh-locator/status`, `/dsh-locator/reveal`, `/dsh-locator/open` — so it needs no second server and no extra port. Profiles without a Web server never mount it.
178
+
179
+ - **All three scopes are on by default**: content (bodies + sessions), files and folders; uncheck any scope to narrow the search. Results are grouped **content → files → folders** with a count per group; content is ranked by relevance and name groups follow the sort menu.
180
+ - **Double-click or `Enter` activates a hit**: a session hit opens the conversation and paints the matched words with a translucent amber highlight that follows scrolling, is centered on arrival and clears with `Esc`; file/folder hits are revealed in the file manager. `Ctrl+Shift+C` copies the path, `Ctrl+O` opens, `Ctrl+Enter` inserts `@file`, and `Alt+1–3` toggles the scopes.
181
+ - Content queries need at least two characters; empty and one-character queries never start the content build.
178
182
 
179
183
  ## Tools
180
184
 
@@ -384,6 +388,9 @@ DeepSeek Harness
384
388
  - macOS uses FSEvents (recursive) in the shipped binaries; a `CGO_ENABLED=0` build falls back to kqueue, capped at 4,096 directories, with content changes relying on the periodic rebuild.
385
389
  - Windows USN/MFT is optional and only used when the process can read the volume and the journal is active; otherwise the portable walk is used.
386
390
 
391
+ - File-body hits currently reveal the file in the file manager (line-level preview inside DSH is next); assistant messages are located by phrase because their DOM rows carry no message id.
392
+ - In-conversation highlighting uses the CSS Custom Highlight API; older browsers without it fall back to a row outline.
393
+
387
394
  ## Memory
388
395
 
389
396
  The engine is a single Go process and honours the standard `GOMEMLIMIT` and `GOGC` environment variables (or `memoryLimitMB` in the config). A 1.2–1.5 M-entry index peaks around several hundred MB of RSS with the default GC; set `GOMEMLIMIT=600MiB` (soft limit, the runtime trades CPU for memory) or `GOGC=50` when the host is tight on RAM. Neither changes the snapshot format. In the live setup used for the numbers above, the DSH host process (including the content database page cache) sat around 700 MB RSS with the content index built, and idle host latency stayed at p50 2 ms.
package/README.md CHANGED
@@ -172,7 +172,11 @@ Everything 风格的查询语法,返回路径、大小、修改时间、扩展
172
172
  - 双击文件结果在文件管理器里定位;双击会话结果打开对应会话并尝试滚动到命中处。
173
173
  - 面板文案跟随 `navigator.language`(中/英/西/葡/印地语)。
174
174
 
175
- 面板通过同源路由工作:`/dsh-locator/search`、`/dsh-locator/content`、`/dsh-locator/content/rebuild`、`/dsh-locator/status`、`/dsh-locator/reveal`、`/dsh-locator/open`。不另起服务,也不占额外端口。
175
+ 面板通过同源路由工作:`/dsh-locator/search`、`/dsh-locator/content`、`/dsh-locator/content/rebuild`、`/dsh-locator/combined`、`/dsh-locator/status`、`/dsh-locator/reveal`、`/dsh-locator/open`。不另起服务,也不占额外端口。
176
+
177
+ - **默认同时搜索三个范围**:内容(正文 + 会话)、文件、目录,三个勾选默认全部打开;取消任一勾选即可缩小范围。结果按“内容 → 文件 → 目录”分组,组头显示数量;内容按相关度排序,文件/目录按排序菜单。
178
+ - **双击或 `Enter` 激活**:会话命中会打开对应会话,并把命中的词用半透明琥珀色高亮(随滚动跟随、自动居中、`Esc` 清除);文件/目录在文件管理器中定位。`Ctrl+Shift+C` 复制路径,`Ctrl+O` 打开,`Ctrl+Enter` 插入 `@file`,`Alt+1–3` 切换范围。
179
+ - 内容查询至少需要 2 个字符;空查询和 1 个字符的查询不会启动内容索引构建。
176
180
 
177
181
  ## 工具一览
178
182
 
@@ -349,6 +353,9 @@ Go 引擎在 `engine/` 下,测试用 `cd engine && go test ./...`。macOS 的
349
353
  - 两个 DSH 进程共享同一个 `stateDir` 时,构建锁只能串行化写入;建议各用各的缓存目录。
350
354
  - macOS 的发布版二进制用 FSEvents;`CGO_ENABLED=0` 构建只有 kqueue,目录上限 4096,且内容变更依赖定时重建。
351
355
 
356
+ - 文件正文命中目前只在文件管理器里定位(在 DSH 内按行预览是下一步);assistant 消息的 DOM 行不带 messageId,跳转用短语回退定位。
357
+ - 会话内高亮依赖 CSS Custom Highlight API;不支持它的旧浏览器会退化为整行描边。
358
+
352
359
  ## 安全与隐私
353
360
 
354
361
  - 索引完全在本地:不联网、不上传、不埋点;插件不会修改、移动或删除被索引的文件。