@objectivex666/dsh-settings-search 1.13.1 → 1.14.1
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.en.md +17 -10
- package/README.md +66 -56
- package/lib/client.js +280 -70
- package/lib/index.js +44 -5
- package/package.json +3 -2
- package/scripts/ai.test.mjs +352 -13
- package/scripts/compat.mjs +269 -0
- package/scripts/log.test.mjs +52 -2
package/README.en.md
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
[](https://nodejs.org)
|
|
8
8
|
[](https://awesome-dsh-plugin.com)
|
|
9
9
|
[](https://dsh-plugin.org/plugins/objectivex666/dsh-settings-search)
|
|
10
|
+
[](https://dshbase.com/zh/plugins/dsh-settings-search-plugin/)
|
|
11
|
+
[](https://dshfind.com/zh/plugins/objectivex666/dsh-settings-search?ref=badge)
|
|
10
12
|
|
|
11
13
|
**English** · [中文](./README.md)
|
|
12
14
|
|
|
@@ -18,16 +20,16 @@
|
|
|
18
20
|
- 🧩 **Three search styles** — choose the classic sidebar, window top bar, or popup search page. The choice is saved in the current browser.
|
|
19
21
|
- ⌨️ **Search shortcut (v1.10.0)** — focus the search box with `Ctrl+F` or `⌘F` inside the settings panel. You can enable or disable it from the "Settings Search" page; disabling keeps the browser's default find behavior.
|
|
20
22
|
- 🤝 **Import DSH model config (v1.9.0)** — import the Base URL and model name from DSH's current default model in the AI config section. When that default is a built-in DeepSeek route (whose settings carry no Base URL), the import uses DeepSeek's own endpoint, `https://api.deepseek.com/anthropic`. For credential safety, the API key is never imported.
|
|
21
|
-
- 🎯 **First-run onboarding (v1.9.0)** — a welcome modal appears only the first time the settings panel opens after installation. It introduces
|
|
22
|
-
- 📂 **In-page option search (v1.2.0)** — search beyond pages and reach the specific options inside them: Plugins-page tabs (`settings.plugins.tab`), the pre-0.2 plugin-card seats (`settings.plugin.item` / `web-ui.plugin.item`, both gone in 0.2), general rows, and more, each shown with a "page › option" breadcrumb.
|
|
23
|
+
- 🎯 **First-run onboarding (v1.9.0)** — a welcome modal appears only the first time the settings panel opens after installation. It introduces live search, pinyin and intent hints, AI hints, click-to-jump, the built-in settings page, and auto-indexing; there are no "Don't show again" or manual reopen buttons.
|
|
24
|
+
- 📂 **In-page option search (v1.2.0)** — search beyond pages and reach the specific options inside them: Plugins-page tabs (`settings.plugins.tab`), the **会话插件 / 全局插件** group titles on the Plugins page, the pre-0.2 plugin-card seats (`settings.plugin.item` / `web-ui.plugin.item`, both gone in 0.2), general rows, and more, each shown with a "page › option" breadcrumb.
|
|
23
25
|
- 🔤 **Pinyin association search (v1.5.0)** — type initials (`sz`) or full pinyin (`shezhi`) to surface Chinese settings items; navigate with `↑`/`↓`, confirm with `Enter`, dismiss with `Esc`, and matched text is highlighted.
|
|
24
26
|
- 🧠 **Intent search (v1.6.0)** — describe the goal in Chinese (e.g. 「太亮了」 "too bright", 「字太小」 "text too small") to surface matching settings without knowing their names, shown in a "You may want" group.
|
|
25
27
|
- 🤖 **AI-assisted search** — when nothing matches locally, your OpenAI-compatible, Anthropic, or local Ollama model understands your search intent and suggests settings. Off by default; configure it on the plugin's settings page. Ollama needs no API key.
|
|
26
|
-
- 💾 **Persistent settings index (v1.12.0)** — the first harvested settings index is stored locally. It rebuilds only on first use
|
|
28
|
+
- 💾 **Persistent settings index (v1.12.0)** — the first harvested settings index is stored locally. It rebuilds only on first use, after another plugin is installed, updated, enabled, or disabled, and can be rebuilt manually from the Settings Search page.
|
|
27
29
|
- 🧾 **Logging & viewing (v1.13.0 / v1.7.0)** — records key plugin actions, searches, and AI requests. Logs are written per local day as `$DSH_HOME/logs/dsh-settings-search/settings-search-YYYY-MM-DD.log`: one dated file per day, capped at 100 MB (the day then continues in numbered parts, `.1`, `.2`, …), with the whole folder held at 100 MB by deleting the oldest files — never the one being written. The plugin's page can **view logs**, **open the log folder**, copy, export, or clear them; the badge beside the "Logs" title counts today's file. API keys are never logged.
|
|
28
30
|
- 🧭 **Click-to-jump** — selecting a result clicks the matching left-nav entry to open its section; for tab options it also opens the tab and flashes the target row. A manual-path hint appears if automatic navigation is not possible.
|
|
29
31
|
- 🌱 **Auto-index on startup (v1.8.0)** — the first time the settings panel opens, the plugin automatically visits every settings section, silently reads in-page options (e.g. "Enable Workshop card") into the search index, then restores your current section, so all section options are searchable without having to open each page manually. A "Importing section options…" hint shows under the search box and clears when done.
|
|
30
|
-
- 🛠 **Built-in settings page (v1.4.0)** — a "Settings Search" page in the left navigation shows the current version and checks npm for a newer release on demand; when one exists it hands you a copy-ready
|
|
32
|
+
- 🛠 **Built-in settings page (v1.4.0)** — a "Settings Search" page in the left navigation shows the current version and checks npm for a newer release on demand; when one exists it hands you a copy-ready upgrade command carrying the profile name and the latest version.
|
|
31
33
|
- 🧭 **View release notes (v1.7.1)** — the "Settings Search" page has a "View changelog" button next to "Check for updates"; it fetches the GitHub release notes and shows them inline, opening the release page if fetching fails.
|
|
32
34
|
- 🌐 **i18n** — built-in Chinese/English dictionaries that follow the DSH localization system and are easy to extend.
|
|
33
35
|
- 🎨 **Theme-aware** — styled entirely with CSS variables, automatically following the DSH theme (light/dark).
|
|
@@ -39,9 +41,11 @@
|
|
|
39
41
|
|
|
40
42
|
This plugin is a standard **DSH profile bundle**: once installed it wires itself into the settings panel — no manual edits to any DSH configuration file.
|
|
41
43
|
|
|
44
|
+
The commands below target a command-line profile. The desktop app manages its own `desktop` profile, which the CLI cannot touch — install the plugin for the desktop app from its plugin management page instead.
|
|
45
|
+
|
|
42
46
|
### Prerequisites
|
|
43
47
|
|
|
44
|
-
- **DeepSeek Harness (DSH)** — DSH 0.2 stable (desktop and `dsh web`) and earlier 0.1 builds; the plugin picks the API the running release offers.
|
|
48
|
+
- **DeepSeek Harness (DSH)** — DSH 0.2 stable (desktop and `dsh web`) and earlier 0.1 builds; the plugin picks the API the running release offers. Verified against **0.2.2-rc.3** item by item (`npm run compat`); behaviour on 0.2.1 and earlier is unchanged.
|
|
45
49
|
- **Node.js** >= 18 (LTS recommended).
|
|
46
50
|
|
|
47
51
|
### From npm (recommended)
|
|
@@ -62,7 +66,7 @@ dsh plugin --profile web add github:objectivex666/dsh-settings-search
|
|
|
62
66
|
dsh plugin --profile web add /path/to/dsh-settings-search
|
|
63
67
|
```
|
|
64
68
|
|
|
65
|
-
After installing, **restart DSH** (`dsh web`); the search box appears
|
|
69
|
+
After installing, **restart DSH** (`dsh web`); the search box appears in the settings panel.
|
|
66
70
|
|
|
67
71
|
To uninstall: `dsh plugin --profile web remove @objectivex666/dsh-settings-search`.
|
|
68
72
|
|
|
@@ -115,9 +119,12 @@ scripts/log.test.mjs Host log file and route regression tests (temp dirs; never
|
|
|
115
119
|
## Development
|
|
116
120
|
|
|
117
121
|
```bash
|
|
118
|
-
npm test
|
|
122
|
+
npm test # structural checks and mocked Ollama / OpenAI / Anthropic regression tests
|
|
123
|
+
npm run compat # audit compatibility against the Harness installed on this machine
|
|
119
124
|
```
|
|
120
125
|
|
|
126
|
+
`npm run compat` reads the local install (auto-detected; `--asar <app.asar>` or `DSH_ASAR=<app.asar>` also work) and checks the surfaces this plugin relies on that belong to no npm API — service names, Remote descriptors, slots, theme tokens, the Fetch route registry, and the DeepSeek constants. Run it first after a Harness upgrade to see exactly what moved.
|
|
127
|
+
|
|
121
128
|
> Historical note: up to v1.1 the repo shipped `dsh-settings-search.js` (an
|
|
122
129
|
> in-session `cordis_define` dynamic-plugin source). Because keeping it in
|
|
123
130
|
> sync with the shipping package kept drifting silently, it was removed in
|
|
@@ -135,7 +142,7 @@ When submitting an issue, please include as much of the following as possible so
|
|
|
135
142
|
|
|
136
143
|
- **Problem description**: what you expected vs. what actually happened.
|
|
137
144
|
- **Reproduction steps**: a step-by-step walkthrough, including the triggering keywords and the settings page involved.
|
|
138
|
-
- **Logs**:
|
|
145
|
+
- **Logs**: open the "Logs" section of the plugin's page, use "Export logs", and paste the recent search/runtime logs (API keys are never logged, so it is safe to share); include any console errors as well.
|
|
139
146
|
- **Environment**: DSH version, Node.js version, plugin version (shown on the "Settings Search" page), OS, and browser.
|
|
140
147
|
- **Screenshots / screen recording**: helpful for UI-related issues.
|
|
141
148
|
|
|
@@ -143,8 +150,8 @@ When submitting an issue, please include as much of the following as possible so
|
|
|
143
150
|
|
|
144
151
|
Every version bump keeps git tags and GitHub Releases in sync, with a bilingual body that lists both new features and fixes:
|
|
145
152
|
|
|
146
|
-
- Update [CHANGELOG.md](./CHANGELOG.md) (Chinese) and [CHANGELOG.en.md](./CHANGELOG.en.md) (English), each with
|
|
147
|
-
- Bump
|
|
153
|
+
- Update [CHANGELOG.md](./CHANGELOG.md) (Chinese) and [CHANGELOG.en.md](./CHANGELOG.en.md) (English), each with a features section and a fixes section (`新功能` / `修复` in Chinese, `Features` / `Fixes` in English).
|
|
154
|
+
- Bump `version` in `package.json` together with `PKG_VERSION` in `lib/client.js` (`npm test` enforces they match), add the version label next to any new feature, then tag and push as `vX.Y.Z`; GitHub Actions publishes to npm (`npm-publish.yml`) and creates a bilingual GitHub Release (`release.yml`).
|
|
148
155
|
- Preview the release body locally: `node scripts/release.mjs --version <ver>`
|
|
149
156
|
- Tag and publish for real: `node scripts/release.mjs --version <ver> --publish` (requires `gh` CLI, logged in)
|
|
150
157
|
|
package/README.md
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
# dsh-settings-search
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> 给 DSH(Cordis)设置面板加一个搜索框,输入关键词就跳到对应的设置页和设置项。
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@objectivex666/dsh-settings-search)
|
|
6
6
|
[](./LICENSE)
|
|
7
7
|
[](https://nodejs.org)
|
|
8
8
|
[](https://awesome-dsh-plugin.com)
|
|
9
9
|
[](https://dsh-plugin.org/plugins/objectivex666/dsh-settings-search)
|
|
10
|
+
[](https://dshbase.com/zh/plugins/dsh-settings-search-plugin/)
|
|
11
|
+
[](https://dshfind.com/zh/plugins/objectivex666/dsh-settings-search?ref=badge)
|
|
10
12
|
|
|
11
13
|
**中文** · [English](./README.en.md)
|
|
12
14
|
|
|
@@ -14,36 +16,39 @@
|
|
|
14
16
|
|
|
15
17
|
## 功能特性
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
19
|
+
DSH 的设置项散落在各个分区和插件页里,找一个开关往往要一页页翻过去。这个插件把面板里的每一页、每一行都采进一份索引,再在面板上放一个搜索框,你直接说想找什么就行。
|
|
20
|
+
|
|
21
|
+
- 🔍 **实时搜索**。装好以后设置面板里会多出一个搜索框,输入关键词就实时过滤所有已注册的设置页(`settings.section`)与通用设置项(`settings.general.item`)。
|
|
22
|
+
- 🧩 **三种搜索样式**。经典侧栏、窗口顶栏、弹出搜索页,挑一个顺眼的。选择记在当前浏览器里,换浏览器或换机器要重新选一次。
|
|
23
|
+
- ⌨️ **搜索快捷键**(v1.10.0)。在设置面板里按 `Ctrl+F` 或 `⌘F`,焦点直接落到搜索框上。不需要的话可以在「设置搜索」页关掉,关掉以后按 `Ctrl+F` 恢复成浏览器自己的查找。
|
|
24
|
+
- 🤝 **导入 DSH 模型配置**(v1.9.0)。在 AI 配置区点一下,插件会读取 DSH 当前默认模型的 Base URL 与模型名。默认模型走 DSH 内置的 DeepSeek 路由、设置里没有 Base URL 时,导入的是 `https://api.deepseek.com/anthropic`。导入的内容里没有 API Key,这一点是有意的。
|
|
25
|
+
- 🎯 **新用户引导**(v1.9.0)。装好以后第一次打开设置面板时弹一次,讲的是实时搜索、拼音与意图联想、AI 联想、点击即达、自带设置页和自动导入索引。关掉就不会再出现,也没有手动重开的入口。
|
|
26
|
+
- 📂 **页内选项搜索**(v1.2.0)。索引里有页面,也有页面内部的选项,比如插件页的标签页(`settings.plugins.tab`)、插件页里的**会话插件 / 全局插件**分组标题、旧版的插件卡片座位(`settings.plugin.item` / `web-ui.plugin.item`,0.2 已移除)、通用设置行。结果显示成「页面 › 选项」的面包屑。
|
|
27
|
+
- 🔤 **拼音联想搜索**(v1.5.0)。输入拼音首字母(`sz`)或全拼(`shezhi`)就能联想到中文设置项。`↑`/`↓` 选择,`Enter` 跳转,`Esc` 关闭,命中的字自动高亮。
|
|
28
|
+
- 🧠 **意图联想搜索**(v1.6.0)。记不清选项叫什么也没关系,直接写「太亮了」「字太小」「忘记密码」,插件会猜你指的是哪几个设置,结果显示在「猜你想找」分组里。
|
|
29
|
+
- 🤖 **AI 联想搜索**。本地匹配不到时,把搜索词交给你自己配置的 OpenAI 兼容接口、Anthropic 或本机 Ollama 模型,由模型判断你想改什么。功能默认关闭,需要到「设置搜索」页打开并填好配置,Ollama 不必填 API Key。
|
|
30
|
+
- 💾 **持久设置索引**(v1.12.0)。采集过的索引存在本机浏览器里,只在首次安装,或者别的插件安装、更新、启用、停用时重建,也可以在「设置搜索」页手动重建。
|
|
31
|
+
- 🧾 **日志与查看**(v1.13.0 / v1.7.0)。插件运行、搜索与 AI 请求的关键动作按天写进 DSH 日志目录(`$DSH_HOME/logs/dsh-settings-search/settings-search-YYYY-MM-DD.log`,文件名带日期,一天一个)。单个文件写到 100 MB 就同日换编号分片续写(`.1`、`.2`…),整个日志目录上限 100 MB,超了删最旧的文件,正在写的那个不删。「设置搜索」页里可以直接查看日志、打开日志文件夹、复制、导出或清空,标题旁的计数是当天文件里的条目数。API Key 不会进日志。
|
|
32
|
+
- 🧭 **点击即达**。选中一条结果,插件替你点开左侧对应的导航项,目标在页内标签页里就继续点开那个标签,并把目标行高亮闪一下。跳不过去的时候显示手动路径提示。
|
|
33
|
+
- 🌱 **启动自动索引**(v1.8.0)。第一次打开设置面板时,插件自己把各分区走一遍,静默读走分区里的选项(比如「启用创意工坊卡片」)并收进索引,读完回到你原先待着的分区。过程里搜索框下方有提示,读完自动消失。这之后那些选项不用逐页打开也能搜到。
|
|
34
|
+
- 🛠 **自带设置页**(v1.4.0)。左侧导航多了「设置搜索」页,显示当前版本,可以一键查 npm 上的最新版本。有更新时给出能直接复制执行的升级命令,命令里带着 profile 名和最新版本号。
|
|
35
|
+
- 🧭 **更新说明查看**(v1.7.1)。「设置搜索」页的「检查更新」旁边还有一个「查看更新说明」,拉取 GitHub Release 的内容就地展示,拉不到就直接跳到 Release 页面。
|
|
36
|
+
- 🌐 **多语言支持**。内置中英文两套文案,跟着 DSH 的本地化系统走,也可以继续扩别的语言。
|
|
37
|
+
- 🎨 **主题适配**。样式全部用 CSS 变量写,亮色暗色跟着 DSH 走。
|
|
38
|
+
- ⚡ **动态响应**。插件实时订阅设置项的新增、删除和变更,结果列表跟着刷新。
|
|
35
39
|
|
|
36
40
|
---
|
|
37
41
|
|
|
38
42
|
## 安装(命令行)
|
|
39
43
|
|
|
40
|
-
本插件是一个标准的
|
|
41
|
-
|
|
44
|
+
本插件是一个标准的 DSH profile bundle。装完会自动写进设置面板,不需要手动改任何 DSH 配置文件。
|
|
45
|
+
|
|
46
|
+
下面的命令都是给命令行 profile 用的。桌面端用的是 `desktop` profile,由桌面应用自己管理,命令行改不动它,在桌面端装插件要走应用的插件管理页。
|
|
42
47
|
|
|
43
48
|
### 前置要求
|
|
44
49
|
|
|
45
|
-
- **DeepSeek Harness (DSH)
|
|
46
|
-
- **Node.js
|
|
50
|
+
- **DeepSeek Harness (DSH)**。DSH 0.2 正式版(桌面版与 `dsh web`)和更早的 0.1 版本都可以,插件会按运行中的版本自动选择对应接口。当前已在 **0.2.2-rc.3** 上逐项核对过(`npm run compat`),0.2.1 及更早版本的行为保持不变。
|
|
51
|
+
- **Node.js**。18 或更高,推荐 LTS。
|
|
47
52
|
|
|
48
53
|
### 通过 npm 安装(推荐)
|
|
49
54
|
|
|
@@ -63,16 +68,23 @@ dsh plugin --profile web add github:objectivex666/dsh-settings-search
|
|
|
63
68
|
dsh plugin --profile web add /path/to/dsh-settings-search
|
|
64
69
|
```
|
|
65
70
|
|
|
66
|
-
|
|
67
|
-
卸载:`dsh plugin --profile web remove @objectivex666/dsh-settings-search`。
|
|
71
|
+
装完记得重启 DSH(`dsh web`),打开设置面板就能看见搜索框。要卸载就跑 `dsh plugin --profile web remove @objectivex666/dsh-settings-search`。
|
|
68
72
|
|
|
69
|
-
>
|
|
73
|
+
> 如果你的 profile 不叫 `web`,把命令里的 `--profile web` 换成实际的名字。
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 它不做什么
|
|
78
|
+
|
|
79
|
+
- 索引存在本机浏览器里,换个浏览器要重新采集一遍。
|
|
80
|
+
- 导入 DSH 模型配置时不带 API Key,写日志时也不记录 API Key。
|
|
81
|
+
- 关掉搜索快捷键之后,`Ctrl+F` 还给浏览器,插件不再拦截。
|
|
70
82
|
|
|
71
83
|
---
|
|
72
84
|
|
|
73
85
|
## 手动接线(不通过命令行安装时)
|
|
74
86
|
|
|
75
|
-
|
|
87
|
+
不想用命令行的话,把本包加进 profile 依赖,声明成 bundle 层就行(`dsh plugin add` 帮你做的就是这件事)。
|
|
76
88
|
|
|
77
89
|
```yaml
|
|
78
90
|
# 你的 profile 的 cordis.patch.yml(或通过 --patch 传入)
|
|
@@ -81,27 +93,26 @@ dsh plugin --profile web add /path/to/dsh-settings-search
|
|
|
81
93
|
name: '@objectivex666/dsh-settings-search'
|
|
82
94
|
```
|
|
83
95
|
|
|
84
|
-
包内自带 `cordis.patch.yml
|
|
96
|
+
包内自带 `cordis.patch.yml`,内容和上面一样,`dsh plugin add` 会自动应用。
|
|
85
97
|
|
|
86
98
|
---
|
|
87
99
|
|
|
88
100
|
## 本机 Ollama(v1.11.0)
|
|
89
101
|
|
|
90
|
-
|
|
102
|
+
在「设置搜索」页打开「AI 联想搜索」,把「接口类型」选成「Ollama(本机)」,要填的东西不多。
|
|
91
103
|
|
|
92
|
-
- **Base URL
|
|
93
|
-
-
|
|
94
|
-
- **API Key
|
|
104
|
+
- **Base URL**。默认 `http://127.0.0.1:11434`,端口可以自己改。填根地址、`/api`、`/api/chat` 或 `/v1` 都能识别。
|
|
105
|
+
- **模型名**。点「获取模型」从服务返回的列表里挑,也可以手动敲完整模型名(包括标签),用 `ollama list` 能看到手头有哪些。
|
|
106
|
+
- **API Key**。不用填,发往 Ollama 的请求不会带上原来那套云端密钥。
|
|
95
107
|
|
|
96
|
-
|
|
108
|
+
保存后可以点「测试接口」看看通不通。本地模型第一次加载可能比较慢,Ollama 请求的超时时间定在 120 秒,搜索中途取消会中止这次请求。
|
|
97
109
|
|
|
98
|
-
|
|
110
|
+
请求由浏览器直接发出,所以「本机」说的是浏览器所在的那台机器,不是 DSH 服务器所在的机器。插件不会安装或启动 Ollama,也不会下载模型,服务和模型都要自己准备好。
|
|
99
111
|
|
|
100
|
-
|
|
112
|
+
连不上先看服务地址对不对。浏览器报跨域错误时,把当前 DSH 页面的确切来源(例如 `http://127.0.0.1:3080`)加进 Ollama 的 `OLLAMA_ORIGINS`,重启 Ollama 再试,别图省事写通配符来源。Ollama 不在本机时,地址仍然要求 HTTPS。
|
|
101
113
|
|
|
102
114
|
---
|
|
103
115
|
|
|
104
|
-
|
|
105
116
|
## 包结构
|
|
106
117
|
|
|
107
118
|
```
|
|
@@ -116,35 +127,34 @@ scripts/log.test.mjs 宿主日志文件与路由回归测试(临时目录,
|
|
|
116
127
|
## 开发
|
|
117
128
|
|
|
118
129
|
```bash
|
|
119
|
-
npm test
|
|
130
|
+
npm test # 结构检查及 Ollama / OpenAI / Anthropic 模拟接口回归测试
|
|
131
|
+
npm run compat # 针对本机已安装的 Harness 核对兼容性(服务名、Remote 描述符、slot、主题令牌、路由、DeepSeek 常量)
|
|
120
132
|
```
|
|
121
133
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
134
|
+
`npm run compat` 直接读本机安装包(默认自动查找,也可 `--asar <app.asar>` 或 `DSH_ASAR=<app.asar>`),
|
|
135
|
+
Harness 升级后先跑一遍就能知道哪些「非公开契约」变了——它检查的正是这个插件依赖、但不属于任何 npm API 的那些接口。
|
|
136
|
+
|
|
137
|
+
> 历史说明。v1.1 及更早的版本里,仓库还带一个 `dsh-settings-search.js`(会话内 `cordis_define` 动态插件源)。它和正式包长期分头维护,两边越改越不像,v1.4.1 已经删掉。想参考动态插件的写法可以翻 git 历史,tag `v1.4.0` 里还在。
|
|
125
138
|
|
|
126
139
|
## 反馈与贡献
|
|
127
140
|
|
|
128
|
-
|
|
129
|
-
[GitHub Issues](https://github.com/objectivex666/dsh-settings-search/issues),
|
|
130
|
-
也欢迎直接发起 [Pull Request](https://github.com/objectivex666/dsh-settings-search/pulls)——
|
|
131
|
-
动手前请先读一遍 [贡献指南](./CONTRIBUTING.md)(结构、代码约定、测试与发布流程)。
|
|
141
|
+
用着不对劲、想到什么功能,或者只是没搞明白怎么用,都可以开 [GitHub Issues](https://github.com/objectivex666/dsh-settings-search/issues) 说。也欢迎直接提 [Pull Request](https://github.com/objectivex666/dsh-settings-search/pulls),动手改代码之前先看一眼 [贡献指南](./CONTRIBUTING.md),结构、代码约定、测试和发布流程都写在里面。
|
|
132
142
|
|
|
133
|
-
|
|
143
|
+
提 Issue 时把这些写全,定位和复现都会快很多。
|
|
134
144
|
|
|
135
|
-
-
|
|
136
|
-
-
|
|
137
|
-
-
|
|
138
|
-
-
|
|
139
|
-
-
|
|
145
|
+
- **问题描述**。你期望发生什么,实际发生了什么。
|
|
146
|
+
- **复现步骤**。一步步写清楚怎么做,包括输入的关键词和当时所在的设置页。
|
|
147
|
+
- **日志**。在「设置搜索」页的「日志」区块里点「导出日志」,把最近的搜索与运行日志贴上来,API Key 不会被记录,可以放心发,控制台里的报错也一并附上更好。
|
|
148
|
+
- **环境信息**。DSH 版本、Node.js 版本、插件版本(「设置搜索」页能看到)、操作系统和浏览器。
|
|
149
|
+
- **截图或录屏**。跟界面表现有关的问题,截图比文字描述清楚。
|
|
140
150
|
|
|
141
151
|
## 更新日志与发布
|
|
142
152
|
|
|
143
|
-
|
|
153
|
+
每次版本更新要同时更新 GitHub Release 和 git tag,正文双语,写清「新功能」与「修复」。
|
|
144
154
|
|
|
145
|
-
- 更新 [CHANGELOG.md](./CHANGELOG.md)
|
|
146
|
-
-
|
|
147
|
-
- 本地预览 release
|
|
148
|
-
-
|
|
155
|
+
- 更新 [CHANGELOG.md](./CHANGELOG.md)(中文)和 [CHANGELOG.en.md](./CHANGELOG.en.md)(英文),两边各要有「新功能」和「修复」两节,英文对应 Features 与 Fixes。
|
|
156
|
+
- 把 `package.json` 的 `version` 和 `lib/client.js` 里的 `PKG_VERSION` 一起改掉(`npm test` 会校验两者一致),功能列表旁边新加的版本标注也顺手补上,然后按 `vX.Y.Z` 打 tag 并推送。GitHub Actions 会同时发 npm(`npm-publish.yml`)并创建双语 GitHub Release(`release.yml`)。
|
|
157
|
+
- 本地预览 release 正文用 `node scripts/release.mjs --version <ver>`
|
|
158
|
+
- 打 tag 并发布用 `node scripts/release.mjs --version <ver> --publish`(需要装好 `gh` CLI 并已登录)
|
|
149
159
|
|
|
150
|
-
>
|
|
160
|
+
> 不带 `--publish` 时,脚本只校验并打印 release 正文,不会创建 tag、推送或发布。
|