dsh-agent-enhancer 0.2.0 → 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.
Files changed (113) hide show
  1. package/README.en.md +41 -34
  2. package/README.md +41 -34
  3. package/lib/client/context/chart.d.ts +21 -0
  4. package/lib/client/context/chart.d.ts.map +1 -0
  5. package/lib/client/context/dock.d.ts +10 -0
  6. package/lib/client/context/dock.d.ts.map +1 -0
  7. package/lib/client/context/enhance-meter.d.ts +12 -0
  8. package/lib/client/context/enhance-meter.d.ts.map +1 -0
  9. package/lib/client/context/format.d.ts +3 -0
  10. package/lib/client/context/format.d.ts.map +1 -0
  11. package/lib/client/context/icons.d.ts +10 -0
  12. package/lib/client/context/icons.d.ts.map +1 -0
  13. package/lib/client/context/open-tab.d.ts +16 -0
  14. package/lib/client/context/open-tab.d.ts.map +1 -0
  15. package/lib/client/context/right-tab.d.ts +14 -0
  16. package/lib/client/context/right-tab.d.ts.map +1 -0
  17. package/lib/client/context/tab.d.ts +15 -0
  18. package/lib/client/context/tab.d.ts.map +1 -0
  19. package/lib/client/context/title.d.ts +5 -0
  20. package/lib/client/context/title.d.ts.map +1 -0
  21. package/lib/client/dsh/controls.d.ts.map +1 -1
  22. package/lib/client/dsh/model-catalog.d.ts +7 -0
  23. package/lib/client/dsh/model-catalog.d.ts.map +1 -1
  24. package/lib/client/dsh/model-pill-label.d.ts +21 -0
  25. package/lib/client/dsh/model-pill-label.d.ts.map +1 -0
  26. package/lib/client/dsh/provider-balance-chip.d.ts +9 -0
  27. package/lib/client/dsh/provider-balance-chip.d.ts.map +1 -0
  28. package/lib/client/dsh/settings.d.ts +3 -0
  29. package/lib/client/dsh/settings.d.ts.map +1 -1
  30. package/lib/client/dsh/usage-chart.d.ts +28 -0
  31. package/lib/client/dsh/usage-chart.d.ts.map +1 -0
  32. package/lib/client/dsh/usage-dock.d.ts +8 -0
  33. package/lib/client/dsh/usage-dock.d.ts.map +1 -0
  34. package/lib/client/dsh/usage-format.d.ts +5 -0
  35. package/lib/client/dsh/usage-format.d.ts.map +1 -0
  36. package/lib/client/dsh/usage-kind.d.ts +8 -0
  37. package/lib/client/dsh/usage-kind.d.ts.map +1 -0
  38. package/lib/client/dsh/usage-meter.d.ts +16 -0
  39. package/lib/client/dsh/usage-meter.d.ts.map +1 -0
  40. package/lib/client/dsh/usage-panel.d.ts +8 -0
  41. package/lib/client/dsh/usage-panel.d.ts.map +1 -0
  42. package/lib/client/dsh/usage-tab.d.ts +11 -0
  43. package/lib/client/dsh/usage-tab.d.ts.map +1 -0
  44. package/lib/client/index.d.ts.map +1 -1
  45. package/lib/client/locales.d.ts +281 -3
  46. package/lib/client/locales.d.ts.map +1 -1
  47. package/lib/client/remote.d.ts +28 -1
  48. package/lib/client/remote.d.ts.map +1 -1
  49. package/lib/client.js +3130 -207
  50. package/lib/client.js.map +1 -1
  51. package/lib/config.d.ts +21 -2
  52. package/lib/config.d.ts.map +1 -1
  53. package/lib/errors.d.ts +1 -1
  54. package/lib/errors.d.ts.map +1 -1
  55. package/lib/host/auto-route/classifier.d.ts +5 -0
  56. package/lib/host/auto-route/classifier.d.ts.map +1 -0
  57. package/lib/host/auto-route/heuristic.d.ts +16 -0
  58. package/lib/host/auto-route/heuristic.d.ts.map +1 -0
  59. package/lib/host/auto-route/router.d.ts +15 -0
  60. package/lib/host/auto-route/router.d.ts.map +1 -0
  61. package/lib/host/auto-route/sentinel.d.ts +7 -0
  62. package/lib/host/auto-route/sentinel.d.ts.map +1 -0
  63. package/lib/host/auto-route/session-hook.d.ts +6 -0
  64. package/lib/host/auto-route/session-hook.d.ts.map +1 -0
  65. package/lib/host/auto-route/session-resolved-route.d.ts +7 -0
  66. package/lib/host/auto-route/session-resolved-route.d.ts.map +1 -0
  67. package/lib/host/auto-route/session-selection.d.ts +10 -0
  68. package/lib/host/auto-route/session-selection.d.ts.map +1 -0
  69. package/lib/host/auto-route/session-turn-hint.d.ts +8 -0
  70. package/lib/host/auto-route/session-turn-hint.d.ts.map +1 -0
  71. package/lib/host/auto-route/types.d.ts +18 -0
  72. package/lib/host/auto-route/types.d.ts.map +1 -0
  73. package/lib/host/context-compact.d.ts +42 -0
  74. package/lib/host/context-compact.d.ts.map +1 -0
  75. package/lib/host/context-inspect.d.ts +46 -0
  76. package/lib/host/context-inspect.d.ts.map +1 -0
  77. package/lib/host/index.d.ts +57 -1
  78. package/lib/host/index.d.ts.map +1 -1
  79. package/lib/host/model.d.ts +9 -1
  80. package/lib/host/model.d.ts.map +1 -1
  81. package/lib/host/rpc.d.ts +179 -0
  82. package/lib/host/rpc.d.ts.map +1 -1
  83. package/lib/host/update/check.d.ts +32 -0
  84. package/lib/host/update/check.d.ts.map +1 -0
  85. package/lib/host/update/cli.d.ts +15 -0
  86. package/lib/host/update/cli.d.ts.map +1 -0
  87. package/lib/host/update/install-kind.d.ts +3 -0
  88. package/lib/host/update/install-kind.d.ts.map +1 -0
  89. package/lib/host/update/registry.d.ts +16 -0
  90. package/lib/host/update/registry.d.ts.map +1 -0
  91. package/lib/host/update/semver.d.ts +2 -0
  92. package/lib/host/update/semver.d.ts.map +1 -0
  93. package/lib/host/update/types.d.ts +17 -0
  94. package/lib/host/update/types.d.ts.map +1 -0
  95. package/lib/host/usage/balance.d.ts +113 -0
  96. package/lib/host/usage/balance.d.ts.map +1 -0
  97. package/lib/host/usage/history.d.ts +23 -0
  98. package/lib/host/usage/history.d.ts.map +1 -0
  99. package/lib/host/usage/ledger.d.ts +20 -0
  100. package/lib/host/usage/ledger.d.ts.map +1 -0
  101. package/lib/host/usage/observe.d.ts +9 -0
  102. package/lib/host/usage/observe.d.ts.map +1 -0
  103. package/lib/host/usage/pricing.d.ts +55 -0
  104. package/lib/host/usage/pricing.d.ts.map +1 -0
  105. package/lib/host/usage/source.d.ts +14 -0
  106. package/lib/host/usage/source.d.ts.map +1 -0
  107. package/lib/host/usage/summarize.d.ts +7 -0
  108. package/lib/host/usage/summarize.d.ts.map +1 -0
  109. package/lib/host/usage/types.d.ts +105 -0
  110. package/lib/host/usage/types.d.ts.map +1 -0
  111. package/lib/index.js +3151 -356
  112. package/lib/index.js.map +4 -4
  113. package/package.json +26 -3
package/README.en.md CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  **中文:** [README.md](./README.md)
4
4
 
5
- > One plugin to make DeepSeek Harness Desktop **easier to write, refine, and roll back**, and to keep moving toward mainstream agent UX.
6
- > Prompt history · one-click optimize · next-prompt predict · conversation & file restore — inside the official conversation input, no extra window.
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
  [![npm](https://img.shields.io/npm/v/dsh-agent-enhancer.svg)](https://www.npmjs.com/package/dsh-agent-enhancer)
9
9
  [![DSH](https://img.shields.io/badge/DSH-%3E%3D0.2.1--rc.5%20%3C0.3.0-blue)](https://www.npmjs.com/package/dsh-agent-enhancer)
@@ -14,51 +14,55 @@
14
14
 
15
15
  ## Know it in 30 seconds
16
16
 
17
- | You want to… | Do this |
18
- | --- | --- |
19
- | Revisit a prompt you just sent | `↑` on the first draft line / `↓` on the last, or `Alt+R` |
20
- | Clarify a messy draft | Click **Optimize** on the right; **Undo** if needed |
21
- | Continue after a reply | Press `Tab` to accept the gray suggestion |
22
- | Go back before a turn | Click **Restore to here**, then confirm in the preview |
23
- | Spend less on helper calls | Pick a cheaper model for optimize / predict in settings |
24
- | Turn a feature off | **Settings → Built-in plugins → Agent Enhance** |
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
25
 
26
- Defaults: all four features on. UI language follows Desktop (`zh` / `en`).
26
+ Core features default on. UI language follows Desktop (`zh` / `en`).
27
27
 
28
28
  ---
29
29
 
30
30
  ## Feature map
31
31
 
32
- | Feature | How to use | Notes |
33
- | --- | --- | --- |
34
- | **Prompt history** | First-line `↑`, last-line `↓`; `Esc` to exit; `Alt+R` (`Ctrl+R` where available) | Current loaded session only; `Enter` fills draft without sending; chip drafts ignore history keys |
35
- | **Prompt optimize** | Optimize on the right; selection-only when selected; undo supported | Vague drafts gain detail; specific drafts stay lean; chips kept; optional dedicated model |
36
- | **Next-prompt predict** | Gray suggestion after a reply; `Tab` to accept | At most once per turn; clears on type / session switch |
37
- | **Conversation & file restore** | **Restore to here** on the message; after restore open **+** or type `/`, then **Undo restore** (only while an undo tip remains) | Conversation only, or conversation + tracked files; no processes / terminals / untracked files |
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 |
38
41
 
39
42
  ### Settings
40
43
 
41
44
  **Settings → Built-in plugins → Agent Enhance**
42
45
 
43
- | Toggle | Config key | Default | Effect |
46
+ | Category | Toggles / config | Default | Effect |
44
47
  | --- | --- | --- | --- |
45
- | Prompt history | `historyEnabled` | On | `↑↓` and `Alt+R` |
46
- | Prompt optimize | `optimizeEnabled` | On | Optimize / undo; model pill |
47
- | Next-prompt prediction | `predictEnabled` | On | Gray suggestion; model pill |
48
- | Conversation & file restore | `rollbackEnabled` | On | **Restore to here**; **+** / `/` menu **Undo restore** |
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 |
49
53
 
50
- Model pills default to **Follow session**, or pick provider / model / reasoning effort. See the UI map below for screenshots.
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
- | Screen | What you see | Preview |
58
+ | Category | What you see | Preview |
55
59
  | --- | --- | --- |
56
- | History search | `Alt+R` surface and result list | ![History search](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/prompt-history.png) |
57
- | Optimize & predict | Optimize control + gray suggestion after a reply | ![Optimize & predict](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/optimize-and-predict.png) |
58
- | Rollback entry | Restore icon; tooltip **Restore to here** | ![Rollback entry](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/rollback-entry.png) |
59
- | Rollback preview | Conversation to withdraw; conversation-only or + tracked files | ![Rollback preview](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/rollback-preview.png) |
60
- | Undo restore | After restore, open input **+** or `/`, choose **Undo restore** | ![Undo restore](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/undo-restore.png) |
61
- | Settings · Agent Enhance | Four toggles, model pills, privacy blurb | ![Settings](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/settings.png) |
60
+ | **Write** | History search; optimize control and gray prediction | ![History search](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/prompt-history.png) ![Optimize & predict](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/optimize-and-predict.png) |
61
+ | **Restore** | Entry → preview scope → undo restore | ![Rollback entry](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/rollback-entry.png) ![Rollback preview](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/rollback-preview.png) ![Undo restore](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/undo-restore.png) |
62
+ | **Usage & cost** | Token usage entry, model bill, per-provider balance | ![Token usage](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/token-usage-meter.png) ![Model bill](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/model-bill.png) ![Provider balance](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/provider-balance.png) |
63
+ | **Context** | Meter summary and right-pane details / compact | ![Context meter](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/context-meter.png) ![Context details](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/context-details.png) |
64
+ | **Routing** | Auto in the model list; tier maps and optional classifier | ![Auto picker](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/auto-model-picker.png) ![Auto routing](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/auto-routing-settings.png) |
65
+ | **Settings** | Agent Enhance toggles and model pills | ![Settings](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/settings.png) |
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.2.0
98
+ dsh plugin --profile desktop add dsh-agent-enhancer@0.3.0
95
99
  ```
96
100
 
97
101
  Or unpinned: `dsh plugin --profile desktop add dsh-agent-enhancer`.
@@ -120,7 +124,9 @@ Keep host-shared DSH packages in both `peerDependencies` and `devDependencies`,
120
124
  | History | Never calls a model |
121
125
  | Optimize | Sends draft/selection + latest completed turn |
122
126
  | Predict | Sends the latest completed turn |
123
- | Cache | In-session memory only |
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) |
124
130
  | Audit | Local `plugin:agent-enhancer/request` (no telemetry upload) |
125
131
  | Coexistence | Hints only — never auto-disables third-party plugins |
126
132
 
@@ -167,10 +173,11 @@ corepack pnpm check # typecheck + test + build + pack verify
167
173
 
168
174
  | Path | Contents |
169
175
  | --- | --- |
170
- | `src/host/` | Model calls, RPC, checkpoint rollback |
171
- | `src/client/` | Conversation input UI and state machines |
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 |
172
178
  | `tests/` | Vitest |
173
179
  | `lib/` | Build output |
180
+ | `docs/images/` | README screenshots |
174
181
 
175
182
  ---
176
183
 
package/README.md CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  **English:** [README.en.md](./README.en.md)
4
4
 
5
- > 一个插件,让 DeepSeek Harness Desktop **更好写、更好改、更好回退**,并持续向主流 Agent 体验对齐。
6
- > 历史回顾 · 一键优化 · 下一条预测 · 对话与文件恢复 —— 嵌在官方会话输入区,不用另开窗口。
5
+ > 一个插件,让 DeepSeek Harness Desktop **更好写、更好改、更好回退、更看得见用量与上下文**,并持续向主流 Agent 体验对齐。
6
+ > 历史回顾 · 一键优化 · 下一条预测 · 对话与文件恢复 · 模型账单 · 上下文明细 · Auto 路由 · 分账号余额 —— 嵌在官方会话与设置里,不用另开窗口。
7
7
 
8
8
  [![npm](https://img.shields.io/npm/v/dsh-agent-enhancer.svg)](https://www.npmjs.com/package/dsh-agent-enhancer)
9
9
  [![DSH](https://img.shields.io/badge/DSH-%3E%3D0.2.1--rc.5%20%3C0.3.0-blue)](https://www.npmjs.com/package/dsh-agent-enhancer)
@@ -14,51 +14,55 @@
14
14
 
15
15
  ## 30 秒看懂
16
16
 
17
- | 你想… | 怎么做 |
18
- | --- | --- |
19
- | 找回刚发过的提示词 | 草稿首行 `↑` / 末行 `↓`,或 `Alt+R` 搜索 |
20
- | 把糊草稿写清楚 | 输入框右侧点 **优化**,不满意再 **撤销** |
21
- | 顺着上一轮继续问 | 回复结束后按 `Tab` 采纳灰字建议 |
22
- | 回到某一轮之前 | 点 **恢复到这里**,在预览里确认范围 |
23
- | 省一点模型费用 | 设置里给优化 / 预测单独选更便宜的模型 |
24
- | 关掉某个能力 | **设置 → 内置插件 → 智能体增强** |
17
+ | 类别 | 你想… | 怎么做 |
18
+ | --- | --- | --- |
19
+ | **写提示** | 找回 / 改清楚 / 接着问 | `↑↓` 或 `Alt+R`;右侧 **优化**;回复后 `Tab` 采纳灰字 |
20
+ | **回退** | 回到某一轮之前 | **恢复到这里** → 预览确认;需要时用 **+** / `/` **撤销恢复** |
21
+ | **用量与成本** | 看 token 花多少、账号还剩多少 | **Token 用量** → **模型账单**;**设置 → 模型** 看分账号余额;辅助模型可单独选更便宜档或 Auto |
22
+ | **上下文** | 看窗口占了多少 | 占用环 → 右侧栏明细;可 **压缩上下文** |
23
+ | **模型路由** | 让会话自己选强弱档 | 模型列表选 **Auto**;设置里映射 Instant / Thinking / Pro |
24
+ | **总开关** | 关掉某个能力 | **设置 → 内置插件 → 智能体增强** |
25
25
 
26
- 默认四项均开启。界面语言跟随 Desktop(`zh` / `en`)。
26
+ 默认核心能力开启。界面语言跟随 Desktop(`zh` / `en`)。
27
27
 
28
28
  ---
29
29
 
30
30
  ## 功能对照
31
31
 
32
- | 功能 | 怎么用 | 要点 |
33
- | --- | --- | --- |
34
- | **历史提示词** | 首行 `↑`、末行 `↓`;`Esc` 退出;`Alt+R` 搜索(兼容 `Ctrl+R`) | 只覆盖当前已加载会话;`Enter` 只填草稿不发送;含 chip 的草稿不误触发 |
35
- | **提示词优化** | 点右侧优化;有选区只改选区;可撤销 | 模糊稿补全执行信息,明确稿少改;保留引用 / chip;可单独选模型 |
36
- | **下一条预测** | 回复结束后看灰字,`Tab` 采纳 | 每轮最多一条;输入或切会话会清除 |
37
- | **对话与文件恢复** | 消息旁点 **恢复到这里**;恢复后点输入框 **+** 或键入 `/`,选 **撤销恢复**(仅有可撤销 tip 时出现) | 可选仅对话,或对话 + 已跟踪文件;不恢复进程 / 终端 / 未跟踪文件等 |
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 或指定模型 |
38
41
 
39
42
  ### 设置
40
43
 
41
44
  路径:**设置 → 内置插件 → 智能体增强**
42
45
 
43
- | 开关 | 配置键 | 默认 | 作用 |
46
+ | 类别 | 开关 / 配置 | 默认 | 作用 |
44
47
  | --- | --- | --- | --- |
45
- | 历史提示词 | `historyEnabled` | 开 | `↑↓` 与 `Alt+R` |
46
- | 提示词优化 | `optimizeEnabled` | 开 | 优化 / 撤销;旁有模型药丸 |
47
- | 下一条提示词预测 | `predictEnabled` | 开 | 灰字建议;旁有模型药丸 |
48
- | 对话与文件恢复 | `rollbackEnabled` | 开 | 「恢复到这里」;`+` / `/` 菜单「撤销恢复」 |
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
- | 历史搜索 | `Alt+R` 浮层与结果列表 | ![历史搜索](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/prompt-history.png) |
57
- | 优化与预测 | 右侧优化入口 + 回复后的灰字建议 | ![优化与预测](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/optimize-and-predict.png) |
58
- | 回滚入口 | 消息旁恢复图标,悬停「恢复到这里」 | ![回滚入口](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/rollback-entry.png) |
59
- | 回滚预览 | 将撤回的对话;可选仅对话或含已跟踪文件 | ![回滚预览](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/rollback-preview.png) |
60
- | 撤销恢复 | 恢复后打开输入框 **+** 或 `/`,选「撤销恢复」 | ![撤销恢复](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/undo-restore.png) |
61
- | 设置 · 智能体增强 | 四个开关、模型药丸、隐私说明 | ![设置](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/settings.png) |
60
+ | **写提示** | 历史搜索;优化入口与灰字预测 | ![历史搜索](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/prompt-history.png) ![优化与预测](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/optimize-and-predict.png) |
61
+ | **回退** | 恢复入口 → 预览范围 → 撤销恢复 | ![回滚入口](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/rollback-entry.png) ![回滚预览](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/rollback-preview.png) ![撤销恢复](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/undo-restore.png) |
62
+ | **用量与成本** | Token 用量入口、模型账单、分账号余额 | ![Token 用量](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/token-usage-meter.png) ![模型账单](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/model-bill.png) ![分账号余额](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/provider-balance.png) |
63
+ | **上下文** | 占用摘要与右侧栏明细 / 压缩 | ![上下文占用](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/context-meter.png) ![上下文明细](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/context-details.png) |
64
+ | **模型路由** | 模型列表 Auto;档位映射与可选分类器 | ![Auto 选择](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/auto-model-picker.png) ![Auto 路由](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/auto-routing-settings.png) |
65
+ | **设置** | 智能体增强总开关与模型药丸 | ![设置](https://raw.githubusercontent.com/rebornace/dsh-agent-enhancer/main/docs/images/settings.png) |
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.2.0
98
+ dsh plugin --profile desktop add dsh-agent-enhancer@0.3.0
95
99
  ```
96
100
 
97
101
  也可不钉版本:`dsh plugin --profile desktop add dsh-agent-enhancer`。
@@ -120,7 +124,9 @@ dsh plugin --profile desktop add ((Resolve-Path .).Path)
120
124
  | 历史 | 不请求模型 |
121
125
  | 优化 | 发送原稿或选区 + 最近一轮已完成对话 |
122
126
  | 预测 | 发送最近一轮已完成对话 |
123
- | 缓存 | 仅当前会话内存 |
127
+ | Auto 分类器 | 仅开关打开时调用;失败回退本地启发式,不阻塞主请求 |
128
+ | 账单 / 上下文 | 本地汇总与启发式估算;余额查询使用 Desktop 已存凭据,插件不携带密钥 |
129
+ | 缓存 | 仅当前会话内存(账单落盘在本机 usage 目录) |
124
130
  | 审计 | 本地 `plugin:agent-enhancer/request`(无遥测上传) |
125
131
  | 共存 | 只提示,不自动关闭第三方 |
126
132
 
@@ -167,10 +173,11 @@ corepack pnpm check # typecheck + test + build + 打包校验
167
173
 
168
174
  | 路径 | 内容 |
169
175
  | --- | --- |
170
- | `src/host/` | 模型调用、RPC、检查点回滚 |
171
- | `src/client/` | 会话输入区 UI 与状态机 |
176
+ | `src/host/` | 模型调用、RPC、检查点回滚、账单、Auto 路由、余额 |
177
+ | `src/client/` | 会话输入区、右侧栏账单 / 上下文、设置与模型页余额 |
172
178
  | `tests/` | Vitest |
173
179
  | `lib/` | 构建产物 |
180
+ | `docs/images/` | README 截图 |
174
181
 
175
182
  ---
176
183
 
@@ -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,3 @@
1
+ export declare function formatTokens(value: number): string;
2
+ export declare function sharePercent(tokens: number, total: number): number;
3
+ //# sourceMappingURL=format.d.ts.map
@@ -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"}
@@ -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,kDA+B/D"}
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"}
@@ -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,CA6C7E"}
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"}
@@ -0,0 +1,21 @@
1
+ import type { AuxiliaryModelSettings } from '../../config.ts';
2
+ export interface ModelCatalogModelLike {
3
+ readonly id: string;
4
+ readonly name: string;
5
+ readonly reasoning?: {
6
+ readonly efforts: readonly {
7
+ readonly id: string;
8
+ readonly name: string;
9
+ }[];
10
+ };
11
+ }
12
+ export interface ModelProviderGroupLike {
13
+ readonly id: string;
14
+ readonly models: readonly ModelCatalogModelLike[];
15
+ }
16
+ export declare function isUnconfiguredAutoTierMapping(selection: AuxiliaryModelSettings): boolean;
17
+ export declare function pillLabel(selection: AuxiliaryModelSettings, groups: readonly ModelProviderGroupLike[], followLabel: string, autoLabel: string, unconfiguredLabel?: string): string;
18
+ export declare function selectedPillMenuId(selection: AuxiliaryModelSettings, groups: readonly ModelProviderGroupLike[], options?: {
19
+ readonly tierMapping?: boolean;
20
+ }): string;
21
+ //# sourceMappingURL=model-pill-label.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model-pill-label.d.ts","sourceRoot":"","sources":["../../../src/client/dsh/model-pill-label.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAS7D,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,SAAS,CAAC,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,SAAS;YAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;SAAE,EAAE,CAAA;KAAE,CAAA;CACrG;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,MAAM,EAAE,SAAS,qBAAqB,EAAE,CAAA;CAClD;AAUD,wBAAgB,6BAA6B,CAAC,SAAS,EAAE,sBAAsB,GAAG,OAAO,CAExF;AAED,wBAAgB,SAAS,CACvB,SAAS,EAAE,sBAAsB,EACjC,MAAM,EAAE,SAAS,sBAAsB,EAAE,EACzC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,iBAAiB,CAAC,EAAE,MAAM,GACzB,MAAM,CAWR;AAED,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,sBAAsB,EACjC,MAAM,EAAE,SAAS,sBAAsB,EAAE,EACzC,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,GAC3C,MAAM,CAWR"}
@@ -0,0 +1,9 @@
1
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
2
+ import type { ProviderBalanceSnapshot, ProviderBalanceSource } from '../../host/usage/types.ts';
3
+ export interface ProviderBalanceChipProps {
4
+ readonly source: ProviderBalanceSource;
5
+ readonly t: TranslateNS<'agent-enhancer'>;
6
+ readonly load: (force?: boolean) => Promise<ProviderBalanceSnapshot>;
7
+ }
8
+ export declare function ProviderBalanceChip(props: ProviderBalanceChipProps): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=provider-balance-chip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-balance-chip.d.ts","sourceRoot":"","sources":["../../../src/client/dsh/provider-balance-chip.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AACnE,OAAO,KAAK,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AAG/F,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAA;IACtC,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAA;IACzC,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAA;CACrE;AAOD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,2CA2ElE"}
@@ -2,11 +2,14 @@ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
2
2
  import type { ConfigForm } from '@deepseek-ai/dsh-client-ui-settings/client';
3
3
  import type { ModelCatalog } from '@deepseek-ai/dsh-api-session-controller/types';
4
4
  import type { EnhancerSettings } from '../../config.ts';
5
+ import type { ApplyUpdateResult, UpdateCheckResult } from '../../host/update/types.ts';
5
6
  type SettingsForm = Pick<ConfigForm<EnhancerSettings>, 'getSnapshot' | 'subscribe' | 'set'>;
6
7
  export interface PluginSettingsProps {
7
8
  readonly form: SettingsForm;
8
9
  readonly t: TranslateNS<'agent-enhancer'>;
9
10
  readonly loadCatalog?: () => Promise<ModelCatalog>;
11
+ readonly checkUpdate?: () => Promise<UpdateCheckResult>;
12
+ readonly applyUpdate?: () => Promise<ApplyUpdateResult>;
10
13
  }
11
14
  export declare function PluginSettings(props: PluginSettingsProps): import("react/jsx-runtime").JSX.Element;
12
15
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/client/dsh/settings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAA;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAyC,MAAM,+CAA+C,CAAA;AAWxH,OAAO,KAAK,EAA4C,gBAAgB,EAAc,MAAM,iBAAiB,CAAA;AAS7G,KAAK,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,aAAa,GAAG,WAAW,GAAG,KAAK,CAAC,CAAA;AAE3F,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;IAC3B,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAA;IACzC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,CAAA;CACnD;AAqUD,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CAUxD"}
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/client/dsh/settings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAA;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAsB,MAAM,+CAA+C,CAAA;AAYrG,OAAO,KAAK,EAA4C,gBAAgB,EAAc,MAAM,iBAAiB,CAAA;AAC7G,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAwEtF,KAAK,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,aAAa,GAAG,WAAW,GAAG,KAAK,CAAC,CAAA;AAQ3F,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;IAC3B,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAA;IACzC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,CAAA;IAClD,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC,iBAAiB,CAAC,CAAA;IACvD,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC,iBAAiB,CAAC,CAAA;CACxD;AAsvBD,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CAUxD"}
@@ -0,0 +1,28 @@
1
+ import type { UsageHeatmap } from '../../host/usage/types.ts';
2
+ export interface UsageChartSlice {
3
+ readonly id: string;
4
+ readonly label: string;
5
+ readonly tokens: number;
6
+ readonly color: string;
7
+ }
8
+ /** Day/hour intensity grid — signature chart for the bill panel. */
9
+ export declare function UsageHeatmapChart(props: {
10
+ readonly title: string;
11
+ readonly hint: string;
12
+ readonly heatmap: UsageHeatmap;
13
+ readonly emptyLabel: string;
14
+ readonly callsLabel: (count: number) => string;
15
+ }): import("react/jsx-runtime").JSX.Element;
16
+ /** Stacked feature share — readable when one or many features fire. */
17
+ export declare function UsageShareBar(props: {
18
+ readonly title: string;
19
+ readonly slices: readonly UsageChartSlice[];
20
+ readonly emptyLabel: string;
21
+ }): import("react/jsx-runtime").JSX.Element;
22
+ /** Ranked model bars. */
23
+ export declare function UsageRankChart(props: {
24
+ readonly title: string;
25
+ readonly slices: readonly UsageChartSlice[];
26
+ readonly emptyLabel: string;
27
+ }): import("react/jsx-runtime").JSX.Element;
28
+ //# sourceMappingURL=usage-chart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage-chart.d.ts","sourceRoot":"","sources":["../../../src/client/dsh/usage-chart.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAK7D,MAAM,WAAW,eAAe;IAC9B,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;AAWD,oEAAoE;AACpE,wBAAgB,iBAAiB,CAAC,KAAK,EAAE;IACvC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAA;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;CAC/C,2CAyEA;AAED,uEAAuE;AACvE,wBAAgB,aAAa,CAAC,KAAK,EAAE;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,SAAS,eAAe,EAAE,CAAA;IAC3C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B,2CAmDA;AAED,yBAAyB;AACzB,wBAAgB,cAAc,CAAC,KAAK,EAAE;IACpC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,SAAS,eAAe,EAAE,CAAA;IAC3C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B,2CAoCA"}
@@ -0,0 +1,8 @@
1
+ import type { TranslateNS, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
2
+ export interface UsageMeterDockProps extends PropsRuntime<'conversation.composer.dock'> {
3
+ readonly open: () => void;
4
+ readonly t: TranslateNS<'agent-enhancer'>;
5
+ }
6
+ /** Invisible dock resident: adds a bill jump to the official Token Usage dialog. */
7
+ export declare function UsageMeterDock(props: UsageMeterDockProps): null;
8
+ //# sourceMappingURL=usage-dock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage-dock.d.ts","sourceRoot":"","sources":["../../../src/client/dsh/usage-dock.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAGjF,MAAM,WAAW,mBAAoB,SAAQ,YAAY,CAAC,4BAA4B,CAAC;IACrF,QAAQ,CAAC,IAAI,EAAE,MAAM,IAAI,CAAA;IACzB,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAA;CAC1C;AAED,oFAAoF;AACpF,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,QAMxD"}
@@ -0,0 +1,5 @@
1
+ export declare function formatTokenCount(value: number): string;
2
+ /** Format a CNY estimate with up to 4 decimals, trimming trailing zeros. */
3
+ export declare function formatCnyAmount(value: number): string;
4
+ export declare function formatUsageWhen(at: number): string;
5
+ //# sourceMappingURL=usage-format.d.ts.map