dsh-agent-enhancer 0.0.0-stage → 0.3.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 +188 -0
- package/README.md +187 -2
- package/cordis.patch.yml +3 -0
- package/lib/client/context/chart.d.ts +21 -0
- package/lib/client/context/chart.d.ts.map +1 -0
- package/lib/client/context/dock.d.ts +10 -0
- package/lib/client/context/dock.d.ts.map +1 -0
- package/lib/client/context/enhance-meter.d.ts +12 -0
- package/lib/client/context/enhance-meter.d.ts.map +1 -0
- package/lib/client/context/format.d.ts +3 -0
- package/lib/client/context/format.d.ts.map +1 -0
- package/lib/client/context/icons.d.ts +10 -0
- package/lib/client/context/icons.d.ts.map +1 -0
- package/lib/client/context/open-tab.d.ts +16 -0
- package/lib/client/context/open-tab.d.ts.map +1 -0
- package/lib/client/context/right-tab.d.ts +14 -0
- package/lib/client/context/right-tab.d.ts.map +1 -0
- package/lib/client/context/tab.d.ts +15 -0
- package/lib/client/context/tab.d.ts.map +1 -0
- package/lib/client/context/title.d.ts +5 -0
- package/lib/client/context/title.d.ts.map +1 -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 +40 -0
- package/lib/client/dsh/model-catalog.d.ts.map +1 -0
- package/lib/client/dsh/model-pill-label.d.ts +21 -0
- package/lib/client/dsh/model-pill-label.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/provider-balance-chip.d.ts +9 -0
- package/lib/client/dsh/provider-balance-chip.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 +16 -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/dsh/usage-chart.d.ts +28 -0
- package/lib/client/dsh/usage-chart.d.ts.map +1 -0
- package/lib/client/dsh/usage-dock.d.ts +8 -0
- package/lib/client/dsh/usage-dock.d.ts.map +1 -0
- package/lib/client/dsh/usage-format.d.ts +5 -0
- package/lib/client/dsh/usage-format.d.ts.map +1 -0
- package/lib/client/dsh/usage-kind.d.ts +8 -0
- package/lib/client/dsh/usage-kind.d.ts.map +1 -0
- package/lib/client/dsh/usage-meter.d.ts +16 -0
- package/lib/client/dsh/usage-meter.d.ts.map +1 -0
- package/lib/client/dsh/usage-panel.d.ts +8 -0
- package/lib/client/dsh/usage-panel.d.ts.map +1 -0
- package/lib/client/dsh/usage-tab.d.ts +11 -0
- package/lib/client/dsh/usage-tab.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 +472 -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 +70 -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 +6520 -0
- package/lib/client.js.map +1 -0
- package/lib/config.d.ts +43 -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/auto-route/classifier.d.ts +5 -0
- package/lib/host/auto-route/classifier.d.ts.map +1 -0
- package/lib/host/auto-route/heuristic.d.ts +16 -0
- package/lib/host/auto-route/heuristic.d.ts.map +1 -0
- package/lib/host/auto-route/router.d.ts +15 -0
- package/lib/host/auto-route/router.d.ts.map +1 -0
- package/lib/host/auto-route/sentinel.d.ts +7 -0
- package/lib/host/auto-route/sentinel.d.ts.map +1 -0
- package/lib/host/auto-route/session-hook.d.ts +6 -0
- package/lib/host/auto-route/session-hook.d.ts.map +1 -0
- package/lib/host/auto-route/session-resolved-route.d.ts +7 -0
- package/lib/host/auto-route/session-resolved-route.d.ts.map +1 -0
- package/lib/host/auto-route/session-selection.d.ts +10 -0
- package/lib/host/auto-route/session-selection.d.ts.map +1 -0
- package/lib/host/auto-route/session-turn-hint.d.ts +8 -0
- package/lib/host/auto-route/session-turn-hint.d.ts.map +1 -0
- package/lib/host/auto-route/types.d.ts +18 -0
- package/lib/host/auto-route/types.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/context-compact.d.ts +42 -0
- package/lib/host/context-compact.d.ts.map +1 -0
- package/lib/host/context-inspect.d.ts +46 -0
- package/lib/host/context-inspect.d.ts.map +1 -0
- package/lib/host/index.d.ts +144 -0
- package/lib/host/index.d.ts.map +1 -0
- package/lib/host/model.d.ts +29 -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 +314 -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/host/update/check.d.ts +32 -0
- package/lib/host/update/check.d.ts.map +1 -0
- package/lib/host/update/cli.d.ts +15 -0
- package/lib/host/update/cli.d.ts.map +1 -0
- package/lib/host/update/install-kind.d.ts +3 -0
- package/lib/host/update/install-kind.d.ts.map +1 -0
- package/lib/host/update/registry.d.ts +16 -0
- package/lib/host/update/registry.d.ts.map +1 -0
- package/lib/host/update/semver.d.ts +2 -0
- package/lib/host/update/semver.d.ts.map +1 -0
- package/lib/host/update/types.d.ts +17 -0
- package/lib/host/update/types.d.ts.map +1 -0
- package/lib/host/usage/balance.d.ts +113 -0
- package/lib/host/usage/balance.d.ts.map +1 -0
- package/lib/host/usage/history.d.ts +23 -0
- package/lib/host/usage/history.d.ts.map +1 -0
- package/lib/host/usage/ledger.d.ts +20 -0
- package/lib/host/usage/ledger.d.ts.map +1 -0
- package/lib/host/usage/observe.d.ts +9 -0
- package/lib/host/usage/observe.d.ts.map +1 -0
- package/lib/host/usage/pricing.d.ts +55 -0
- package/lib/host/usage/pricing.d.ts.map +1 -0
- package/lib/host/usage/source.d.ts +14 -0
- package/lib/host/usage/source.d.ts.map +1 -0
- package/lib/host/usage/summarize.d.ts +7 -0
- package/lib/host/usage/summarize.d.ts.map +1 -0
- package/lib/host/usage/types.d.ts +105 -0
- package/lib/host/usage/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 +5341 -0
- package/lib/index.js.map +7 -0
- package/package.json +175 -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,188 @@
|
|
|
1
|
+
# DSH Agent Enhancer
|
|
2
|
+
|
|
3
|
+
**中文:** [README.md](./README.md)
|
|
4
|
+
|
|
5
|
+
> One plugin to make DeepSeek Harness Desktop **easier to write, refine, roll back, and see usage & context**, and to keep moving toward mainstream agent UX.
|
|
6
|
+
> Prompt history · one-click optimize · next-prompt predict · conversation & file restore · model bill · context details · Auto routing · per-provider balance — inside the official conversation and settings, 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
|
+
| Category | You want to… | Do this |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| **Write** | Revisit / clarify / continue | `↑↓` or `Alt+R`; **Optimize** on the right; after a reply, `Tab` for the gray suggestion |
|
|
20
|
+
| **Restore** | Go back before a turn | **Restore to here** → confirm in preview; **Undo restore** via **+** / `/` when available |
|
|
21
|
+
| **Usage & cost** | See tokens spent and remaining credit | **Token usage** → **Model bill**; **Settings → Models** for per-account balance; helpers can use a cheaper model or Auto |
|
|
22
|
+
| **Context** | See how full the window is | Context meter → right-pane details; optional **Compress context** |
|
|
23
|
+
| **Routing** | Let the session pick a strength tier | Choose **Auto** in the model list; map Instant / Thinking / Pro in settings |
|
|
24
|
+
| **Master switches** | Turn a feature off | **Settings → Built-in plugins → Agent Enhance** |
|
|
25
|
+
|
|
26
|
+
Core features default on. UI language follows Desktop (`zh` / `en`).
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Feature map
|
|
31
|
+
|
|
32
|
+
Grouped by capability; screenshots share a row so new features extend the matching category instead of lengthening the table.
|
|
33
|
+
|
|
34
|
+
| Category | Includes | How to use | Notes |
|
|
35
|
+
| --- | --- | --- | --- |
|
|
36
|
+
| **Write** | History · Optimize · Predict | First/last-line `↑↓`; `Alt+R` (`Ctrl+R` where available); Optimize on the right (undo; selection-only when selected); gray suggestion after a reply, `Tab` to accept | Current loaded session only; `Enter` fills without sending; chip drafts ignore history keys; vague drafts gain detail, specific drafts stay lean; at most one prediction per turn |
|
|
37
|
+
| **Restore** | Restore to here · Undo restore | Restore on the message → preview conversation-only or + tracked files; after restore open **+** / `/` → **Undo restore** (while a tip remains) | No processes / terminals / untracked files |
|
|
38
|
+
| **Usage & cost** | Token usage · Model bill · Per-provider balance | Open the bill from the usage title (today / 7d / 30d / all); **Settings → Models** for DeepSeek account / API-key balances | Local input / output / cache-read totals, heatmap, feature share; “≈ ¥” from official rates (not an invoice); account uses Platform wallets, API key uses `/user/balance`; two decimal places |
|
|
39
|
+
| **Context** | Meter · Details · Compact | Open the meter into the right pane; drill into categories; one-click official `/compact` | System / tools / messages breakdown; numbers are heuristic estimates, not bill-precise |
|
|
40
|
+
| **Routing** | Auto · Tier maps · Optional classifier | Pick **Auto** in the model list; map Instant / Thinking / Pro; optional small-model classifier | Bilingual heuristic by default; classifier failures fall back; optimize / predict may also use Auto or a fixed model |
|
|
41
|
+
|
|
42
|
+
### Settings
|
|
43
|
+
|
|
44
|
+
**Settings → Built-in plugins → Agent Enhance**
|
|
45
|
+
|
|
46
|
+
| Category | Toggles / config | Default | Effect |
|
|
47
|
+
| --- | --- | --- | --- |
|
|
48
|
+
| **Write** | `historyEnabled` · `optimizeEnabled` · `predictEnabled` | All on | `↑↓` / `Alt+R`; optimize & undo (model pill); gray predict (model pill) |
|
|
49
|
+
| **Restore** | `rollbackEnabled` | On | **Restore to here**; **+** / `/` **Undo restore** |
|
|
50
|
+
| **Context** | `contextInspectEnabled` | On | Context meter → right-pane details |
|
|
51
|
+
| **Routing** | `autoClassifierEnabled`, etc. | Classifier off | Session / helpers may use Auto; tier maps; optional classifier |
|
|
52
|
+
| **Maintenance** | Plugin updates | — | Check/apply for npm installs; link installs show guidance only |
|
|
53
|
+
|
|
54
|
+
Model pills default to **Follow session**, or pick provider / model / reasoning effort, or **Auto**. Live balance stays on **Settings → Models** cards, not as a single global line on the bill.
|
|
55
|
+
|
|
56
|
+
### UI map
|
|
57
|
+
|
|
58
|
+
| Category | What you see | Preview |
|
|
59
|
+
| --- | --- | --- |
|
|
60
|
+
| **Write** | History search; optimize control and gray prediction |   |
|
|
61
|
+
| **Restore** | Entry → preview scope → undo restore |    |
|
|
62
|
+
| **Usage & cost** | Token usage entry, model bill, per-provider balance |    |
|
|
63
|
+
| **Context** | Meter summary and right-pane details / compact |   |
|
|
64
|
+
| **Routing** | Auto in the model list; tier maps and optional classifier |   |
|
|
65
|
+
| **Settings** | Agent Enhance toggles and model pills |  |
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Install
|
|
70
|
+
|
|
71
|
+
Quit every Desktop window and tray process before install, upgrade, or uninstall.
|
|
72
|
+
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.
|
|
73
|
+
|
|
74
|
+
### Official Desktop · in-app install (recommended)
|
|
75
|
+
|
|
76
|
+
For the [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) **official Desktop** (and other official builds that ship **Settings → Plugins**):
|
|
77
|
+
|
|
78
|
+
1. Open **Settings → Plugins** (or the **Plugins** sidebar entry).
|
|
79
|
+
2. Search for `dsh-agent-enhancer` or **Agent Enhance**, then install when prompted.
|
|
80
|
+
3. Fully quit and restart Desktop.
|
|
81
|
+
|
|
82
|
+
> 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.
|
|
83
|
+
|
|
84
|
+
### dsh-market (optional)
|
|
85
|
+
|
|
86
|
+
For a dedicated market UI / one-click upgrades, install the community market [dsh-market](https://github.com/dsh-market/dsh-market):
|
|
87
|
+
|
|
88
|
+
- **Official Desktop:** in-app **Settings → Plugins**, search `dshmarket` and install (do not use the CLI `web` profile).
|
|
89
|
+
- **Plain `dsh web`:** `dsh plugin --profile web add dshmarket`, then restart.
|
|
90
|
+
|
|
91
|
+
Then open the **Plugin Market** tab, search, and install this plugin. Some third-party Desktop clients ship or recommend this market by default.
|
|
92
|
+
|
|
93
|
+
### CLI · npm
|
|
94
|
+
|
|
95
|
+
When the `dsh` CLI is available and you intend to write the **desktop** profile:
|
|
96
|
+
|
|
97
|
+
```sh
|
|
98
|
+
dsh plugin --profile desktop add dsh-agent-enhancer@0.3.0
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Or unpinned: `dsh plugin --profile desktop add dsh-agent-enhancer`.
|
|
102
|
+
If you previously installed `dsh-composer-enhancer`, remove it first, then install this package.
|
|
103
|
+
You should then see the optimize control and **Agent Enhance** in settings.
|
|
104
|
+
|
|
105
|
+
### Local directory (development)
|
|
106
|
+
|
|
107
|
+
`dsh plugin` forwards arguments to pnpm inside the profile directory. Pass an **absolute path** so the profile stores `link:<path>` and adds the bundle:
|
|
108
|
+
|
|
109
|
+
```powershell
|
|
110
|
+
corepack pnpm install --frozen-lockfile
|
|
111
|
+
corepack pnpm build
|
|
112
|
+
dsh plugin --profile desktop add ((Resolve-Path .).Path)
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Fully quit and restart Desktop afterward. Later code changes only need `corepack pnpm build` (Desktop loads `lib/`).
|
|
116
|
+
Keep host-shared DSH packages in both `peerDependencies` and `devDependencies`, not in `dependencies`.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Privacy & coexistence
|
|
121
|
+
|
|
122
|
+
| Topic | Detail |
|
|
123
|
+
| --- | --- |
|
|
124
|
+
| History | Never calls a model |
|
|
125
|
+
| Optimize | Sends draft/selection + latest completed turn |
|
|
126
|
+
| Predict | Sends the latest completed turn |
|
|
127
|
+
| Auto classifier | Only when the toggle is on; failures fall back to local heuristics without blocking the main request |
|
|
128
|
+
| Bill / context | Local aggregation and heuristic estimates; balance queries use Desktop-stored credentials — this plugin ships no keys |
|
|
129
|
+
| Cache | In-session memory (bill data persists under the local usage directory) |
|
|
130
|
+
| Audit | Local `plugin:agent-enhancer/request` (no telemetry upload) |
|
|
131
|
+
| Coexistence | Hints only — never auto-disables third-party plugins |
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Compatibility
|
|
136
|
+
|
|
137
|
+
- **DSH:** `>=0.2.1-rc.5 <0.3.0-0` (`0.2.1-rc.3` fails to load)
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Uninstall
|
|
142
|
+
|
|
143
|
+
| Install type | Action |
|
|
144
|
+
| --- | --- |
|
|
145
|
+
| Official Desktop / dsh-market | Uninstall or disable the plugin on the in-app **Plugins** page; or `dsh plugin --profile desktop remove dsh-agent-enhancer` |
|
|
146
|
+
| CLI npm | `dsh plugin --profile desktop remove dsh-agent-enhancer` |
|
|
147
|
+
| Local `link:` | **Do not** `remove` / run `pnpm remove` in the profile (can delete the source repo). Follow below |
|
|
148
|
+
|
|
149
|
+
1. Quit Desktop (including tray)
|
|
150
|
+
2. Edit the **profile** `package.json`: drop this plugin from `dependencies` and `dsh.profile.bundles`
|
|
151
|
+
3. Refresh deps and delete the link only (not its target):
|
|
152
|
+
|
|
153
|
+
```powershell
|
|
154
|
+
$DshHome = if ($env:DSH_HOME) { $env:DSH_HOME } else { Join-Path $env:USERPROFILE '.dsh' }
|
|
155
|
+
$ProfileDir = Join-Path $DshHome 'profiles\desktop'
|
|
156
|
+
dsh plugin --profile desktop install
|
|
157
|
+
$PluginLink = Join-Path $ProfileDir 'node_modules\dsh-agent-enhancer'
|
|
158
|
+
$Item = Get-Item -LiteralPath $PluginLink -Force -ErrorAction SilentlyContinue
|
|
159
|
+
if ($Item -and $Item.LinkType -in @('SymbolicLink', 'Junction')) { $Item.Delete() }
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Development
|
|
165
|
+
|
|
166
|
+
```powershell
|
|
167
|
+
corepack pnpm install --frozen-lockfile
|
|
168
|
+
corepack pnpm typecheck
|
|
169
|
+
corepack pnpm test
|
|
170
|
+
corepack pnpm build # Desktop loads lib/
|
|
171
|
+
corepack pnpm check # typecheck + test + build + pack verify
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
| Path | Contents |
|
|
175
|
+
| --- | --- |
|
|
176
|
+
| `src/host/` | Model calls, RPC, checkpoint rollback, bill, Auto routing, balances |
|
|
177
|
+
| `src/client/` | Conversation input, bill / context side panes, settings and Models-page balances |
|
|
178
|
+
| `tests/` | Vitest |
|
|
179
|
+
| `lib/` | Build output |
|
|
180
|
+
| `docs/images/` | README screenshots |
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## License
|
|
185
|
+
|
|
186
|
+
[MIT](./LICENSE)
|
|
187
|
+
|
|
188
|
+
See [CHANGELOG.md](./CHANGELOG.md) for release notes.
|
package/README.md
CHANGED
|
@@ -1,3 +1,188 @@
|
|
|
1
|
-
#
|
|
1
|
+
# DSH Agent Enhancer
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**English:** [README.en.md](./README.en.md)
|
|
4
|
+
|
|
5
|
+
> 一个插件,让 DeepSeek Harness Desktop **更好写、更好改、更好回退、更看得见用量与上下文**,并持续向主流 Agent 体验对齐。
|
|
6
|
+
> 历史回顾 · 一键优化 · 下一条预测 · 对话与文件恢复 · 模型账单 · 上下文明细 · Auto 路由 · 分账号余额 —— 嵌在官方会话与设置里,不用另开窗口。
|
|
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`;右侧 **优化**;回复后 `Tab` 采纳灰字 |
|
|
20
|
+
| **回退** | 回到某一轮之前 | **恢复到这里** → 预览确认;需要时用 **+** / `/` **撤销恢复** |
|
|
21
|
+
| **用量与成本** | 看 token 花多少、账号还剩多少 | **Token 用量** → **模型账单**;**设置 → 模型** 看分账号余额;辅助模型可单独选更便宜档或 Auto |
|
|
22
|
+
| **上下文** | 看窗口占了多少 | 占用环 → 右侧栏明细;可 **压缩上下文** |
|
|
23
|
+
| **模型路由** | 让会话自己选强弱档 | 模型列表选 **Auto**;设置里映射 Instant / Thinking / Pro |
|
|
24
|
+
| **总开关** | 关掉某个能力 | **设置 → 内置插件 → 智能体增强** |
|
|
25
|
+
|
|
26
|
+
默认核心能力开启。界面语言跟随 Desktop(`zh` / `en`)。
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 功能对照
|
|
31
|
+
|
|
32
|
+
按能力归类;同组能力共用入口与截图,后续加能力往对应行扩写即可。
|
|
33
|
+
|
|
34
|
+
| 类别 | 包含 | 怎么用 | 要点 |
|
|
35
|
+
| --- | --- | --- | --- |
|
|
36
|
+
| **写提示** | 历史 · 优化 · 预测 | 首/末行 `↑↓`;`Alt+R`(兼容 `Ctrl+R`);右侧优化(可撤销,有选区只改选区);回复后灰字,`Tab` 采纳 | 仅当前已加载会话;`Enter` 只填不发;chip 草稿不误触历史;模糊稿补全、明确稿少改;预测每轮最多一条 |
|
|
37
|
+
| **回退** | 恢复到这里 · 撤销恢复 | 消息旁恢复 → 预览选仅对话或含已跟踪文件;恢复后 **+** / `/` 选 **撤销恢复**(有 tip 时) | 不恢复进程 / 终端 / 未跟踪文件等 |
|
|
38
|
+
| **用量与成本** | Token 用量 · 模型账单 · 分账号余额 | 点用量标题进右侧栏账单(今天 / 7 天 / 30 天 / 全部);**设置 → 模型** 看 DeepSeek 账号 / API Key 余额 | 本地汇总输入 / 输出 / 缓存读、热力与功能占比;「约 ¥」按官方价估算非发票;账号走 Platform 钱包、API Key 走 `/user/balance`;金额两位小数 |
|
|
39
|
+
| **上下文** | 占用环 · 上下文明细 · 压缩 | 点占用环进右侧栏;可跳转分项明细;一键调用官方 `/compact` | 拆分系统提示 / 工具 / 消息;数字为启发式约值,非账单精确值 |
|
|
40
|
+
| **模型路由** | Auto · 档位映射 · 可选分类器 | 模型列表选 **Auto**;设置映射 Instant / Thinking / Pro;可选开小模型分类 | 默认中英双语启发式;分类失败回退启发式;优化 / 预测也可选 Auto 或指定模型 |
|
|
41
|
+
|
|
42
|
+
### 设置
|
|
43
|
+
|
|
44
|
+
路径:**设置 → 内置插件 → 智能体增强**
|
|
45
|
+
|
|
46
|
+
| 类别 | 开关 / 配置 | 默认 | 作用 |
|
|
47
|
+
| --- | --- | --- | --- |
|
|
48
|
+
| **写提示** | `historyEnabled` · `optimizeEnabled` · `predictEnabled` | 均开 | `↑↓` / `Alt+R`;优化与撤销(旁有模型药丸);灰字预测(旁有模型药丸) |
|
|
49
|
+
| **回退** | `rollbackEnabled` | 开 | 「恢复到这里」;`+` / `/`「撤销恢复」 |
|
|
50
|
+
| **上下文** | `contextInspectEnabled` | 开 | 占用环 → 右侧栏明细 |
|
|
51
|
+
| **模型路由** | `autoClassifierEnabled` 等 | 分类器关 | 会话 / 辅助可选 Auto;档位映射;可选小模型分类 |
|
|
52
|
+
| **维护** | 插件更新 | — | npm 安装可检查更新;链接安装仅说明 |
|
|
53
|
+
|
|
54
|
+
模型药丸默认「跟随会话」,也可指定提供商 / 模型 / 推理等级,或选 **Auto**。余额挂在 **设置 → 模型** 各提供商卡片上,不在账单顶栏重复展示。
|
|
55
|
+
|
|
56
|
+
### 界面一览
|
|
57
|
+
|
|
58
|
+
| 类别 | 说明 | 预览 |
|
|
59
|
+
| --- | --- | --- |
|
|
60
|
+
| **写提示** | 历史搜索;优化入口与灰字预测 |   |
|
|
61
|
+
| **回退** | 恢复入口 → 预览范围 → 撤销恢复 |    |
|
|
62
|
+
| **用量与成本** | Token 用量入口、模型账单、分账号余额 |    |
|
|
63
|
+
| **上下文** | 占用摘要与右侧栏明细 / 压缩 |   |
|
|
64
|
+
| **模型路由** | 模型列表 Auto;档位映射与可选分类器 |   |
|
|
65
|
+
| **设置** | 智能体增强总开关与模型药丸 |  |
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## 安装
|
|
70
|
+
|
|
71
|
+
安装 / 升级 / 卸载前,请退出所有 Desktop 窗口和托盘,确认旧主进程结束后再操作。
|
|
72
|
+
本插件面向 **Desktop / `desktop` profile**(不要用 `web` 验收)。收录于 [awesome-dsh-plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin),也可在第三方市场中搜索 `dsh-agent-enhancer` / **智能体增强**。
|
|
73
|
+
|
|
74
|
+
### 官方桌面端 · 应用内安装(推荐)
|
|
75
|
+
|
|
76
|
+
适用于 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) **官方桌面端**(以及同样提供「设置 → 插件」的官方发行形态):
|
|
77
|
+
|
|
78
|
+
1. 打开应用内 **设置 → 插件**(或侧边栏 **插件**)。
|
|
79
|
+
2. 在已安装 / 搜索框中查找 `dsh-agent-enhancer` 或 **智能体增强**,按提示安装。
|
|
80
|
+
3. 完全退出并重启 Desktop。
|
|
81
|
+
|
|
82
|
+
> 桌面端的 profile 由应用管理。不要用 `dsh plugin --profile web …` 往桌面端装插件——命令可能显示成功,但装进的是 `profiles/web`,桌面端看不到。
|
|
83
|
+
|
|
84
|
+
### dsh-market(可选)
|
|
85
|
+
|
|
86
|
+
需要独立的市场 UI / 一键升级时,可安装社区市场插件 [dsh-market](https://github.com/dsh-market/dsh-market):
|
|
87
|
+
|
|
88
|
+
- **官方桌面端:** 在应用内 **设置 → 插件** 搜索 `dshmarket` 并安装(不要用 CLI 的 `web` profile)。
|
|
89
|
+
- **普通 `dsh web`:** `dsh plugin --profile web add dshmarket`,然后重启。
|
|
90
|
+
|
|
91
|
+
装好后打开 **插件市场** 标签,搜索并安装本插件。部分第三方桌面客户端会预装或推荐此市场。
|
|
92
|
+
|
|
93
|
+
### 命令行 · npm
|
|
94
|
+
|
|
95
|
+
本机已配置 `dsh` CLI、且要写入 **desktop** profile 时:
|
|
96
|
+
|
|
97
|
+
```sh
|
|
98
|
+
dsh plugin --profile desktop add dsh-agent-enhancer@0.3.0
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
也可不钉版本:`dsh plugin --profile desktop add dsh-agent-enhancer`。
|
|
102
|
+
若曾安装旧包 `dsh-composer-enhancer`,请先卸载再装本包。
|
|
103
|
+
启动后应能看到输入框右侧优化入口,以及设置中的 **智能体增强**。
|
|
104
|
+
|
|
105
|
+
### 本地目录(开发)
|
|
106
|
+
|
|
107
|
+
`dsh plugin` 会把参数原样转给 profile 目录里的 pnpm。对本地仓库要用**绝对路径**,这样会写入 `link:<路径>` 并加入 bundles:
|
|
108
|
+
|
|
109
|
+
```powershell
|
|
110
|
+
corepack pnpm install --frozen-lockfile
|
|
111
|
+
corepack pnpm build
|
|
112
|
+
dsh plugin --profile desktop add ((Resolve-Path .).Path)
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
然后完全退出并重启 Desktop。之后改代码只需再执行 `corepack pnpm build`(加载的是 `lib/`)。
|
|
116
|
+
与宿主共享的 DSH 包请同时放在 `peerDependencies` 与 `devDependencies`,不要放进 `dependencies`。
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## 隐私与共存
|
|
121
|
+
|
|
122
|
+
| 项目 | 说明 |
|
|
123
|
+
| --- | --- |
|
|
124
|
+
| 历史 | 不请求模型 |
|
|
125
|
+
| 优化 | 发送原稿或选区 + 最近一轮已完成对话 |
|
|
126
|
+
| 预测 | 发送最近一轮已完成对话 |
|
|
127
|
+
| Auto 分类器 | 仅开关打开时调用;失败回退本地启发式,不阻塞主请求 |
|
|
128
|
+
| 账单 / 上下文 | 本地汇总与启发式估算;余额查询使用 Desktop 已存凭据,插件不携带密钥 |
|
|
129
|
+
| 缓存 | 仅当前会话内存(账单落盘在本机 usage 目录) |
|
|
130
|
+
| 审计 | 本地 `plugin:agent-enhancer/request`(无遥测上传) |
|
|
131
|
+
| 共存 | 只提示,不自动关闭第三方 |
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## 兼容
|
|
136
|
+
|
|
137
|
+
- **DSH:** `>=0.2.1-rc.5 <0.3.0-0`(`0.2.1-rc.3` 无法加载)
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## 卸载
|
|
142
|
+
|
|
143
|
+
| 安装方式 | 做法 |
|
|
144
|
+
| --- | --- |
|
|
145
|
+
| 官方桌面端 / dsh-market | 在应用内 **插件** 页对本插件选择卸载或禁用;或 `dsh plugin --profile desktop remove dsh-agent-enhancer` |
|
|
146
|
+
| 命令行 npm | `dsh plugin --profile desktop remove dsh-agent-enhancer` |
|
|
147
|
+
| 本地 `link:` | **不要** `remove` / 在 profile 里 `pnpm remove`(可能删掉源仓库)。按下面做 |
|
|
148
|
+
|
|
149
|
+
1. 退出 Desktop(含托盘)
|
|
150
|
+
2. 编辑 **profile** 的 `package.json`:从 `dependencies` 与 `dsh.profile.bundles` 去掉本插件
|
|
151
|
+
3. 更新依赖并删除链接本身(不删链接目标):
|
|
152
|
+
|
|
153
|
+
```powershell
|
|
154
|
+
$DshHome = if ($env:DSH_HOME) { $env:DSH_HOME } else { Join-Path $env:USERPROFILE '.dsh' }
|
|
155
|
+
$ProfileDir = Join-Path $DshHome 'profiles\desktop'
|
|
156
|
+
dsh plugin --profile desktop install
|
|
157
|
+
$PluginLink = Join-Path $ProfileDir 'node_modules\dsh-agent-enhancer'
|
|
158
|
+
$Item = Get-Item -LiteralPath $PluginLink -Force -ErrorAction SilentlyContinue
|
|
159
|
+
if ($Item -and $Item.LinkType -in @('SymbolicLink', 'Junction')) { $Item.Delete() }
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## 开发
|
|
165
|
+
|
|
166
|
+
```powershell
|
|
167
|
+
corepack pnpm install --frozen-lockfile
|
|
168
|
+
corepack pnpm typecheck
|
|
169
|
+
corepack pnpm test
|
|
170
|
+
corepack pnpm build # Desktop 加载 lib/
|
|
171
|
+
corepack pnpm check # typecheck + test + build + 打包校验
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
| 路径 | 内容 |
|
|
175
|
+
| --- | --- |
|
|
176
|
+
| `src/host/` | 模型调用、RPC、检查点回滚、账单、Auto 路由、余额 |
|
|
177
|
+
| `src/client/` | 会话输入区、右侧栏账单 / 上下文、设置与模型页余额 |
|
|
178
|
+
| `tests/` | Vitest |
|
|
179
|
+
| `lib/` | 构建产物 |
|
|
180
|
+
| `docs/images/` | README 截图 |
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## 许可
|
|
185
|
+
|
|
186
|
+
[MIT](./LICENSE)
|
|
187
|
+
|
|
188
|
+
更新日志见 [CHANGELOG.md](./CHANGELOG.md)。
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ContextInspectCategory, ContextInspectKind, ContextInspectPressure } from '../../host/context-inspect.ts';
|
|
2
|
+
export interface ChartSlice {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly label: string;
|
|
5
|
+
readonly tokens: number;
|
|
6
|
+
readonly color: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function colorForCategory(category: ContextInspectCategory): string;
|
|
9
|
+
export declare function colorForKind(kind: ContextInspectKind): string;
|
|
10
|
+
export declare function colorForItem(index: number): string;
|
|
11
|
+
/** Composition stack + legend meters + window headroom (Operate / DSH tokens). */
|
|
12
|
+
export declare function ContextShareChart(props: {
|
|
13
|
+
readonly title: string;
|
|
14
|
+
readonly totalLabel: string;
|
|
15
|
+
readonly slices: readonly ChartSlice[];
|
|
16
|
+
readonly emptyLabel: string;
|
|
17
|
+
readonly pressure?: ContextInspectPressure;
|
|
18
|
+
readonly headroomLabel: string;
|
|
19
|
+
readonly occupiedLabel: string;
|
|
20
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
//# sourceMappingURL=chart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart.d.ts","sourceRoot":"","sources":["../../../src/client/context/chart.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,sBAAsB,EACtB,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,+BAA+B,CAAA;AAEtC,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAoBD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,sBAAsB,GAAG,MAAM,CAEzE;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,kBAAkB,GAAG,MAAM,CAE7D;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,kFAAkF;AAClF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE;IACvC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,CAAA;IACtC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,sBAAsB,CAAA;IAC1C,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;CAC/B,2CA+HA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { TranslateNS, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
+
import type { ContextInspectCategory } from '../../host/context-inspect.ts';
|
|
3
|
+
export interface ContextInspectDockProps extends PropsRuntime<'conversation.composer.dock'> {
|
|
4
|
+
readonly enabled: () => boolean;
|
|
5
|
+
readonly open: (category: ContextInspectCategory) => void;
|
|
6
|
+
readonly t: TranslateNS<'agent-enhancer'>;
|
|
7
|
+
}
|
|
8
|
+
/** Invisible dock resident: wires context drill-down onto the official meter rows. */
|
|
9
|
+
export declare function ContextInspectDock(props: ContextInspectDockProps): null;
|
|
10
|
+
//# sourceMappingURL=dock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dock.d.ts","sourceRoot":"","sources":["../../../src/client/context/dock.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAEjF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AAG3E,MAAM,WAAW,uBAAwB,SAAQ,YAAY,CAAC,4BAA4B,CAAC;IACzF,QAAQ,CAAC,OAAO,EAAE,MAAM,OAAO,CAAA;IAC/B,QAAQ,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,sBAAsB,KAAK,IAAI,CAAA;IACzD,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAA;CAC1C;AAED,sFAAsF;AACtF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,QAShE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ContextInspectCategory } from '../../host/context-inspect.ts';
|
|
2
|
+
export interface ContextMeterEnhanceOptions {
|
|
3
|
+
readonly enabled: () => boolean;
|
|
4
|
+
readonly sessionId: () => string | undefined;
|
|
5
|
+
readonly open: (category: ContextInspectCategory) => void;
|
|
6
|
+
readonly t: (key: string, params?: Record<string, string | number>) => string;
|
|
7
|
+
}
|
|
8
|
+
/** Official context composition panel: System / Tools / Messages (not Token 用量). */
|
|
9
|
+
export declare function findOpenContextMeterPanel(): HTMLElement | null;
|
|
10
|
+
/** Drill System / Tools / Messages into context details. Does not own the bill entry. */
|
|
11
|
+
export declare function installContextMeterEnhance(options: ContextMeterEnhanceOptions): () => void;
|
|
12
|
+
//# sourceMappingURL=enhance-meter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enhance-meter.d.ts","sourceRoot":"","sources":["../../../src/client/context/enhance-meter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AAO3E,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,OAAO,EAAE,MAAM,OAAO,CAAA;IAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM,MAAM,GAAG,SAAS,CAAA;IAC5C,QAAQ,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,sBAAsB,KAAK,IAAI,CAAA;IACzD,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,MAAM,CAAA;CAC9E;AAMD,oFAAoF;AACpF,wBAAgB,yBAAyB,IAAI,WAAW,GAAG,IAAI,CAa9D;AAiDD,yFAAyF;AACzF,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,0BAA0B,GAAG,MAAM,IAAI,CAW1F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/client/context/format.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQlD;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAGlE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ContextInspectCategory } from '../../host/context-inspect.ts';
|
|
2
|
+
/** Squeeze / compact glyph for the official compact action. */
|
|
3
|
+
export declare function CompactIcon(props: {
|
|
4
|
+
readonly size?: number;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
/** Compact category glyphs for the rightbar segments (Cursor-style). */
|
|
7
|
+
export declare function CategoryIcon(props: {
|
|
8
|
+
readonly category: ContextInspectCategory;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/client/context/icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AAI3E,+DAA+D;AAC/D,wBAAgB,WAAW,CAAC,KAAK,EAAE;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,2CAc5D;AAED,wEAAwE;AACxE,wBAAgB,YAAY,CAAC,KAAK,EAAE;IAAE,QAAQ,CAAC,QAAQ,EAAE,sBAAsB,CAAA;CAAE,2CAkChF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ContextInspectCategory } from '../../host/context-inspect.ts';
|
|
2
|
+
import type { SessionId } from '@deepseek-ai/dsh-session/types';
|
|
3
|
+
export interface SidebarRightOpenTab {
|
|
4
|
+
openTab(kind: string, options?: {
|
|
5
|
+
readonly params?: object;
|
|
6
|
+
}): void;
|
|
7
|
+
}
|
|
8
|
+
/** Open the context-inspect page; poll briefly until the rightbar session surface is mounted. */
|
|
9
|
+
export declare function openContextInspectTab(sidebarRight: SidebarRightOpenTab | undefined, params: {
|
|
10
|
+
readonly sessionId: SessionId;
|
|
11
|
+
readonly category: ContextInspectCategory;
|
|
12
|
+
readonly itemId?: string;
|
|
13
|
+
}): () => void;
|
|
14
|
+
/** Open the model bill; poll briefly until the rightbar session surface is mounted. */
|
|
15
|
+
export declare function openUsageTab(sidebarRight: SidebarRightOpenTab | undefined): () => void;
|
|
16
|
+
//# sourceMappingURL=open-tab.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open-tab.d.ts","sourceRoot":"","sources":["../../../src/client/context/open-tab.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AAC3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAI/D,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACpE;AA6CD,iGAAiG;AACjG,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,mBAAmB,GAAG,SAAS,EAC7C,MAAM,EAAE;IAAE,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,sBAAsB,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAC7G,MAAM,IAAI,CAEZ;AAED,uFAAuF;AACvF,wBAAgB,YAAY,CAAC,YAAY,EAAE,mBAAmB,GAAG,SAAS,GAAG,MAAM,IAAI,CAEtF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PropsRuntime, TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
+
import type { SessionId } from '@deepseek-ai/dsh-session/types';
|
|
3
|
+
import type { ContextCompactResult } from '../../host/context-compact.ts';
|
|
4
|
+
import type { ContextInspectCategory, ContextInspectResult } from '../../host/context-inspect.ts';
|
|
5
|
+
export interface ContextInspectRightTabProps extends PropsRuntime<'sidebar.right.pane.tab'> {
|
|
6
|
+
readonly inspect: (sessionId: SessionId, category: ContextInspectCategory, signal: AbortSignal) => Promise<ContextInspectResult>;
|
|
7
|
+
readonly compact: (sessionId: SessionId, signal: AbortSignal) => Promise<ContextCompactResult>;
|
|
8
|
+
readonly t: TranslateNS<'agent-enhancer'>;
|
|
9
|
+
}
|
|
10
|
+
export declare function ContextInspectRightTab(props: ContextInspectRightTabProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function ContextInspectRightTabTitle(props: PropsRuntime<'sidebar.right.pane.tab.title'> & {
|
|
12
|
+
readonly t: TranslateNS<'agent-enhancer'>;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=right-tab.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"right-tab.d.ts","sourceRoot":"","sources":["../../../src/client/context/right-tab.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAEjF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAC/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAA;AACzE,OAAO,KAAK,EACV,sBAAsB,EAItB,oBAAoB,EACrB,MAAM,+BAA+B,CAAA;AAetC,MAAM,WAAW,2BAA4B,SAAQ,YAAY,CAAC,wBAAwB,CAAC;IACzF,QAAQ,CAAC,OAAO,EAAE,CAChB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,sBAAsB,EAChC,MAAM,EAAE,WAAW,KAChB,OAAO,CAAC,oBAAoB,CAAC,CAAA;IAClC,QAAQ,CAAC,OAAO,EAAE,CAChB,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,WAAW,KAChB,OAAO,CAAC,oBAAoB,CAAC,CAAA;IAClC,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAA;CAC1C;AA4DD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,2CAmWxE;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,YAAY,CAAC,8BAA8B,CAAC,GAAG;IAChG,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAA;CAC1C,2CAQA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { SessionId } from '@deepseek-ai/dsh-session/types';
|
|
2
|
+
import type { ContextInspectCategory } from '../../host/context-inspect.ts';
|
|
3
|
+
export declare const CONTEXT_INSPECT_TAB_ID = "dsh-agent-enhancer/contextInspect";
|
|
4
|
+
export declare const CONTEXT_INSPECT_TAB_KIND = "agentEnhancerContextInspect";
|
|
5
|
+
export interface ContextInspectTabParams {
|
|
6
|
+
readonly sessionId: SessionId;
|
|
7
|
+
readonly category: ContextInspectCategory;
|
|
8
|
+
readonly itemId?: string;
|
|
9
|
+
}
|
|
10
|
+
declare module '@deepseek-ai/dsh-client-ui-sidebar-right/client' {
|
|
11
|
+
interface SidebarRightTabParamsMap {
|
|
12
|
+
agentEnhancerContextInspect: ContextInspectTabParams;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=tab.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab.d.ts","sourceRoot":"","sources":["../../../src/client/context/tab.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAC/D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AAE3E,eAAO,MAAM,sBAAsB,sCAAsC,CAAA;AACzE,eAAO,MAAM,wBAAwB,gCAAgC,CAAA;AAErE,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;IAC7B,QAAQ,CAAC,QAAQ,EAAE,sBAAsB,CAAA;IACzC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,OAAO,QAAQ,iDAAiD,CAAC;IAC/D,UAAU,wBAAwB;QAChC,2BAA2B,EAAE,uBAAuB,CAAA;KACrD;CACF"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
+
import type { ContextInspectItem } from '../../host/context-inspect.ts';
|
|
3
|
+
/** Localize host English role titles while keeping specific names (tools, inject sources). */
|
|
4
|
+
export declare function localizeItemTitle(item: ContextInspectItem, t: TranslateNS<'agent-enhancer'>): string;
|
|
5
|
+
//# sourceMappingURL=title.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../../src/client/context/title.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAsB,MAAM,+BAA+B,CAAA;AAyB3F,8FAA8F;AAC9F,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,kBAAkB,EACxB,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,GAC/B,MAAM,CA4BR"}
|
|
@@ -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,kDAkC/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"}
|