dsh-agent-enhancer 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +58 -39
- package/README.md +58 -39
- 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 +21 -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.map +1 -1
- package/lib/client/dsh/conversation.d.ts.map +1 -1
- package/lib/client/dsh/icons.d.ts +2 -0
- package/lib/client/dsh/icons.d.ts.map +1 -1
- package/lib/client/dsh/model-catalog.d.ts +7 -0
- package/lib/client/dsh/model-catalog.d.ts.map +1 -1
- 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.map +1 -1
- 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.d.ts +3 -0
- package/lib/client/dsh/settings.d.ts.map +1 -1
- 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.map +1 -1
- package/lib/client/locales.d.ts +373 -11
- package/lib/client/locales.d.ts.map +1 -1
- package/lib/client/prompt/coordinator.d.ts +2 -0
- package/lib/client/prompt/coordinator.d.ts.map +1 -1
- package/lib/client/prompt/history.d.ts.map +1 -1
- package/lib/client/prompt/ledger-store.d.ts +8 -0
- package/lib/client/prompt/ledger-store.d.ts.map +1 -0
- package/lib/client/prompt/ledger.d.ts +15 -0
- package/lib/client/prompt/ledger.d.ts.map +1 -0
- package/lib/client/remote.d.ts +28 -1
- package/lib/client/remote.d.ts.map +1 -1
- package/lib/client/rollback/actions.d.ts +1 -0
- package/lib/client/rollback/actions.d.ts.map +1 -1
- package/lib/client/rollback/controller.d.ts +24 -2
- package/lib/client/rollback/controller.d.ts.map +1 -1
- package/lib/client/rollback/failure.d.ts +7 -0
- package/lib/client/rollback/failure.d.ts.map +1 -0
- package/lib/client/rollback/format.d.ts +23 -0
- package/lib/client/rollback/format.d.ts.map +1 -0
- package/lib/client/rollback/input-actions-cache.d.ts +6 -0
- package/lib/client/rollback/input-actions-cache.d.ts.map +1 -0
- package/lib/client/rollback/modal-host.d.ts +13 -0
- package/lib/client/rollback/modal-host.d.ts.map +1 -1
- package/lib/client/rollback/preview.d.ts +3 -2
- package/lib/client/rollback/preview.d.ts.map +1 -1
- package/lib/client/rollback/prompt-entries.d.ts +9 -0
- package/lib/client/rollback/prompt-entries.d.ts.map +1 -0
- package/lib/client/rollback/remote.d.ts +2 -1
- package/lib/client/rollback/remote.d.ts.map +1 -1
- package/lib/client/rollback/session-stats-dock.d.ts +10 -0
- package/lib/client/rollback/session-stats-dock.d.ts.map +1 -0
- package/lib/client/rollback/session-stats-filter.d.ts +18 -0
- package/lib/client/rollback/session-stats-filter.d.ts.map +1 -0
- package/lib/client/rollback/session-stats-meter.d.ts +18 -0
- package/lib/client/rollback/session-stats-meter.d.ts.map +1 -0
- package/lib/client/rollback/timeline-format.d.ts +23 -0
- package/lib/client/rollback/timeline-format.d.ts.map +1 -0
- package/lib/client/rollback/timeline-kind.d.ts +13 -0
- package/lib/client/rollback/timeline-kind.d.ts.map +1 -0
- package/lib/client/rollback/timeline-panel.d.ts +25 -0
- package/lib/client/rollback/timeline-panel.d.ts.map +1 -0
- package/lib/client/rollback/timeline-tab.d.ts +39 -0
- package/lib/client/rollback/timeline-tab.d.ts.map +1 -0
- package/lib/client/rollback/transcript-filter.d.ts +5 -0
- package/lib/client/rollback/transcript-filter.d.ts.map +1 -1
- package/lib/client/rollback/transcript.d.ts +45 -5
- package/lib/client/rollback/transcript.d.ts.map +1 -1
- package/lib/client/rollback/turn-outline-filter.d.ts.map +1 -1
- package/lib/client/rollback/types.d.ts +14 -1
- package/lib/client/rollback/types.d.ts.map +1 -1
- package/lib/client/rollback/user-node.d.ts +1 -0
- package/lib/client/rollback/user-node.d.ts.map +1 -1
- package/lib/client.js +4880 -386
- package/lib/client.js.map +1 -1
- package/lib/config.d.ts +21 -2
- package/lib/config.d.ts.map +1 -1
- package/lib/errors.d.ts +1 -1
- package/lib/errors.d.ts.map +1 -1
- 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/checkpoint/activity.d.ts +43 -0
- package/lib/host/checkpoint/activity.d.ts.map +1 -0
- package/lib/host/checkpoint/availability.d.ts +8 -1
- package/lib/host/checkpoint/availability.d.ts.map +1 -1
- package/lib/host/checkpoint/capture.d.ts +12 -4
- package/lib/host/checkpoint/capture.d.ts.map +1 -1
- package/lib/host/checkpoint/dsh.d.ts.map +1 -1
- package/lib/host/checkpoint/files.d.ts +3 -0
- package/lib/host/checkpoint/files.d.ts.map +1 -1
- package/lib/host/checkpoint/live.d.ts +8 -0
- package/lib/host/checkpoint/live.d.ts.map +1 -1
- package/lib/host/checkpoint/service.d.ts +82 -0
- package/lib/host/checkpoint/service.d.ts.map +1 -1
- package/lib/host/checkpoint/store.d.ts +7 -0
- package/lib/host/checkpoint/store.d.ts.map +1 -1
- package/lib/host/checkpoint/workspace-snapshot.d.ts +30 -0
- package/lib/host/checkpoint/workspace-snapshot.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 +59 -2
- package/lib/host/index.d.ts.map +1 -1
- package/lib/host/model.d.ts +9 -1
- package/lib/host/model.d.ts.map +1 -1
- package/lib/host/rpc.d.ts +182 -0
- package/lib/host/rpc.d.ts.map +1 -1
- 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 +1 -1
- package/lib/identity.d.ts.map +1 -1
- package/lib/index.js +4217 -466
- package/lib/index.js.map +4 -4
- package/package.json +74 -50
package/README.en.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# DSH Agent Enhancer
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
English | [简体中文](./README.md)
|
|
4
4
|
|
|
5
|
-
> One plugin to make DeepSeek Harness Desktop **easier to write, refine, and
|
|
6
|
-
> Prompt history · one-click optimize · next-prompt predict · conversation & file restore — inside the official conversation
|
|
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
7
|
|
|
8
8
|
[](https://www.npmjs.com/package/dsh-agent-enhancer)
|
|
9
|
-
[](https://www.npmjs.com/package/dsh-agent-enhancer)
|
|
10
10
|
[](https://awesome-dsh-plugin.com)
|
|
11
11
|
[](./LICENSE)
|
|
12
12
|
|
|
@@ -14,51 +14,55 @@
|
|
|
14
14
|
|
|
15
15
|
## Know it in 30 seconds
|
|
16
16
|
|
|
17
|
-
| You want to… | Do this |
|
|
18
|
-
| --- | --- |
|
|
19
|
-
| Revisit
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
| Turn a feature off | **Settings → Built-in plugins → Agent Enhance** |
|
|
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 | **Checkpoint timeline** / **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
25
|
|
|
26
|
-
|
|
26
|
+
Core features default on. UI language follows Desktop (`zh` / `en`).
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
30
|
## Feature map
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
| **
|
|
37
|
-
| **
|
|
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** | Checkpoint timeline · Restore to here · Undo restore | Open session stats from the composer “N turns / M steps” pill, then click the **Session statistics** title row; or the **Checkpoint timeline** icon on a user message; restore from the timeline or **Restore to here** → preview conversation-only or + tracked files; after restore open **+** / `/` → **Undo restore** (while a tip remains) | No processes / terminals / untracked files; existing checkpoints stay if you turn the switch off |
|
|
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 |
|
|
38
41
|
|
|
39
42
|
### Settings
|
|
40
43
|
|
|
41
44
|
**Settings → Built-in plugins → Agent Enhance**
|
|
42
45
|
|
|
43
|
-
|
|
|
46
|
+
| Category | Toggles / config | Default | Effect |
|
|
44
47
|
| --- | --- | --- | --- |
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
48
|
+
| **Write** | `historyEnabled` · `optimizeEnabled` · `predictEnabled` | All on | `↑↓` / `Alt+R`; optimize & undo (model pill); gray predict (model pill) |
|
|
49
|
+
| **Restore** | `rollbackEnabled` | On | Checkpoint timeline; **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 |
|
|
49
53
|
|
|
50
|
-
Model pills default to **Follow session**, or pick provider / model / reasoning effort
|
|
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.
|
|
51
55
|
|
|
52
56
|
### UI map
|
|
53
57
|
|
|
54
|
-
|
|
|
58
|
+
| Category | What you see | Preview |
|
|
55
59
|
| --- | --- | --- |
|
|
56
|
-
| History search
|
|
57
|
-
|
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
| Settings
|
|
60
|
+
| **Write** | History search; optimize control and gray prediction |   |
|
|
61
|
+
| **Restore** | Session-stats / message timeline entry → restore → preview → undo |      |
|
|
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 |  |
|
|
62
66
|
|
|
63
67
|
---
|
|
64
68
|
|
|
@@ -91,7 +95,7 @@ Then open the **Plugin Market** tab, search, and install this plugin. Some third
|
|
|
91
95
|
When the `dsh` CLI is available and you intend to write the **desktop** profile:
|
|
92
96
|
|
|
93
97
|
```sh
|
|
94
|
-
dsh plugin --profile desktop add dsh-agent-enhancer@0.
|
|
98
|
+
dsh plugin --profile desktop add dsh-agent-enhancer@0.3.1
|
|
95
99
|
```
|
|
96
100
|
|
|
97
101
|
Or unpinned: `dsh plugin --profile desktop add dsh-agent-enhancer`.
|
|
@@ -100,12 +104,24 @@ You should then see the optimize control and **Agent Enhance** in settings.
|
|
|
100
104
|
|
|
101
105
|
### Local directory (development)
|
|
102
106
|
|
|
103
|
-
`dsh plugin
|
|
107
|
+
**Do not** run `dsh plugin --profile desktop add <absolute-path>` against this repo: some Desktop / CLI builds rewrite the plugin's `package.json` into `@deepseek-ai/dsh-desktop-runtime` dependencies and break the tree. Link manually instead:
|
|
104
108
|
|
|
105
109
|
```powershell
|
|
106
110
|
corepack pnpm install --frozen-lockfile
|
|
107
111
|
corepack pnpm build
|
|
108
|
-
|
|
112
|
+
|
|
113
|
+
$Repo = (Resolve-Path .).Path -replace '\\','/'
|
|
114
|
+
$ProfileDir = if ($env:DSH_HOME) { Join-Path $env:DSH_HOME 'profiles\desktop' } else { Join-Path $env:USERPROFILE '.dsh\profiles\desktop' }
|
|
115
|
+
$ProfilePkg = Join-Path $ProfileDir 'package.json'
|
|
116
|
+
$json = Get-Content -LiteralPath $ProfilePkg -Raw | ConvertFrom-Json
|
|
117
|
+
if (-not $json.dependencies) { $json | Add-Member -NotePropertyName dependencies -NotePropertyValue ([pscustomobject]@{}) }
|
|
118
|
+
$json.dependencies | Add-Member -NotePropertyName 'dsh-agent-enhancer' -NotePropertyValue "link:$Repo" -Force
|
|
119
|
+
$bundles = @($json.dsh.profile.bundles)
|
|
120
|
+
if ($bundles -notcontains 'dsh-agent-enhancer') {
|
|
121
|
+
$json.dsh.profile.bundles = @($bundles + 'dsh-agent-enhancer')
|
|
122
|
+
}
|
|
123
|
+
($json | ConvertTo-Json -Depth 20) | Set-Content -LiteralPath $ProfilePkg -Encoding utf8
|
|
124
|
+
dsh plugin --profile desktop install
|
|
109
125
|
```
|
|
110
126
|
|
|
111
127
|
Fully quit and restart Desktop afterward. Later code changes only need `corepack pnpm build` (Desktop loads `lib/`).
|
|
@@ -120,7 +136,9 @@ Keep host-shared DSH packages in both `peerDependencies` and `devDependencies`,
|
|
|
120
136
|
| History | Never calls a model |
|
|
121
137
|
| Optimize | Sends draft/selection + latest completed turn |
|
|
122
138
|
| Predict | Sends the latest completed turn |
|
|
123
|
-
|
|
|
139
|
+
| Auto classifier | Only when the toggle is on; failures fall back to local heuristics without blocking the main request |
|
|
140
|
+
| Bill / context | Local aggregation and heuristic estimates; balance queries use Desktop-stored credentials — this plugin ships no keys |
|
|
141
|
+
| Cache | In-session memory (bill data persists under the local usage directory) |
|
|
124
142
|
| Audit | Local `plugin:agent-enhancer/request` (no telemetry upload) |
|
|
125
143
|
| Coexistence | Hints only — never auto-disables third-party plugins |
|
|
126
144
|
|
|
@@ -128,7 +146,7 @@ Keep host-shared DSH packages in both `peerDependencies` and `devDependencies`,
|
|
|
128
146
|
|
|
129
147
|
## Compatibility
|
|
130
148
|
|
|
131
|
-
- **DSH:** `>=0.2.
|
|
149
|
+
- **DSH:** `>=0.2.2-rc.1 <0.3.0-0` (Desktop `0.2.2-rc.1`+)
|
|
132
150
|
|
|
133
151
|
---
|
|
134
152
|
|
|
@@ -167,10 +185,11 @@ corepack pnpm check # typecheck + test + build + pack verify
|
|
|
167
185
|
|
|
168
186
|
| Path | Contents |
|
|
169
187
|
| --- | --- |
|
|
170
|
-
| `src/host/` | Model calls, RPC, checkpoint rollback |
|
|
171
|
-
| `src/client/` | Conversation input
|
|
188
|
+
| `src/host/` | Model calls, RPC, checkpoint rollback, bill, Auto routing, balances |
|
|
189
|
+
| `src/client/` | Conversation input, bill / context side panes, settings and Models-page balances |
|
|
172
190
|
| `tests/` | Vitest |
|
|
173
191
|
| `lib/` | Build output |
|
|
192
|
+
| `docs/images/` | README screenshots |
|
|
174
193
|
|
|
175
194
|
---
|
|
176
195
|
|
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# DSH Agent Enhancer
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[English](./README.en.md) | 简体中文
|
|
4
4
|
|
|
5
|
-
> 一个插件,让 DeepSeek Harness Desktop
|
|
6
|
-
> 历史回顾 · 一键优化 · 下一条预测 · 对话与文件恢复 ——
|
|
5
|
+
> 一个插件,让 DeepSeek Harness Desktop **更好写、更好改、更好回退、更看得见用量与上下文**,并持续向主流 Agent 体验对齐。
|
|
6
|
+
> 历史回顾 · 一键优化 · 下一条预测 · 对话与文件恢复 · 模型账单 · 上下文明细 · Auto 路由 · 分账号余额 —— 嵌在官方会话与设置里,不用另开窗口。
|
|
7
7
|
|
|
8
8
|
[](https://www.npmjs.com/package/dsh-agent-enhancer)
|
|
9
|
-
[](https://www.npmjs.com/package/dsh-agent-enhancer)
|
|
10
10
|
[](https://awesome-dsh-plugin.com)
|
|
11
11
|
[](./LICENSE)
|
|
12
12
|
|
|
@@ -14,51 +14,55 @@
|
|
|
14
14
|
|
|
15
15
|
## 30 秒看懂
|
|
16
16
|
|
|
17
|
-
| 你想… | 怎么做 |
|
|
18
|
-
| --- | --- |
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
| 关掉某个能力 | **设置 → 内置插件 → 智能体增强** |
|
|
17
|
+
| 类别 | 你想… | 怎么做 |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| **写提示** | 找回 / 改清楚 / 接着问 | `↑↓` 或 `Alt+R`;右侧 **优化**;回复后 `Tab` 采纳灰字 |
|
|
20
|
+
| **回退** | 回到某一轮之前 | **检查点时间线** / **恢复到这里** → 预览确认;需要时用 **+** / `/` **撤销恢复** |
|
|
21
|
+
| **用量与成本** | 看 token 花多少、账号还剩多少 | **Token 用量** → **模型账单**;**设置 → 模型** 看分账号余额;辅助模型可单独选更便宜档或 Auto |
|
|
22
|
+
| **上下文** | 看窗口占了多少 | 占用环 → 右侧栏明细;可 **压缩上下文** |
|
|
23
|
+
| **模型路由** | 让会话自己选强弱档 | 模型列表选 **Auto**;设置里映射 Instant / Thinking / Pro |
|
|
24
|
+
| **总开关** | 关掉某个能力 | **设置 → 内置插件 → 智能体增强** |
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
默认核心能力开启。界面语言跟随 Desktop(`zh` / `en`)。
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
30
|
## 功能对照
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
32
|
+
按能力归类;同组能力共用入口与截图,后续加能力往对应行扩写即可。
|
|
33
|
+
|
|
34
|
+
| 类别 | 包含 | 怎么用 | 要点 |
|
|
35
|
+
| --- | --- | --- | --- |
|
|
36
|
+
| **写提示** | 历史 · 优化 · 预测 | 首/末行 `↑↓`;`Alt+R`(兼容 `Ctrl+R`);右侧优化(可撤销,有选区只改选区);回复后灰字,`Tab` 采纳 | 仅当前已加载会话;`Enter` 只填不发;chip 草稿不误触历史;模糊稿补全、明确稿少改;预测每轮最多一条 |
|
|
37
|
+
| **回退** | 检查点时间线 · 恢复到这里 · 撤销恢复 | 底部「N 轮 M 步」打开会话统计,点标题行 **会话统计**;或用户消息旁 **检查点时间线** 图标;时间线 / 消息旁 **恢复到这里** → 预览仅对话或含已跟踪文件;恢复后 **+** / `/` **撤销恢复**(有 tip 时) | 不恢复进程 / 终端 / 未跟踪文件等;关闭开关后保留已有检查点 |
|
|
38
|
+
| **用量与成本** | Token 用量 · 模型账单 · 分账号余额 | 点用量标题进右侧栏账单(今天 / 7 天 / 30 天 / 全部);**设置 → 模型** 看 DeepSeek 账号 / API Key 余额 | 本地汇总输入 / 输出 / 缓存读、热力与功能占比;「约 ¥」按官方价估算非发票;账号走 Platform 钱包、API Key 走 `/user/balance`;金额两位小数 |
|
|
39
|
+
| **上下文** | 占用环 · 上下文明细 · 压缩 | 点占用环进右侧栏;可跳转分项明细;一键调用官方 `/compact` | 拆分系统提示 / 工具 / 消息;数字为启发式约值,非账单精确值 |
|
|
40
|
+
| **模型路由** | Auto · 档位映射 · 可选分类器 | 模型列表选 **Auto**;设置映射 Instant / Thinking / Pro;可选开小模型分类 | 默认中英双语启发式;分类失败回退启发式;优化 / 预测也可选 Auto 或指定模型 |
|
|
38
41
|
|
|
39
42
|
### 设置
|
|
40
43
|
|
|
41
44
|
路径:**设置 → 内置插件 → 智能体增强**
|
|
42
45
|
|
|
43
|
-
|
|
|
46
|
+
| 类别 | 开关 / 配置 | 默认 | 作用 |
|
|
44
47
|
| --- | --- | --- | --- |
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
48
|
+
| **写提示** | `historyEnabled` · `optimizeEnabled` · `predictEnabled` | 均开 | `↑↓` / `Alt+R`;优化与撤销(旁有模型药丸);灰字预测(旁有模型药丸) |
|
|
49
|
+
| **回退** | `rollbackEnabled` | 开 | 检查点时间线;「恢复到这里」;`+` / `/`「撤销恢复」 |
|
|
50
|
+
| **上下文** | `contextInspectEnabled` | 开 | 占用环 → 右侧栏明细 |
|
|
51
|
+
| **模型路由** | `autoClassifierEnabled` 等 | 分类器关 | 会话 / 辅助可选 Auto;档位映射;可选小模型分类 |
|
|
52
|
+
| **维护** | 插件更新 | — | npm 安装可检查更新;链接安装仅说明 |
|
|
49
53
|
|
|
50
|
-
模型药丸默认「跟随会话」,也可指定提供商 / 模型 /
|
|
54
|
+
模型药丸默认「跟随会话」,也可指定提供商 / 模型 / 推理等级,或选 **Auto**。余额挂在 **设置 → 模型** 各提供商卡片上,不在账单顶栏重复展示。
|
|
51
55
|
|
|
52
56
|
### 界面一览
|
|
53
57
|
|
|
54
|
-
|
|
|
58
|
+
| 类别 | 说明 | 预览 |
|
|
55
59
|
| --- | --- | --- |
|
|
56
|
-
|
|
|
57
|
-
|
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
|
|
|
60
|
+
| **写提示** | 历史搜索;优化入口与灰字预测 |   |
|
|
61
|
+
| **回退** | 会话统计 / 消息旁时间线入口 → 恢复 → 预览 → 撤销 |      |
|
|
62
|
+
| **用量与成本** | Token 用量入口、模型账单、分账号余额 |    |
|
|
63
|
+
| **上下文** | 占用摘要与右侧栏明细 / 压缩 |   |
|
|
64
|
+
| **模型路由** | 模型列表 Auto;档位映射与可选分类器 |   |
|
|
65
|
+
| **设置** | 智能体增强总开关与模型药丸 |  |
|
|
62
66
|
|
|
63
67
|
---
|
|
64
68
|
|
|
@@ -91,7 +95,7 @@
|
|
|
91
95
|
本机已配置 `dsh` CLI、且要写入 **desktop** profile 时:
|
|
92
96
|
|
|
93
97
|
```sh
|
|
94
|
-
dsh plugin --profile desktop add dsh-agent-enhancer@0.
|
|
98
|
+
dsh plugin --profile desktop add dsh-agent-enhancer@0.3.1
|
|
95
99
|
```
|
|
96
100
|
|
|
97
101
|
也可不钉版本:`dsh plugin --profile desktop add dsh-agent-enhancer`。
|
|
@@ -100,12 +104,24 @@ dsh plugin --profile desktop add dsh-agent-enhancer@0.2.0
|
|
|
100
104
|
|
|
101
105
|
### 本地目录(开发)
|
|
102
106
|
|
|
103
|
-
`dsh plugin
|
|
107
|
+
**不要**对本地仓库执行 `dsh plugin --profile desktop add <绝对路径>`:部分 Desktop / CLI 会把仓库里的 `package.json` 改写成 `@deepseek-ai/dsh-desktop-runtime` 依赖,破坏开发树。请手动 `link:`:
|
|
104
108
|
|
|
105
109
|
```powershell
|
|
106
110
|
corepack pnpm install --frozen-lockfile
|
|
107
111
|
corepack pnpm build
|
|
108
|
-
|
|
112
|
+
|
|
113
|
+
$Repo = (Resolve-Path .).Path -replace '\\','/'
|
|
114
|
+
$ProfileDir = if ($env:DSH_HOME) { Join-Path $env:DSH_HOME 'profiles\desktop' } else { Join-Path $env:USERPROFILE '.dsh\profiles\desktop' }
|
|
115
|
+
$ProfilePkg = Join-Path $ProfileDir 'package.json'
|
|
116
|
+
$json = Get-Content -LiteralPath $ProfilePkg -Raw | ConvertFrom-Json
|
|
117
|
+
if (-not $json.dependencies) { $json | Add-Member -NotePropertyName dependencies -NotePropertyValue ([pscustomobject]@{}) }
|
|
118
|
+
$json.dependencies | Add-Member -NotePropertyName 'dsh-agent-enhancer' -NotePropertyValue "link:$Repo" -Force
|
|
119
|
+
$bundles = @($json.dsh.profile.bundles)
|
|
120
|
+
if ($bundles -notcontains 'dsh-agent-enhancer') {
|
|
121
|
+
$json.dsh.profile.bundles = @($bundles + 'dsh-agent-enhancer')
|
|
122
|
+
}
|
|
123
|
+
($json | ConvertTo-Json -Depth 20) | Set-Content -LiteralPath $ProfilePkg -Encoding utf8
|
|
124
|
+
dsh plugin --profile desktop install
|
|
109
125
|
```
|
|
110
126
|
|
|
111
127
|
然后完全退出并重启 Desktop。之后改代码只需再执行 `corepack pnpm build`(加载的是 `lib/`)。
|
|
@@ -120,7 +136,9 @@ dsh plugin --profile desktop add ((Resolve-Path .).Path)
|
|
|
120
136
|
| 历史 | 不请求模型 |
|
|
121
137
|
| 优化 | 发送原稿或选区 + 最近一轮已完成对话 |
|
|
122
138
|
| 预测 | 发送最近一轮已完成对话 |
|
|
123
|
-
|
|
|
139
|
+
| Auto 分类器 | 仅开关打开时调用;失败回退本地启发式,不阻塞主请求 |
|
|
140
|
+
| 账单 / 上下文 | 本地汇总与启发式估算;余额查询使用 Desktop 已存凭据,插件不携带密钥 |
|
|
141
|
+
| 缓存 | 仅当前会话内存(账单落盘在本机 usage 目录) |
|
|
124
142
|
| 审计 | 本地 `plugin:agent-enhancer/request`(无遥测上传) |
|
|
125
143
|
| 共存 | 只提示,不自动关闭第三方 |
|
|
126
144
|
|
|
@@ -128,7 +146,7 @@ dsh plugin --profile desktop add ((Resolve-Path .).Path)
|
|
|
128
146
|
|
|
129
147
|
## 兼容
|
|
130
148
|
|
|
131
|
-
- **DSH:** `>=0.2.
|
|
149
|
+
- **DSH:** `>=0.2.2-rc.1 <0.3.0-0`(Desktop `0.2.2-rc.1`+)
|
|
132
150
|
|
|
133
151
|
---
|
|
134
152
|
|
|
@@ -167,10 +185,11 @@ corepack pnpm check # typecheck + test + build + 打包校验
|
|
|
167
185
|
|
|
168
186
|
| 路径 | 内容 |
|
|
169
187
|
| --- | --- |
|
|
170
|
-
| `src/host/` | 模型调用、RPC
|
|
171
|
-
| `src/client/` |
|
|
188
|
+
| `src/host/` | 模型调用、RPC、检查点回滚、账单、Auto 路由、余额 |
|
|
189
|
+
| `src/client/` | 会话输入区、右侧栏账单 / 上下文、设置与模型页余额 |
|
|
172
190
|
| `tests/` | Vitest |
|
|
173
191
|
| `lib/` | 构建产物 |
|
|
192
|
+
| `docs/images/` | README 截图 |
|
|
174
193
|
|
|
175
194
|
---
|
|
176
195
|
|
|
@@ -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,21 @@
|
|
|
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
|
+
/** Open the checkpoint timeline for a session; poll briefly until the rightbar mounts. */
|
|
17
|
+
export declare function openCheckpointTimelineTab(sidebarRight: SidebarRightOpenTab | undefined, params: {
|
|
18
|
+
readonly sessionId: SessionId;
|
|
19
|
+
readonly turn?: number;
|
|
20
|
+
}): () => void;
|
|
21
|
+
//# 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;AAK/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;AAED,0FAA0F;AAC1F,wBAAgB,yBAAyB,CACvC,YAAY,EAAE,mBAAmB,GAAG,SAAS,EAC7C,MAAM,EAAE;IAAE,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAChE,MAAM,IAAI,CAEZ"}
|
|
@@ -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"}
|
|
@@ -1 +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,
|
|
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"}
|
|
@@ -1 +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;
|
|
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;AAmBD,wBAAgB,WAAW,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,GAAG,SAAS,WAAW,EAAE,CAUlF;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,YAAY,GAAG,SAAS,EAC9B,OAAO,EAAE,eAAe,GACvB,aAAa,GAAG,IAAI,CAqBtB"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export declare function OptimizeIcon(): import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
export declare function UndoIcon(): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
/** Vertical checkpoint rail for the timeline affordance. */
|
|
4
|
+
export declare function TimelineIcon(): import("react/jsx-runtime").JSX.Element;
|
|
3
5
|
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -1 +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"}
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/client/dsh/icons.tsx"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,4CAc3B;AAED,wBAAgB,QAAQ,4CAevB;AAED,4DAA4D;AAC5D,wBAAgB,YAAY,4CAkB3B"}
|
|
@@ -18,10 +18,17 @@ export declare function parseModelOptionValue(value: string): {
|
|
|
18
18
|
model: string;
|
|
19
19
|
} | null;
|
|
20
20
|
export declare function encodeFollowSelection(): string;
|
|
21
|
+
export declare function encodeAutoSelection(): string;
|
|
22
|
+
/** Clear an Auto tier mapping back to empty provider/model. */
|
|
23
|
+
export declare function encodeUnconfiguredSelection(): string;
|
|
21
24
|
export declare function encodeModelSelection(provider: string, model: string): string;
|
|
22
25
|
export declare function encodeEffortSelection(provider: string, model: string, effort: string): string;
|
|
23
26
|
export type DecodedModelSelection = {
|
|
24
27
|
readonly kind: 'follow';
|
|
28
|
+
} | {
|
|
29
|
+
readonly kind: 'auto';
|
|
30
|
+
} | {
|
|
31
|
+
readonly kind: 'unconfigured';
|
|
25
32
|
} | {
|
|
26
33
|
readonly kind: 'model';
|
|
27
34
|
readonly provider: string;
|
|
@@ -1 +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,
|
|
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,mBAAmB,IAAI,MAAM,CAE5C;AAED,+DAA+D;AAC/D,wBAAgB,2BAA2B,IAAI,MAAM,CAEpD;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,MAAM,CAAA;CAAE,GACzB;IAAE,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAA;CAAE,GACjC;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,CA+C7E"}
|