dsh-hot-search 0.1.1 → 0.1.2

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/README.md CHANGED
@@ -33,9 +33,9 @@ dsh --dump-config | Select-String hot-search
33
33
  - id: hot-search
34
34
  config:
35
35
  roots:
36
- - path: D:\ObsidianNotes
36
+ - path: D:\path\to\your-vault
37
37
  label: main
38
- - path: D:\notes\work
38
+ - path: D:\path\to\another\notes
39
39
  label: work
40
40
  ```
41
41
 
@@ -52,7 +52,7 @@ dsh --dump-config | Select-String hot-search
52
52
  | `refreshIntervalMs` | `120000` | 索引陈旧后自动重建的检查间隔;`0` = 不自动重建。**本 bundle 的 `cordis.patch.yml` 显式设成了 `60000`**,所以装完 `--dump-config` 看到的是 60 秒 |
53
53
  | `fuzzyMaxErrors` | `0` | 模糊匹配容错字数;`0` = 按词长自动(`len//4`,短于 4 字不自动容错) |
54
54
  | `watch` | `true` | FFF finder 是否文件监视(长驻进程建议开) |
55
- | `stateDir` | `""` | frecency/历史库的**根**目录;空 = `$DSH_HOME/hot-search`,再退化到系统 cache |
55
+ | `stateDir` | `""` | frecency/历史库的**根**目录;空 = 先试 `$DSH_HOME/hot-search`,宿主进程里没有 `DSH_HOME` 时退化到系统 cache(Windows:`%LOCALAPPDATA%\dsh-hot-search`)。详见「权限与隐私」 |
56
56
  | `maxResults` | `50` | 单次返回上限 |
57
57
  | `promptSection` | `true` | 是否向系统提示注入用法说明 |
58
58
 
@@ -91,7 +91,8 @@ node dsh-hot-search\dev\hot-search-smoke.mjs
91
91
  ## 权限与隐私
92
92
 
93
93
  - **读**:只读 `roots` 下的、匹配 `extensions` 的文本文件,用于建内存索引。不传任何内容给网络。
94
- - **写**:只写自己的运行时状态(frecency、FFF 的 history 库),位置 = `stateDir`,默认 `$DSH_HOME/hot-search/<根目录名>-<路径哈希>`。**不会写进你被索引的仓库**,所以不会脏你的 `git status`。
94
+ - **写**:只写自己的运行时状态(frecency、FFF 的 history 库),位置 = `stateDir`。**空值时按此顺序解析**:`$DSH_HOME/hot-search/<根目录名>-<路径哈希>` → 宿主进程没有 `DSH_HOME` 时退化到系统 cache 目录(Windows:`%LOCALAPPDATA%\dsh-hot-search\<根目录名>-<路径哈希>`)。
95
+ 实测:DSH 宿主进程里**没有** `DSH_HOME`(那是 DSH 注入给 shell 子进程的),所以默认落在 `%LOCALAPPDATA%` 那条退化路径上;想固定位置就显式配 `stateDir`。**两条路径都不会写进你被索引的仓库**,所以不会脏你的 `git status`。
95
96
  - **网络**:插件本身零网络请求。
96
97
  - **原生依赖**:`hot_find`/`hot_grep` 依赖 Rust 原生库 `@ff-labs/fff-node`(含平台二进制)。加载失败时**不会崩**:`hot_find` 自动降级为内置子序列匹配,`hot_grep` 明确报错并指路 `hot_fuzzy`;`hot_fuzzy`/`hot_plan`/`hot_stats` 完全不依赖它。`hot_stats` 会显示降级原因。
97
98
  - **平台**:在 Windows x64 上实测。非 win-x64 平台需要 `@ff-labs/fff-node` 对应的平台二进制包;拿不到就走上面的降级路径。
package/cordis.patch.yml CHANGED
@@ -10,7 +10,7 @@
10
10
  # - id: hot-search
11
11
  # config:
12
12
  # roots:
13
- # - path: D:\ObsidianNotes # ← 换成你的库
13
+ # - path: D:\path\to\your-vault # ← 换成你的库
14
14
  # label: main
15
15
  #
16
16
  # 全部可配置项见 README 的「配置」一节。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-hot-search",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "description": "Resident hot search for DSH: FFF-backed fuzzy filename + indexed grep + CJK typo-tolerant content search, all in the host process (no per-query process spawn).",
6
6
  "main": "src/index.mjs",