@surfishs/dsh-prompt-enhance 0.0.7 → 0.0.8
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 +3 -0
- package/README.md +3 -0
- package/cordis.patch.yml +1 -1
- package/lib/client.js +341 -383
- package/lib/index.js +67 -56
- package/lib/index.js.map +3 -3
- package/package.json +23 -15
- package/src/client/ActionIcons.tsx +4 -17
- package/src/client/EnhanceButton.tsx +52 -48
- package/src/client/ResultDock.tsx +22 -9
- package/src/client/ResultPanel.tsx +83 -52
- package/src/client/SparkleFishIcon.tsx +3 -13
- package/src/client/SparkleIcon.tsx +2 -12
- package/src/client/UndoBar.tsx +11 -6
- package/src/client/enhance-client.ts +44 -40
- package/src/client/index.tsx +3 -12
- package/src/client/llm-catalog.ts +14 -16
- package/src/client/locales.ts +18 -4
- package/src/client/reasoning-options.ts +7 -15
- package/src/client/settings-page-controls.tsx +449 -0
- package/src/client/settings-page-copy.ts +112 -0
- package/src/client/settings-page-spec.ts +330 -0
- package/src/client/settings-page-styles.ts +161 -0
- package/src/client/settings-page.tsx +113 -1110
- package/src/client/settings-source.ts +41 -31
- package/src/client/settings.ts +17 -12
- package/src/client/shortcut.ts +7 -6
- package/src/client/useDockAlignment.ts +5 -15
- package/src/config.ts +84 -27
- package/src/context.ts +1 -5
- package/src/enhance-routes.ts +8 -8
- package/src/enhancer.ts +43 -34
- package/src/orchestrate.ts +19 -23
- package/src/prompts.ts +4 -4
- package/src/provider-catalog.ts +1 -1
- package/src/reasoning-cache.ts +4 -4
- package/src/reasoning-efforts.ts +4 -9
- package/src/settings-source.ts +37 -23
- package/src/shared/limits.ts +38 -0
- package/src/shared/normalize.ts +4 -1
- package/src/shared/protocol.ts +27 -23
- package/src/shared/reasoning.ts +1 -7
- package/src/shared/stream-text.ts +0 -6
- package/src/shared/validate.ts +3 -9
- package/docs/code-review-2026-09.md +0 -211
- package/docs/handoff-settings-page.md +0 -195
- package/docs/release-0.2.3.md +0 -47
- package/docs/release-0.2.4.md +0 -20
- package/docs/release-0.2.5.md +0 -28
- package/docs/release-0.2.6.md +0 -33
- package/docs/release-0.2.7.md +0 -22
- package/docs/release-0.3.0.md +0 -36
- package/docs/release-0.3.1.md +0 -50
- package/docs/release-0.3.2.md +0 -41
- package/docs/release-0.3.3.md +0 -53
- package/docs/release-0.3.4.md +0 -43
package/README.en.md
CHANGED
|
@@ -123,6 +123,7 @@ An empty or attachment-only draft dims the button and starts no request; raise `
|
|
|
123
123
|
- **No model keys stored**: the plugin does not read or store model API keys; calls use the host's existing LLM configuration.
|
|
124
124
|
- **Context sent only when enabled**: with `contextAware` on, the most recent user/assistant text and the current draft are sent to the configured model provider (default: up to 8 messages and 4,000 characters); system messages, reasoning, tool results and attachments are excluded. With it off, only the draft is sent.
|
|
125
125
|
- **Sensitive conversations**: if the content must not leave the machine, turn off `contextAware` or use a local/private model route you trust.
|
|
126
|
+
- **Local tier cache**: the plugin caches "which reasoning tiers does this route declare" in `$DSH_HOME/dsh-prompt-enhance/reasoning-efforts.json` (`~/.dsh/…` when `DSH_HOME` is unset). The file holds only the provider, the model and the tier metadata — no API key, draft or conversation text. The cache has no expiry; refresh it from the settings page's tier-refresh control, or delete the file.
|
|
126
127
|
|
|
127
128
|
## Troubleshooting
|
|
128
129
|
|
|
@@ -139,6 +140,8 @@ An empty or attachment-only draft dims the button and starts no request; raise `
|
|
|
139
140
|
```bash
|
|
140
141
|
npm install
|
|
141
142
|
npm run typecheck
|
|
143
|
+
npm run lint
|
|
144
|
+
npm run format:check
|
|
142
145
|
npm test
|
|
143
146
|
npm run build
|
|
144
147
|
```
|
package/README.md
CHANGED
|
@@ -123,6 +123,7 @@ dsh plugin --profile <profile> remove @surfishs/dsh-prompt-enhance
|
|
|
123
123
|
- **不保存模型密钥**:插件不读取或存储模型 API key,调用走宿主已有的 LLM 配置。
|
|
124
124
|
- **上下文按需发送**:`contextAware` 开启时,最近几轮 user/assistant 文本和当前草稿会发给当前配置的模型服务商(默认最多 8 条消息、4000 字符);system、reasoning、工具结果和附件不会进入上下文。关闭后只发送草稿。
|
|
125
125
|
- **敏感会话**:如果内容不能外发,请关闭 `contextAware`,或改用你信任的本地/私有模型服务。
|
|
126
|
+
- **本机档位缓存**:插件会把「当前路由声明了哪些推理档位」的查询结果缓存到 `$DSH_HOME/dsh-prompt-enhance/reasoning-efforts.json`(未设置 `DSH_HOME` 时为 `~/.dsh/…`)。文件内容只有 provider、model 与档位信息,不含 API key、草稿或对话内容;缓存没有过期时间,可在设置页点「重新获取档位」刷新,或直接删除该文件。
|
|
126
127
|
|
|
127
128
|
## 故障排查
|
|
128
129
|
|
|
@@ -139,6 +140,8 @@ dsh plugin --profile <profile> remove @surfishs/dsh-prompt-enhance
|
|
|
139
140
|
```bash
|
|
140
141
|
npm install
|
|
141
142
|
npm run typecheck
|
|
143
|
+
npm run lint
|
|
144
|
+
npm run format:check
|
|
142
145
|
npm test
|
|
143
146
|
npm run build
|
|
144
147
|
```
|
package/cordis.patch.yml
CHANGED