dsh-agent-enhancer 0.0.0-stage → 0.2.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/LICENSE +21 -0
- package/README.en.md +181 -0
- package/README.md +180 -2
- package/cordis.patch.yml +3 -0
- package/lib/client/dsh/controls.d.ts +8 -0
- package/lib/client/dsh/controls.d.ts.map +1 -0
- package/lib/client/dsh/conversation.d.ts +11 -0
- package/lib/client/dsh/conversation.d.ts.map +1 -0
- package/lib/client/dsh/editor.d.ts +19 -0
- package/lib/client/dsh/editor.d.ts.map +1 -0
- package/lib/client/dsh/hints.d.ts +7 -0
- package/lib/client/dsh/hints.d.ts.map +1 -0
- package/lib/client/dsh/icons.d.ts +3 -0
- package/lib/client/dsh/icons.d.ts.map +1 -0
- package/lib/client/dsh/model-catalog.d.ts +33 -0
- package/lib/client/dsh/model-catalog.d.ts.map +1 -0
- package/lib/client/dsh/overlay.d.ts +10 -0
- package/lib/client/dsh/overlay.d.ts.map +1 -0
- package/lib/client/dsh/plugin-hints.d.ts +33 -0
- package/lib/client/dsh/plugin-hints.d.ts.map +1 -0
- package/lib/client/dsh/settings-form.d.ts +15 -0
- package/lib/client/dsh/settings-form.d.ts.map +1 -0
- package/lib/client/dsh/settings.d.ts +13 -0
- package/lib/client/dsh/settings.d.ts.map +1 -0
- package/lib/client/dsh/structured.d.ts +6 -0
- package/lib/client/dsh/structured.d.ts.map +1 -0
- package/lib/client/index.d.ts +4 -0
- package/lib/client/index.d.ts.map +1 -0
- package/lib/client/locales.d.ts +194 -0
- package/lib/client/locales.d.ts.map +1 -0
- package/lib/client/prompt/coordinator.d.ts +86 -0
- package/lib/client/prompt/coordinator.d.ts.map +1 -0
- package/lib/client/prompt/history.d.ts +13 -0
- package/lib/client/prompt/history.d.ts.map +1 -0
- package/lib/client/prompt/optimize.d.ts +50 -0
- package/lib/client/prompt/optimize.d.ts.map +1 -0
- package/lib/client/prompt/predict.d.ts +32 -0
- package/lib/client/prompt/predict.d.ts.map +1 -0
- package/lib/client/prompt/session.d.ts +39 -0
- package/lib/client/prompt/session.d.ts.map +1 -0
- package/lib/client/prompt/types.d.ts +38 -0
- package/lib/client/prompt/types.d.ts.map +1 -0
- package/lib/client/remote.d.ts +43 -0
- package/lib/client/remote.d.ts.map +1 -0
- package/lib/client/rollback/actions.d.ts +15 -0
- package/lib/client/rollback/actions.d.ts.map +1 -0
- package/lib/client/rollback/command-ui.d.ts +35 -0
- package/lib/client/rollback/command-ui.d.ts.map +1 -0
- package/lib/client/rollback/content-parts.d.ts +8 -0
- package/lib/client/rollback/content-parts.d.ts.map +1 -0
- package/lib/client/rollback/controller.d.ts +23 -0
- package/lib/client/rollback/controller.d.ts.map +1 -0
- package/lib/client/rollback/marker.d.ts +4 -0
- package/lib/client/rollback/marker.d.ts.map +1 -0
- package/lib/client/rollback/modal-host.d.ts +11 -0
- package/lib/client/rollback/modal-host.d.ts.map +1 -0
- package/lib/client/rollback/preview.d.ts +16 -0
- package/lib/client/rollback/preview.d.ts.map +1 -0
- package/lib/client/rollback/remote.d.ts +34 -0
- package/lib/client/rollback/remote.d.ts.map +1 -0
- package/lib/client/rollback/scope.d.ts +5 -0
- package/lib/client/rollback/scope.d.ts.map +1 -0
- package/lib/client/rollback/transcript-filter.d.ts +9 -0
- package/lib/client/rollback/transcript-filter.d.ts.map +1 -0
- package/lib/client/rollback/transcript.d.ts +27 -0
- package/lib/client/rollback/transcript.d.ts.map +1 -0
- package/lib/client/rollback/turn-outline-filter.d.ts +9 -0
- package/lib/client/rollback/turn-outline-filter.d.ts.map +1 -0
- package/lib/client/rollback/types.d.ts +27 -0
- package/lib/client/rollback/types.d.ts.map +1 -0
- package/lib/client/rollback/undo-tip.d.ts +9 -0
- package/lib/client/rollback/undo-tip.d.ts.map +1 -0
- package/lib/client/rollback/user-node.d.ts +10 -0
- package/lib/client/rollback/user-node.d.ts.map +1 -0
- package/lib/client.js +3597 -0
- package/lib/client.js.map +1 -0
- package/lib/config.d.ts +24 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/errors.d.ts +7 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/host/catalog.d.ts +8 -0
- package/lib/host/catalog.d.ts.map +1 -0
- package/lib/host/checkpoint/availability.d.ts +9 -0
- package/lib/host/checkpoint/availability.d.ts.map +1 -0
- package/lib/host/checkpoint/capture.d.ts +47 -0
- package/lib/host/checkpoint/capture.d.ts.map +1 -0
- package/lib/host/checkpoint/dsh.d.ts +10 -0
- package/lib/host/checkpoint/dsh.d.ts.map +1 -0
- package/lib/host/checkpoint/files.d.ts +69 -0
- package/lib/host/checkpoint/files.d.ts.map +1 -0
- package/lib/host/checkpoint/live.d.ts +34 -0
- package/lib/host/checkpoint/live.d.ts.map +1 -0
- package/lib/host/checkpoint/service.d.ts +98 -0
- package/lib/host/checkpoint/service.d.ts.map +1 -0
- package/lib/host/checkpoint/store.d.ts +28 -0
- package/lib/host/checkpoint/store.d.ts.map +1 -0
- package/lib/host/checkpoint/types.d.ts +47 -0
- package/lib/host/checkpoint/types.d.ts.map +1 -0
- package/lib/host/index.d.ts +88 -0
- package/lib/host/index.d.ts.map +1 -0
- package/lib/host/model.d.ts +21 -0
- package/lib/host/model.d.ts.map +1 -0
- package/lib/host/prompts.d.ts +12 -0
- package/lib/host/prompts.d.ts.map +1 -0
- package/lib/host/rpc.d.ts +135 -0
- package/lib/host/rpc.d.ts.map +1 -0
- package/lib/host/structured.d.ts +12 -0
- package/lib/host/structured.d.ts.map +1 -0
- package/lib/host/types.d.ts +52 -0
- package/lib/host/types.d.ts.map +1 -0
- package/lib/identity.d.ts +17 -0
- package/lib/identity.d.ts.map +1 -0
- package/lib/index.js +2546 -0
- package/lib/index.js.map +7 -0
- package/package.json +152 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 rebornace
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.en.md
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# DSH Agent Enhancer
|
|
2
|
+
|
|
3
|
+
**中文:** [README.md](./README.md)
|
|
4
|
+
|
|
5
|
+
> One plugin to make DeepSeek Harness Desktop **easier to write, refine, and roll back**, and to keep moving toward mainstream agent UX.
|
|
6
|
+
> Prompt history · one-click optimize · next-prompt predict · conversation & file restore — inside the official conversation input, no extra window.
|
|
7
|
+
|
|
8
|
+
[](https://www.npmjs.com/package/dsh-agent-enhancer)
|
|
9
|
+
[](https://www.npmjs.com/package/dsh-agent-enhancer)
|
|
10
|
+
[](https://awesome-dsh-plugin.com)
|
|
11
|
+
[](./LICENSE)
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Know it in 30 seconds
|
|
16
|
+
|
|
17
|
+
| You want to… | Do this |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| Revisit a prompt you just sent | `↑` on the first draft line / `↓` on the last, or `Alt+R` |
|
|
20
|
+
| Clarify a messy draft | Click **Optimize** on the right; **Undo** if needed |
|
|
21
|
+
| Continue after a reply | Press `Tab` to accept the gray suggestion |
|
|
22
|
+
| Go back before a turn | Click **Restore to here**, then confirm in the preview |
|
|
23
|
+
| Spend less on helper calls | Pick a cheaper model for optimize / predict in settings |
|
|
24
|
+
| Turn a feature off | **Settings → Built-in plugins → Agent Enhance** |
|
|
25
|
+
|
|
26
|
+
Defaults: all four features on. UI language follows Desktop (`zh` / `en`).
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Feature map
|
|
31
|
+
|
|
32
|
+
| Feature | How to use | Notes |
|
|
33
|
+
| --- | --- | --- |
|
|
34
|
+
| **Prompt history** | First-line `↑`, last-line `↓`; `Esc` to exit; `Alt+R` (`Ctrl+R` where available) | Current loaded session only; `Enter` fills draft without sending; chip drafts ignore history keys |
|
|
35
|
+
| **Prompt optimize** | Optimize on the right; selection-only when selected; undo supported | Vague drafts gain detail; specific drafts stay lean; chips kept; optional dedicated model |
|
|
36
|
+
| **Next-prompt predict** | Gray suggestion after a reply; `Tab` to accept | At most once per turn; clears on type / session switch |
|
|
37
|
+
| **Conversation & file restore** | **Restore to here** on the message; after restore open **+** or type `/`, then **Undo restore** (only while an undo tip remains) | Conversation only, or conversation + tracked files; no processes / terminals / untracked files |
|
|
38
|
+
|
|
39
|
+
### Settings
|
|
40
|
+
|
|
41
|
+
**Settings → Built-in plugins → Agent Enhance**
|
|
42
|
+
|
|
43
|
+
| Toggle | Config key | Default | Effect |
|
|
44
|
+
| --- | --- | --- | --- |
|
|
45
|
+
| Prompt history | `historyEnabled` | On | `↑↓` and `Alt+R` |
|
|
46
|
+
| Prompt optimize | `optimizeEnabled` | On | Optimize / undo; model pill |
|
|
47
|
+
| Next-prompt prediction | `predictEnabled` | On | Gray suggestion; model pill |
|
|
48
|
+
| Conversation & file restore | `rollbackEnabled` | On | **Restore to here**; **+** / `/` menu **Undo restore** |
|
|
49
|
+
|
|
50
|
+
Model pills default to **Follow session**, or pick provider / model / reasoning effort. See the UI map below for screenshots.
|
|
51
|
+
|
|
52
|
+
### UI map
|
|
53
|
+
|
|
54
|
+
| Screen | What you see | Preview |
|
|
55
|
+
| --- | --- | --- |
|
|
56
|
+
| History search | `Alt+R` surface and result list |  |
|
|
57
|
+
| Optimize & predict | Optimize control + gray suggestion after a reply |  |
|
|
58
|
+
| Rollback entry | Restore icon; tooltip **Restore to here** |  |
|
|
59
|
+
| Rollback preview | Conversation to withdraw; conversation-only or + tracked files |  |
|
|
60
|
+
| Undo restore | After restore, open input **+** or `/`, choose **Undo restore** |  |
|
|
61
|
+
| Settings · Agent Enhance | Four toggles, model pills, privacy blurb |  |
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Install
|
|
66
|
+
|
|
67
|
+
Quit every Desktop window and tray process before install, upgrade, or uninstall.
|
|
68
|
+
This plugin targets **Desktop / the `desktop` profile** (do not validate with `web`). It is listed on [awesome-dsh-plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin); you can also search for `dsh-agent-enhancer` / **Agent Enhance** in third-party markets.
|
|
69
|
+
|
|
70
|
+
### Official Desktop · in-app install (recommended)
|
|
71
|
+
|
|
72
|
+
For the [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) **official Desktop** (and other official builds that ship **Settings → Plugins**):
|
|
73
|
+
|
|
74
|
+
1. Open **Settings → Plugins** (or the **Plugins** sidebar entry).
|
|
75
|
+
2. Search for `dsh-agent-enhancer` or **Agent Enhance**, then install when prompted.
|
|
76
|
+
3. Fully quit and restart Desktop.
|
|
77
|
+
|
|
78
|
+
> Desktop manages its own profile. Do **not** install into Desktop with `dsh plugin --profile web …` — the command may succeed while writing to `profiles/web`, which Desktop never loads.
|
|
79
|
+
|
|
80
|
+
### dsh-market (optional)
|
|
81
|
+
|
|
82
|
+
For a dedicated market UI / one-click upgrades, install the community market [dsh-market](https://github.com/dsh-market/dsh-market):
|
|
83
|
+
|
|
84
|
+
- **Official Desktop:** in-app **Settings → Plugins**, search `dshmarket` and install (do not use the CLI `web` profile).
|
|
85
|
+
- **Plain `dsh web`:** `dsh plugin --profile web add dshmarket`, then restart.
|
|
86
|
+
|
|
87
|
+
Then open the **Plugin Market** tab, search, and install this plugin. Some third-party Desktop clients ship or recommend this market by default.
|
|
88
|
+
|
|
89
|
+
### CLI · npm
|
|
90
|
+
|
|
91
|
+
When the `dsh` CLI is available and you intend to write the **desktop** profile:
|
|
92
|
+
|
|
93
|
+
```sh
|
|
94
|
+
dsh plugin --profile desktop add dsh-agent-enhancer@0.2.0
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Or unpinned: `dsh plugin --profile desktop add dsh-agent-enhancer`.
|
|
98
|
+
If you previously installed `dsh-composer-enhancer`, remove it first, then install this package.
|
|
99
|
+
You should then see the optimize control and **Agent Enhance** in settings.
|
|
100
|
+
|
|
101
|
+
### Local directory (development)
|
|
102
|
+
|
|
103
|
+
`dsh plugin` forwards arguments to pnpm inside the profile directory. Pass an **absolute path** so the profile stores `link:<path>` and adds the bundle:
|
|
104
|
+
|
|
105
|
+
```powershell
|
|
106
|
+
corepack pnpm install --frozen-lockfile
|
|
107
|
+
corepack pnpm build
|
|
108
|
+
dsh plugin --profile desktop add ((Resolve-Path .).Path)
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Fully quit and restart Desktop afterward. Later code changes only need `corepack pnpm build` (Desktop loads `lib/`).
|
|
112
|
+
Keep host-shared DSH packages in both `peerDependencies` and `devDependencies`, not in `dependencies`.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Privacy & coexistence
|
|
117
|
+
|
|
118
|
+
| Topic | Detail |
|
|
119
|
+
| --- | --- |
|
|
120
|
+
| History | Never calls a model |
|
|
121
|
+
| Optimize | Sends draft/selection + latest completed turn |
|
|
122
|
+
| Predict | Sends the latest completed turn |
|
|
123
|
+
| Cache | In-session memory only |
|
|
124
|
+
| Audit | Local `plugin:agent-enhancer/request` (no telemetry upload) |
|
|
125
|
+
| Coexistence | Hints only — never auto-disables third-party plugins |
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Compatibility
|
|
130
|
+
|
|
131
|
+
- **DSH:** `>=0.2.1-rc.5 <0.3.0-0` (`0.2.1-rc.3` fails to load)
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Uninstall
|
|
136
|
+
|
|
137
|
+
| Install type | Action |
|
|
138
|
+
| --- | --- |
|
|
139
|
+
| Official Desktop / dsh-market | Uninstall or disable the plugin on the in-app **Plugins** page; or `dsh plugin --profile desktop remove dsh-agent-enhancer` |
|
|
140
|
+
| CLI npm | `dsh plugin --profile desktop remove dsh-agent-enhancer` |
|
|
141
|
+
| Local `link:` | **Do not** `remove` / run `pnpm remove` in the profile (can delete the source repo). Follow below |
|
|
142
|
+
|
|
143
|
+
1. Quit Desktop (including tray)
|
|
144
|
+
2. Edit the **profile** `package.json`: drop this plugin from `dependencies` and `dsh.profile.bundles`
|
|
145
|
+
3. Refresh deps and delete the link only (not its target):
|
|
146
|
+
|
|
147
|
+
```powershell
|
|
148
|
+
$DshHome = if ($env:DSH_HOME) { $env:DSH_HOME } else { Join-Path $env:USERPROFILE '.dsh' }
|
|
149
|
+
$ProfileDir = Join-Path $DshHome 'profiles\desktop'
|
|
150
|
+
dsh plugin --profile desktop install
|
|
151
|
+
$PluginLink = Join-Path $ProfileDir 'node_modules\dsh-agent-enhancer'
|
|
152
|
+
$Item = Get-Item -LiteralPath $PluginLink -Force -ErrorAction SilentlyContinue
|
|
153
|
+
if ($Item -and $Item.LinkType -in @('SymbolicLink', 'Junction')) { $Item.Delete() }
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Development
|
|
159
|
+
|
|
160
|
+
```powershell
|
|
161
|
+
corepack pnpm install --frozen-lockfile
|
|
162
|
+
corepack pnpm typecheck
|
|
163
|
+
corepack pnpm test
|
|
164
|
+
corepack pnpm build # Desktop loads lib/
|
|
165
|
+
corepack pnpm check # typecheck + test + build + pack verify
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
| Path | Contents |
|
|
169
|
+
| --- | --- |
|
|
170
|
+
| `src/host/` | Model calls, RPC, checkpoint rollback |
|
|
171
|
+
| `src/client/` | Conversation input UI and state machines |
|
|
172
|
+
| `tests/` | Vitest |
|
|
173
|
+
| `lib/` | Build output |
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## License
|
|
178
|
+
|
|
179
|
+
[MIT](./LICENSE)
|
|
180
|
+
|
|
181
|
+
See [CHANGELOG.md](./CHANGELOG.md) for release notes.
|
package/README.md
CHANGED
|
@@ -1,3 +1,181 @@
|
|
|
1
|
-
#
|
|
1
|
+
# DSH Agent Enhancer
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**English:** [README.en.md](./README.en.md)
|
|
4
|
+
|
|
5
|
+
> 一个插件,让 DeepSeek Harness Desktop **更好写、更好改、更好回退**,并持续向主流 Agent 体验对齐。
|
|
6
|
+
> 历史回顾 · 一键优化 · 下一条预测 · 对话与文件恢复 —— 嵌在官方会话输入区,不用另开窗口。
|
|
7
|
+
|
|
8
|
+
[](https://www.npmjs.com/package/dsh-agent-enhancer)
|
|
9
|
+
[](https://www.npmjs.com/package/dsh-agent-enhancer)
|
|
10
|
+
[](https://awesome-dsh-plugin.com)
|
|
11
|
+
[](./LICENSE)
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 30 秒看懂
|
|
16
|
+
|
|
17
|
+
| 你想… | 怎么做 |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| 找回刚发过的提示词 | 草稿首行 `↑` / 末行 `↓`,或 `Alt+R` 搜索 |
|
|
20
|
+
| 把糊草稿写清楚 | 输入框右侧点 **优化**,不满意再 **撤销** |
|
|
21
|
+
| 顺着上一轮继续问 | 回复结束后按 `Tab` 采纳灰字建议 |
|
|
22
|
+
| 回到某一轮之前 | 点 **恢复到这里**,在预览里确认范围 |
|
|
23
|
+
| 省一点模型费用 | 设置里给优化 / 预测单独选更便宜的模型 |
|
|
24
|
+
| 关掉某个能力 | **设置 → 内置插件 → 智能体增强** |
|
|
25
|
+
|
|
26
|
+
默认四项均开启。界面语言跟随 Desktop(`zh` / `en`)。
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 功能对照
|
|
31
|
+
|
|
32
|
+
| 功能 | 怎么用 | 要点 |
|
|
33
|
+
| --- | --- | --- |
|
|
34
|
+
| **历史提示词** | 首行 `↑`、末行 `↓`;`Esc` 退出;`Alt+R` 搜索(兼容 `Ctrl+R`) | 只覆盖当前已加载会话;`Enter` 只填草稿不发送;含 chip 的草稿不误触发 |
|
|
35
|
+
| **提示词优化** | 点右侧优化;有选区只改选区;可撤销 | 模糊稿补全执行信息,明确稿少改;保留引用 / chip;可单独选模型 |
|
|
36
|
+
| **下一条预测** | 回复结束后看灰字,`Tab` 采纳 | 每轮最多一条;输入或切会话会清除 |
|
|
37
|
+
| **对话与文件恢复** | 消息旁点 **恢复到这里**;恢复后点输入框 **+** 或键入 `/`,选 **撤销恢复**(仅有可撤销 tip 时出现) | 可选仅对话,或对话 + 已跟踪文件;不恢复进程 / 终端 / 未跟踪文件等 |
|
|
38
|
+
|
|
39
|
+
### 设置
|
|
40
|
+
|
|
41
|
+
路径:**设置 → 内置插件 → 智能体增强**
|
|
42
|
+
|
|
43
|
+
| 开关 | 配置键 | 默认 | 作用 |
|
|
44
|
+
| --- | --- | --- | --- |
|
|
45
|
+
| 历史提示词 | `historyEnabled` | 开 | `↑↓` 与 `Alt+R` |
|
|
46
|
+
| 提示词优化 | `optimizeEnabled` | 开 | 优化 / 撤销;旁有模型药丸 |
|
|
47
|
+
| 下一条提示词预测 | `predictEnabled` | 开 | 灰字建议;旁有模型药丸 |
|
|
48
|
+
| 对话与文件恢复 | `rollbackEnabled` | 开 | 「恢复到这里」;`+` / `/` 菜单「撤销恢复」 |
|
|
49
|
+
|
|
50
|
+
模型药丸默认「跟随会话」,也可指定提供商 / 模型 / 推理等级。实拍见下方「界面一览」。
|
|
51
|
+
|
|
52
|
+
### 界面一览
|
|
53
|
+
|
|
54
|
+
| 界面 | 说明 | 预览 |
|
|
55
|
+
| --- | --- | --- |
|
|
56
|
+
| 历史搜索 | `Alt+R` 浮层与结果列表 |  |
|
|
57
|
+
| 优化与预测 | 右侧优化入口 + 回复后的灰字建议 |  |
|
|
58
|
+
| 回滚入口 | 消息旁恢复图标,悬停「恢复到这里」 |  |
|
|
59
|
+
| 回滚预览 | 将撤回的对话;可选仅对话或含已跟踪文件 |  |
|
|
60
|
+
| 撤销恢复 | 恢复后打开输入框 **+** 或 `/`,选「撤销恢复」 |  |
|
|
61
|
+
| 设置 · 智能体增强 | 四个开关、模型药丸、隐私说明 |  |
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## 安装
|
|
66
|
+
|
|
67
|
+
安装 / 升级 / 卸载前,请退出所有 Desktop 窗口和托盘,确认旧主进程结束后再操作。
|
|
68
|
+
本插件面向 **Desktop / `desktop` profile**(不要用 `web` 验收)。收录于 [awesome-dsh-plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin),也可在第三方市场中搜索 `dsh-agent-enhancer` / **智能体增强**。
|
|
69
|
+
|
|
70
|
+
### 官方桌面端 · 应用内安装(推荐)
|
|
71
|
+
|
|
72
|
+
适用于 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) **官方桌面端**(以及同样提供「设置 → 插件」的官方发行形态):
|
|
73
|
+
|
|
74
|
+
1. 打开应用内 **设置 → 插件**(或侧边栏 **插件**)。
|
|
75
|
+
2. 在已安装 / 搜索框中查找 `dsh-agent-enhancer` 或 **智能体增强**,按提示安装。
|
|
76
|
+
3. 完全退出并重启 Desktop。
|
|
77
|
+
|
|
78
|
+
> 桌面端的 profile 由应用管理。不要用 `dsh plugin --profile web …` 往桌面端装插件——命令可能显示成功,但装进的是 `profiles/web`,桌面端看不到。
|
|
79
|
+
|
|
80
|
+
### dsh-market(可选)
|
|
81
|
+
|
|
82
|
+
需要独立的市场 UI / 一键升级时,可安装社区市场插件 [dsh-market](https://github.com/dsh-market/dsh-market):
|
|
83
|
+
|
|
84
|
+
- **官方桌面端:** 在应用内 **设置 → 插件** 搜索 `dshmarket` 并安装(不要用 CLI 的 `web` profile)。
|
|
85
|
+
- **普通 `dsh web`:** `dsh plugin --profile web add dshmarket`,然后重启。
|
|
86
|
+
|
|
87
|
+
装好后打开 **插件市场** 标签,搜索并安装本插件。部分第三方桌面客户端会预装或推荐此市场。
|
|
88
|
+
|
|
89
|
+
### 命令行 · npm
|
|
90
|
+
|
|
91
|
+
本机已配置 `dsh` CLI、且要写入 **desktop** profile 时:
|
|
92
|
+
|
|
93
|
+
```sh
|
|
94
|
+
dsh plugin --profile desktop add dsh-agent-enhancer@0.2.0
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
也可不钉版本:`dsh plugin --profile desktop add dsh-agent-enhancer`。
|
|
98
|
+
若曾安装旧包 `dsh-composer-enhancer`,请先卸载再装本包。
|
|
99
|
+
启动后应能看到输入框右侧优化入口,以及设置中的 **智能体增强**。
|
|
100
|
+
|
|
101
|
+
### 本地目录(开发)
|
|
102
|
+
|
|
103
|
+
`dsh plugin` 会把参数原样转给 profile 目录里的 pnpm。对本地仓库要用**绝对路径**,这样会写入 `link:<路径>` 并加入 bundles:
|
|
104
|
+
|
|
105
|
+
```powershell
|
|
106
|
+
corepack pnpm install --frozen-lockfile
|
|
107
|
+
corepack pnpm build
|
|
108
|
+
dsh plugin --profile desktop add ((Resolve-Path .).Path)
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
然后完全退出并重启 Desktop。之后改代码只需再执行 `corepack pnpm build`(加载的是 `lib/`)。
|
|
112
|
+
与宿主共享的 DSH 包请同时放在 `peerDependencies` 与 `devDependencies`,不要放进 `dependencies`。
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## 隐私与共存
|
|
117
|
+
|
|
118
|
+
| 项目 | 说明 |
|
|
119
|
+
| --- | --- |
|
|
120
|
+
| 历史 | 不请求模型 |
|
|
121
|
+
| 优化 | 发送原稿或选区 + 最近一轮已完成对话 |
|
|
122
|
+
| 预测 | 发送最近一轮已完成对话 |
|
|
123
|
+
| 缓存 | 仅当前会话内存 |
|
|
124
|
+
| 审计 | 本地 `plugin:agent-enhancer/request`(无遥测上传) |
|
|
125
|
+
| 共存 | 只提示,不自动关闭第三方 |
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## 兼容
|
|
130
|
+
|
|
131
|
+
- **DSH:** `>=0.2.1-rc.5 <0.3.0-0`(`0.2.1-rc.3` 无法加载)
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## 卸载
|
|
136
|
+
|
|
137
|
+
| 安装方式 | 做法 |
|
|
138
|
+
| --- | --- |
|
|
139
|
+
| 官方桌面端 / dsh-market | 在应用内 **插件** 页对本插件选择卸载或禁用;或 `dsh plugin --profile desktop remove dsh-agent-enhancer` |
|
|
140
|
+
| 命令行 npm | `dsh plugin --profile desktop remove dsh-agent-enhancer` |
|
|
141
|
+
| 本地 `link:` | **不要** `remove` / 在 profile 里 `pnpm remove`(可能删掉源仓库)。按下面做 |
|
|
142
|
+
|
|
143
|
+
1. 退出 Desktop(含托盘)
|
|
144
|
+
2. 编辑 **profile** 的 `package.json`:从 `dependencies` 与 `dsh.profile.bundles` 去掉本插件
|
|
145
|
+
3. 更新依赖并删除链接本身(不删链接目标):
|
|
146
|
+
|
|
147
|
+
```powershell
|
|
148
|
+
$DshHome = if ($env:DSH_HOME) { $env:DSH_HOME } else { Join-Path $env:USERPROFILE '.dsh' }
|
|
149
|
+
$ProfileDir = Join-Path $DshHome 'profiles\desktop'
|
|
150
|
+
dsh plugin --profile desktop install
|
|
151
|
+
$PluginLink = Join-Path $ProfileDir 'node_modules\dsh-agent-enhancer'
|
|
152
|
+
$Item = Get-Item -LiteralPath $PluginLink -Force -ErrorAction SilentlyContinue
|
|
153
|
+
if ($Item -and $Item.LinkType -in @('SymbolicLink', 'Junction')) { $Item.Delete() }
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## 开发
|
|
159
|
+
|
|
160
|
+
```powershell
|
|
161
|
+
corepack pnpm install --frozen-lockfile
|
|
162
|
+
corepack pnpm typecheck
|
|
163
|
+
corepack pnpm test
|
|
164
|
+
corepack pnpm build # Desktop 加载 lib/
|
|
165
|
+
corepack pnpm check # typecheck + test + build + 打包校验
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
| 路径 | 内容 |
|
|
169
|
+
| --- | --- |
|
|
170
|
+
| `src/host/` | 模型调用、RPC、检查点回滚 |
|
|
171
|
+
| `src/client/` | 会话输入区 UI 与状态机 |
|
|
172
|
+
| `tests/` | Vitest |
|
|
173
|
+
| `lib/` | 构建产物 |
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## 许可
|
|
178
|
+
|
|
179
|
+
[MIT](./LICENSE)
|
|
180
|
+
|
|
181
|
+
更新日志见 [CHANGELOG.md](./CHANGELOG.md)。
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
+
import type { PromptSession } from '../prompt/session.ts';
|
|
3
|
+
export interface AgentControlsProps {
|
|
4
|
+
readonly session: PromptSession;
|
|
5
|
+
readonly t: TranslateNS<'agent-enhancer'>;
|
|
6
|
+
}
|
|
7
|
+
export declare function AgentControls({ session, t }: AgentControlsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
//# sourceMappingURL=controls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../../src/client/dsh/controls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAGnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAIzD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAA;IAC/B,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAA;CAC1C;AAUD,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,kBAAkB,kDA+B/D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SessionSnapshot } from '@deepseek-ai/dsh-api-session-controller/client';
|
|
2
|
+
import type { ChatSnapshot } from '@deepseek-ai/dsh-client-ui-chat/client';
|
|
3
|
+
import type { PromptEntry } from '../prompt/types.ts';
|
|
4
|
+
export interface CompletedTurn {
|
|
5
|
+
readonly turn: number;
|
|
6
|
+
readonly prompt: string;
|
|
7
|
+
readonly response: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function sentPrompts(chat: ChatSnapshot | undefined): readonly PromptEntry[];
|
|
10
|
+
export declare function latestCompletedTurn(chat: ChatSnapshot | undefined, session: SessionSnapshot): CompletedTurn | null;
|
|
11
|
+
//# sourceMappingURL=conversation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../src/client/dsh/conversation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAA;AACrF,OAAO,KAAK,EACgB,YAAY,EACvC,MAAM,wCAAwC,CAAA;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAErD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAC1B;AAYD,wBAAgB,WAAW,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,GAAG,SAAS,WAAW,EAAE,CAQlF;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,YAAY,GAAG,SAAS,EAC9B,OAAO,EAAE,eAAe,GACvB,aAAa,GAAG,IAAI,CAqBtB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { InputActions } from '@deepseek-ai/dsh-client-ui-conversation/client';
|
|
2
|
+
import type { DraftWriter } from '../prompt/types.ts';
|
|
3
|
+
interface SelectionOffsets {
|
|
4
|
+
readonly start: number;
|
|
5
|
+
readonly end: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function readSelection(root: HTMLElement): SelectionOffsets | null;
|
|
8
|
+
export declare function restoreSelection(root: HTMLElement, selection: SelectionOffsets): void;
|
|
9
|
+
export declare function lineBoundary(text: string, caret: number): {
|
|
10
|
+
first: boolean;
|
|
11
|
+
last: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare function isAtFirstLine(root: HTMLElement): boolean;
|
|
14
|
+
export declare function isAtLastLine(root: HTMLElement): boolean;
|
|
15
|
+
export declare function isComposing(event: KeyboardEvent, root: HTMLElement): boolean;
|
|
16
|
+
export declare function officialMenuOpen(document: Document): boolean;
|
|
17
|
+
export declare function publicWriter(root: HTMLElement, actions: InputActions): DraftWriter;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=editor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../src/client/dsh/editor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAA;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAGrD,UAAU,gBAAgB;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CACrB;AAqDD,wBAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,GAAG,gBAAgB,GAAG,IAAI,CASxE;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,gBAAgB,GAAG,IAAI,CAUrF;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAK3F;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAGxD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAGvD;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAE5E;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAE5D;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,GAAG,WAAW,CAsBlF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
+
import type { OverlapHintStore } from './plugin-hints.ts';
|
|
3
|
+
export declare function CoexistenceHints({ store, t }: {
|
|
4
|
+
readonly store: OverlapHintStore;
|
|
5
|
+
readonly t: TranslateNS<'agent-enhancer'>;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=hints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hints.d.ts","sourceRoot":"","sources":["../../../src/client/dsh/hints.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAInE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AASzD,wBAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IAC7C,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAA;IAChC,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAA;CAC1C,2CAuBA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/client/dsh/icons.tsx"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,4CAc3B;AAED,wBAAgB,QAAQ,4CAevB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { RemoteResult } from '@deepseek-ai/dsh-api-remotes/client';
|
|
2
|
+
import type { ModelCatalog } from '@deepseek-ai/dsh-api-session-controller/types';
|
|
3
|
+
type CatalogFn = () => Promise<RemoteResult<ModelCatalog>>;
|
|
4
|
+
export interface ModelCatalogLoaders {
|
|
5
|
+
readonly sessionModelCatalog?: CatalogFn;
|
|
6
|
+
readonly hostListCatalog?: CatalogFn;
|
|
7
|
+
}
|
|
8
|
+
/** Resolve catalog callables from a Client Remote face (soft property access). */
|
|
9
|
+
export declare function catalogLoadersFromRemote(remote: unknown): ModelCatalogLoaders;
|
|
10
|
+
/**
|
|
11
|
+
* Load Desktop's live model catalog.
|
|
12
|
+
* Prefer the official session selector catalog; fall back to this plugin's Host RPC.
|
|
13
|
+
*/
|
|
14
|
+
export declare function loadDesktopModelCatalog(remoteOrLoaders: unknown | ModelCatalogLoaders): Promise<ModelCatalog>;
|
|
15
|
+
export declare function modelOptionValue(provider: string, model: string): string;
|
|
16
|
+
export declare function parseModelOptionValue(value: string): {
|
|
17
|
+
provider: string;
|
|
18
|
+
model: string;
|
|
19
|
+
} | null;
|
|
20
|
+
export declare function encodeFollowSelection(): string;
|
|
21
|
+
export declare function encodeModelSelection(provider: string, model: string): string;
|
|
22
|
+
export declare function encodeEffortSelection(provider: string, model: string, effort: string): string;
|
|
23
|
+
export type DecodedModelSelection = {
|
|
24
|
+
readonly kind: 'follow';
|
|
25
|
+
} | {
|
|
26
|
+
readonly kind: 'model';
|
|
27
|
+
readonly provider: string;
|
|
28
|
+
readonly model: string;
|
|
29
|
+
readonly reasoningEffort: string;
|
|
30
|
+
};
|
|
31
|
+
export declare function decodeModelSelection(id: string): DecodedModelSelection | null;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=model-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-catalog.d.ts","sourceRoot":"","sources":["../../../src/client/dsh/model-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAA;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAA;AAEjF,KAAK,SAAS,GAAG,MAAM,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAA;AAE1D,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,SAAS,CAAA;IACxC,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,CAAA;CACrC;AAqBD,kFAAkF;AAClF,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,OAAO,GAAG,mBAAmB,CAM7E;AAED;;;GAGG;AACH,wBAAsB,uBAAuB,CAC3C,eAAe,EAAE,OAAO,GAAG,mBAAmB,GAC7C,OAAO,CAAC,YAAY,CAAC,CA8BvB;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAExE;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAQ/F;AASD,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5E;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAE7F;AAED,MAAM,MAAM,qBAAqB,GAC7B;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,GAC3B;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;CAAE,CAAA;AAEnH,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,qBAAqB,GAAG,IAAI,CA6C7E"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PropsRuntime, TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
+
import type { PromptSession } from '../prompt/session.ts';
|
|
3
|
+
import type { OverlapHintStore } from './plugin-hints.ts';
|
|
4
|
+
export type AgentOverlayProps = PropsRuntime<'conversation.input.overlay'> & {
|
|
5
|
+
readonly session: PromptSession;
|
|
6
|
+
readonly hints?: OverlapHintStore;
|
|
7
|
+
readonly t: TranslateNS<'agent-enhancer'>;
|
|
8
|
+
};
|
|
9
|
+
export declare function AgentOverlay(props: AgentOverlayProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=overlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../src/client/dsh/overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAMjF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAMzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEzD,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC,4BAA4B,CAAC,GAAG;IAC3E,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAA;IAC/B,QAAQ,CAAC,KAAK,CAAC,EAAE,gBAAgB,CAAA;IACjC,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAA;CAC1C,CAAA;AA8BD,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CA2LpD"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare const KNOWN_OVERLAPS: {
|
|
2
|
+
readonly history: readonly ["dsh-composer-history", "dsh-prompt-history", "dsh-input-assistant"];
|
|
3
|
+
readonly optimize: readonly ["dsh-input-assistant"];
|
|
4
|
+
readonly predict: readonly ["dsh-reply-suggestions", "dsh-prompt-history", "dsh-input-assistant"];
|
|
5
|
+
};
|
|
6
|
+
export type OverlapModule = keyof typeof KNOWN_OVERLAPS;
|
|
7
|
+
export declare function overlapHints(entries: readonly {
|
|
8
|
+
moduleName: string;
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
}[]): OverlapModule[];
|
|
11
|
+
type HintStorage = Pick<Storage, 'getItem' | 'setItem'>;
|
|
12
|
+
export declare class OverlapHintStore {
|
|
13
|
+
private readonly storage;
|
|
14
|
+
private readonly version;
|
|
15
|
+
private hints;
|
|
16
|
+
private active;
|
|
17
|
+
private readonly listeners;
|
|
18
|
+
constructor(storage?: HintStorage | undefined, version?: string);
|
|
19
|
+
getSnapshot(): readonly OverlapModule[];
|
|
20
|
+
subscribe(listener: () => void): () => void;
|
|
21
|
+
accept(entries: readonly {
|
|
22
|
+
moduleName: string;
|
|
23
|
+
enabled: boolean;
|
|
24
|
+
}[]): void;
|
|
25
|
+
dismiss(module: OverlapModule): void;
|
|
26
|
+
dispose(): void;
|
|
27
|
+
private key;
|
|
28
|
+
private dismissed;
|
|
29
|
+
private remember;
|
|
30
|
+
private emit;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=plugin-hints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-hints.d.ts","sourceRoot":"","sources":["../../../src/client/dsh/plugin-hints.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;CAIjB,CAAA;AAEV,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,cAAc,CAAA;AAGvD,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,EAAE,GAAG,aAAa,EAAE,CAG1G;AAED,KAAK,WAAW,GAAG,IAAI,CAAC,OAAO,EAAE,SAAS,GAAG,SAAS,CAAC,CAAA;AAUvD,qBAAa,gBAAgB;IAMzB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAN1B,OAAO,CAAC,KAAK,CAA+B;IAC5C,OAAO,CAAC,MAAM,CAAO;IACrB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAwB;gBAG/B,OAAO,GAAE,WAAW,GAAG,SAA4B,EACnD,OAAO,SAAU;IAGpC,WAAW,IAAI,SAAS,aAAa,EAAE;IAIvC,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAM3C,MAAM,CAAC,OAAO,EAAE,SAAS;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,EAAE,GAAG,IAAI;IAU1E,OAAO,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI;IAQpC,OAAO,IAAI,IAAI;IAKf,OAAO,CAAC,GAAG;IAIX,OAAO,CAAC,SAAS;IAQjB,OAAO,CAAC,QAAQ;IAMhB,OAAO,CAAC,IAAI;CAGb"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ConfigForm, ConfigFormSnapshot } from '@deepseek-ai/dsh-client-ui-settings/client';
|
|
2
|
+
import type { EnhancerSettings } from '../../config.ts';
|
|
3
|
+
export type SettingsForm = Pick<ConfigForm<EnhancerSettings>, 'getSnapshot' | 'subscribe' | 'set'>;
|
|
4
|
+
export declare class AcceptedSettingsForm implements SettingsForm {
|
|
5
|
+
private readonly form;
|
|
6
|
+
private readonly listeners;
|
|
7
|
+
private readonly accepted;
|
|
8
|
+
private snapshot;
|
|
9
|
+
constructor(form: SettingsForm);
|
|
10
|
+
getSnapshot(): ConfigFormSnapshot<EnhancerSettings>;
|
|
11
|
+
subscribe(listener: () => void): () => void;
|
|
12
|
+
set(field: string, value: unknown): Promise<boolean>;
|
|
13
|
+
private refresh;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=settings-form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-form.d.ts","sourceRoot":"","sources":["../../../src/client/dsh/settings-form.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAA;AAChG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAEvD,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,aAAa,GAAG,WAAW,GAAG,KAAK,CAAC,CAAA;AAKlG,qBAAa,oBAAqB,YAAW,YAAY;IAK3C,OAAO,CAAC,QAAQ,CAAC,IAAI;IAJjC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAwB;IAClD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA6B;IACtD,OAAO,CAAC,QAAQ,CAAsC;gBAEzB,IAAI,EAAE,YAAY;IAI/C,WAAW,IAAI,kBAAkB,CAAC,gBAAgB,CAAC;IAInD,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAYrC,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAY1D,OAAO,CAAC,OAAO;CAehB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
+
import type { ConfigForm } from '@deepseek-ai/dsh-client-ui-settings/client';
|
|
3
|
+
import type { ModelCatalog } from '@deepseek-ai/dsh-api-session-controller/types';
|
|
4
|
+
import type { EnhancerSettings } from '../../config.ts';
|
|
5
|
+
type SettingsForm = Pick<ConfigForm<EnhancerSettings>, 'getSnapshot' | 'subscribe' | 'set'>;
|
|
6
|
+
export interface PluginSettingsProps {
|
|
7
|
+
readonly form: SettingsForm;
|
|
8
|
+
readonly t: TranslateNS<'agent-enhancer'>;
|
|
9
|
+
readonly loadCatalog?: () => Promise<ModelCatalog>;
|
|
10
|
+
}
|
|
11
|
+
export declare function PluginSettings(props: PluginSettingsProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/client/dsh/settings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAA;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAyC,MAAM,+CAA+C,CAAA;AAWxH,OAAO,KAAK,EAA4C,gBAAgB,EAAc,MAAM,iBAAiB,CAAA;AAS7G,KAAK,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,aAAa,GAAG,WAAW,GAAG,KAAK,CAAC,CAAA;AAE3F,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;IAC3B,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAA;IACzC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,CAAA;CACnD;AAqUD,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CAUxD"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { InputActions } from '@deepseek-ai/dsh-client-ui-conversation/client';
|
|
2
|
+
import type { Occurrence } from '../prompt/types.ts';
|
|
3
|
+
export declare function textSegments(source: string, occurrences: readonly Occurrence[]): readonly string[];
|
|
4
|
+
export declare function detectOffset(offset: number, occurrences: readonly Occurrence[]): number;
|
|
5
|
+
export declare function replaceAroundOccurrences(actions: InputActions, source: string, occurrences: readonly Occurrence[], optimizedSegments: readonly string[]): boolean;
|
|
6
|
+
//# sourceMappingURL=structured.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structured.d.ts","sourceRoot":"","sources":["../../../src/client/dsh/structured.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAA;AAElF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAEpD,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,SAAS,UAAU,EAAE,GACjC,SAAS,MAAM,EAAE,CASnB;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,UAAU,EAAE,GAAG,MAAM,CAQvF;AAED,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,SAAS,UAAU,EAAE,EAClC,iBAAiB,EAAE,SAAS,MAAM,EAAE,GACnC,OAAO,CAqCT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AA8ClD,eAAO,MAAM,MAAM,UAA2F,CAAA;AAE9G,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CA0MxC"}
|