@laoyuehanni/dsh-token-usage 0.4.9 → 0.4.11

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 (175) hide show
  1. package/README.md +12 -5
  2. package/README.zh.md +12 -5
  3. package/lib/aux-request.d.ts +10 -5
  4. package/lib/aux-request.d.ts.map +1 -1
  5. package/lib/aux-request.js +13 -9
  6. package/lib/aux-request.js.map +1 -1
  7. package/lib/client/DashboardCards.d.ts +62 -0
  8. package/lib/client/DashboardCards.d.ts.map +1 -0
  9. package/lib/client/DashboardCards.js +25 -0
  10. package/lib/client/DashboardCards.js.map +1 -0
  11. package/lib/client/OverheadRows.d.ts +30 -0
  12. package/lib/client/OverheadRows.d.ts.map +1 -0
  13. package/lib/client/OverheadRows.js +57 -0
  14. package/lib/client/OverheadRows.js.map +1 -0
  15. package/lib/client/OverviewBoard.d.ts +54 -0
  16. package/lib/client/OverviewBoard.d.ts.map +1 -0
  17. package/lib/client/OverviewBoard.js +35 -0
  18. package/lib/client/OverviewBoard.js.map +1 -0
  19. package/lib/client/PanellistMoreEntry.d.ts +29 -0
  20. package/lib/client/PanellistMoreEntry.d.ts.map +1 -0
  21. package/lib/client/PanellistMoreEntry.js +12 -0
  22. package/lib/client/PanellistMoreEntry.js.map +1 -0
  23. package/lib/client/PanellistPinEntry.d.ts +21 -0
  24. package/lib/client/PanellistPinEntry.d.ts.map +1 -0
  25. package/lib/client/PanellistPinEntry.js +24 -0
  26. package/lib/client/PanellistPinEntry.js.map +1 -0
  27. package/lib/client/QuotaButton.d.ts +1 -0
  28. package/lib/client/QuotaButton.d.ts.map +1 -1
  29. package/lib/client/QuotaButton.js +69 -17
  30. package/lib/client/QuotaButton.js.map +1 -1
  31. package/lib/client/RequestPool.d.ts +41 -0
  32. package/lib/client/RequestPool.d.ts.map +1 -0
  33. package/lib/client/RequestPool.js +176 -0
  34. package/lib/client/RequestPool.js.map +1 -0
  35. package/lib/client/StatCard.d.ts +58 -5
  36. package/lib/client/StatCard.d.ts.map +1 -1
  37. package/lib/client/StatCard.js +27 -8
  38. package/lib/client/StatCard.js.map +1 -1
  39. package/lib/client/TokenActivity.d.ts +21 -0
  40. package/lib/client/TokenActivity.d.ts.map +1 -0
  41. package/lib/client/TokenActivity.js +71 -0
  42. package/lib/client/TokenActivity.js.map +1 -0
  43. package/lib/client/TokenUsageCard.d.ts.map +1 -1
  44. package/lib/client/TokenUsageCard.js +1 -1
  45. package/lib/client/TokenUsageCard.js.map +1 -1
  46. package/lib/client/TokenUsageSection.d.ts +13 -34
  47. package/lib/client/TokenUsageSection.d.ts.map +1 -1
  48. package/lib/client/TokenUsageSection.js +81 -93
  49. package/lib/client/TokenUsageSection.js.map +1 -1
  50. package/lib/client/TrendChart.d.ts +2 -1
  51. package/lib/client/TrendChart.d.ts.map +1 -1
  52. package/lib/client/TrendChart.js +31 -10
  53. package/lib/client/TrendChart.js.map +1 -1
  54. package/lib/client/UsageChart.d.ts +20 -0
  55. package/lib/client/UsageChart.d.ts.map +1 -0
  56. package/lib/client/UsageChart.js +26 -0
  57. package/lib/client/UsageChart.js.map +1 -0
  58. package/lib/client/UsagePanelPage.d.ts +37 -0
  59. package/lib/client/UsagePanelPage.d.ts.map +1 -0
  60. package/lib/client/UsagePanelPage.js +16 -0
  61. package/lib/client/UsagePanelPage.js.map +1 -0
  62. package/lib/client/UsageRows.d.ts +102 -0
  63. package/lib/client/UsageRows.d.ts.map +1 -0
  64. package/lib/client/UsageRows.js +261 -0
  65. package/lib/client/UsageRows.js.map +1 -0
  66. package/lib/client/UsageView.d.ts.map +1 -1
  67. package/lib/client/UsageView.js +79 -5
  68. package/lib/client/UsageView.js.map +1 -1
  69. package/lib/client/activity-grid.d.ts +42 -0
  70. package/lib/client/activity-grid.d.ts.map +1 -0
  71. package/lib/client/activity-grid.js +86 -0
  72. package/lib/client/activity-grid.js.map +1 -0
  73. package/lib/client/async-resource.d.ts +8 -0
  74. package/lib/client/async-resource.d.ts.map +1 -1
  75. package/lib/client/async-resource.js +22 -4
  76. package/lib/client/async-resource.js.map +1 -1
  77. package/lib/client/card-form.d.ts +15 -0
  78. package/lib/client/card-form.d.ts.map +1 -1
  79. package/lib/client/card-form.js +27 -5
  80. package/lib/client/card-form.js.map +1 -1
  81. package/lib/client/cost-split.d.ts +26 -0
  82. package/lib/client/cost-split.d.ts.map +1 -0
  83. package/lib/client/cost-split.js +37 -0
  84. package/lib/client/cost-split.js.map +1 -0
  85. package/lib/client/format.d.ts +31 -1
  86. package/lib/client/format.d.ts.map +1 -1
  87. package/lib/client/format.js +48 -0
  88. package/lib/client/format.js.map +1 -1
  89. package/lib/client/index.d.ts.map +1 -1
  90. package/lib/client/index.js +102 -0
  91. package/lib/client/index.js.map +1 -1
  92. package/lib/client/locales.d.ts +100 -1
  93. package/lib/client/locales.d.ts.map +1 -1
  94. package/lib/client/locales.js +200 -2
  95. package/lib/client/locales.js.map +1 -1
  96. package/lib/client/project-rows.d.ts +4 -0
  97. package/lib/client/project-rows.d.ts.map +1 -0
  98. package/lib/client/project-rows.js +3 -0
  99. package/lib/client/project-rows.js.map +1 -0
  100. package/lib/client/quota-format.d.ts +6 -4
  101. package/lib/client/quota-format.d.ts.map +1 -1
  102. package/lib/client/quota-format.js +7 -5
  103. package/lib/client/quota-format.js.map +1 -1
  104. package/lib/client.js +3108 -1521
  105. package/lib/client.js.map +1 -1
  106. package/lib/index.d.ts +6 -0
  107. package/lib/index.d.ts.map +1 -1
  108. package/lib/index.js +60 -10
  109. package/lib/index.js.map +1 -1
  110. package/lib/project-rows.d.ts +22 -0
  111. package/lib/project-rows.d.ts.map +1 -0
  112. package/lib/project-rows.js +82 -0
  113. package/lib/project-rows.js.map +1 -0
  114. package/lib/quota/adapters/kimi.d.ts +8 -6
  115. package/lib/quota/adapters/kimi.d.ts.map +1 -1
  116. package/lib/quota/adapters/kimi.js +64 -18
  117. package/lib/quota/adapters/kimi.js.map +1 -1
  118. package/lib/quota/adapters/magpie.d.ts +84 -0
  119. package/lib/quota/adapters/magpie.d.ts.map +1 -0
  120. package/lib/quota/adapters/magpie.js +290 -0
  121. package/lib/quota/adapters/magpie.js.map +1 -0
  122. package/lib/quota/provider-tracking.d.ts +15 -4
  123. package/lib/quota/provider-tracking.d.ts.map +1 -1
  124. package/lib/quota/provider-tracking.js +18 -7
  125. package/lib/quota/provider-tracking.js.map +1 -1
  126. package/lib/quota/quota-route.d.ts +3 -3
  127. package/lib/quota/quota-route.d.ts.map +1 -1
  128. package/lib/quota/quota-route.js +3 -3
  129. package/lib/quota/quota-route.js.map +1 -1
  130. package/lib/quota/quota-service.d.ts +14 -4
  131. package/lib/quota/quota-service.d.ts.map +1 -1
  132. package/lib/quota/quota-service.js +45 -15
  133. package/lib/quota/quota-service.js.map +1 -1
  134. package/lib/quota/registry.d.ts.map +1 -1
  135. package/lib/quota/registry.js +6 -0
  136. package/lib/quota/registry.js.map +1 -1
  137. package/lib/quota/types.d.ts +9 -0
  138. package/lib/quota/types.d.ts.map +1 -1
  139. package/lib/quota/types.js.map +1 -1
  140. package/lib/request-details.d.ts +106 -0
  141. package/lib/request-details.d.ts.map +1 -0
  142. package/lib/request-details.js +227 -0
  143. package/lib/request-details.js.map +1 -0
  144. package/lib/request-observe.d.ts +181 -0
  145. package/lib/request-observe.d.ts.map +1 -0
  146. package/lib/request-observe.js +495 -0
  147. package/lib/request-observe.js.map +1 -0
  148. package/lib/rollup.d.ts +18 -0
  149. package/lib/rollup.d.ts.map +1 -1
  150. package/lib/rollup.js +12 -0
  151. package/lib/rollup.js.map +1 -1
  152. package/lib/session-request-details.d.ts +50 -0
  153. package/lib/session-request-details.d.ts.map +1 -0
  154. package/lib/session-request-details.js +325 -0
  155. package/lib/session-request-details.js.map +1 -0
  156. package/lib/stats-route.d.ts +9 -1
  157. package/lib/stats-route.d.ts.map +1 -1
  158. package/lib/stats-route.js +34 -3
  159. package/lib/stats-route.js.map +1 -1
  160. package/lib/stats.d.ts +7 -0
  161. package/lib/stats.d.ts.map +1 -1
  162. package/lib/stats.js +87 -9
  163. package/lib/stats.js.map +1 -1
  164. package/lib/sync.d.ts.map +1 -1
  165. package/lib/sync.js +1 -0
  166. package/lib/sync.js.map +1 -1
  167. package/lib/usage-record.d.ts +35 -5
  168. package/lib/usage-record.d.ts.map +1 -1
  169. package/lib/usage-record.js +33 -0
  170. package/lib/usage-record.js.map +1 -1
  171. package/lib/wire.d.ts +182 -9
  172. package/lib/wire.d.ts.map +1 -1
  173. package/lib/wire.js +8 -0
  174. package/lib/wire.js.map +1 -1
  175. package/package.json +30 -26
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  [简体中文](./README.zh.md) | English
8
8
 
9
- A dsh usage plugin that displays model token usage right in the Web UI. After installation, open **Settings** (the gear icon in the sidebar) and you'll find the **Token Usage** page — summary cards (with cost), a daily total-token line chart, a per-model / per-session breakdown, and per-model pricing dialogs, all filterable by date range and model, exactly as shown in the screenshot above.
9
+ A dsh usage plugin that displays model token usage right in the Web UI. After installation, open **Settings** (the gear icon in the sidebar) and you'll find the **Token Usage** page — overview cards (with cost), a trend chart, project / model / session / runtime-overhead detail views, and per-model pricing dialogs. On dsh `0.2.1-rc.3` or newer, the sidebar's **More** menu also opens the same statistics in a full-width main-column dashboard. Both surfaces share date-range and model filters; a single-day range uses an hourly trend and wider ranges use daily points.
10
10
 
11
11
  [dsh]: https://github.com/cordiverse/dsh
12
12
 
@@ -23,13 +23,15 @@ Repo: <https://github.com/LaoYueHanNi/dsh-token-usage>
23
23
 
24
24
  ## Features
25
25
 
26
- - **Live recording**: every provider-billed model call is recorded as it happens — tokens, cost, model, session — conversation requests, context-compaction calls, and auxiliary system calls included: the Auto review authorization reviewer, session-title generation, and reasoning translation. Auxiliary calls bill into the totals and the per-model table, while the **Runtime overhead** tab in the detail switch splits them out by kind; they carry no session, so the per-session table stays conversation-only. That history cannot be backfilled — the host keeps no usage record of those calls, and recording starts with the first request after upgrading.
27
- - **Web stats page**: filters (date range + model + `1d`/`7d`/`30d` shortcuts), summary cards, daily trend chart (hover a day for its total), per-model table. The table block toggles between **per-model / per-session / runtime overhead**: the session table groups by working directory (switchable to a flat list), sorts by total tokens / cost / recent activity on header click, and **Ctrl+click** on a session row jumps straight to that session's usage tab; the runtime-overhead tab breaks the auxiliary calls down by kind.
26
+ - **Live recording**: every provider-billed model call is recorded as it happens — tokens, cost, model, session — conversation requests, context-compaction calls, and auxiliary system calls included: the Auto review authorization reviewer, session-title generation, and reasoning translation. Auxiliary calls bill into the totals and the model breakdown, while the **Runtime overhead** tab in the detail switch splits them out by kind; they carry no session, so the session breakdown stays conversation-only. That history cannot be backfilled — the host keeps no usage record of those calls, and recording starts with the first request after upgrading.
27
+ - **Web stats page**: filters (date range + model + `1d`/`7d`/`30d` shortcuts), eight compact summary cards in two rows in Settings, and a trend chart (hourly for one day, daily for wider ranges; hover a point for its total). The detail block switches between **projects / models / sessions / runtime overhead**. Project rows aggregate every matching root session before the session list is capped; directory-tail grouping intentionally merges folders with the same final segment. Rows sort by total tokens or cost (sessions also by last activity), and **Ctrl+click** on a listed session row opens that conversation (the host restores its last-selected view tab). The runtime-overhead view breaks auxiliary calls down by kind.
28
+ - **Main-column dashboard**: on dsh `0.2.1-rc.3` or newer, the sidebar's **More → Token Usage** entry opens the same filters and metrics in a four-card dashboard (projects / sessions, models / runtime overhead). The cards collapse to one column when the available content width is narrow; **Pin to sidebar** in the settings card moves the entry out of the More menu into a resident sidebar row (switch it off to move it back) — the two never coexist. Older hosts keep the settings-page entry.
29
+ - **Model performance view**: the model list can switch from usage to mean output speed, time to first token, and request latency. Untimed requests do not enter performance evaluation; speed and first-token means use streaming samples, and models with fewer than five streaming samples are marked rather than ranked. Historical timing is backfilled automatically when the rollup format changes.
28
30
  - **Session usage tab**: the conversation pane gains a **Usage** view tab (beside Chat / Trajectory) with the active session's dashboard — six stat cards (successful requests with a failure pill, cost, cache hit rate, average time-to-first-token, generation throughput, total tokens), a 4-bucket token strip, an hourly trend chart, and a per-model table. A scope switch toggles **Session / With subagents**, and the subagent table drills into each child and back. Hovering the failure pill breaks failures down per class (rate limited, server error, context exceeded, …).
29
31
 
30
32
  ![Session Usage tab](docs/images/usage-tab.png)
31
33
 
32
- - **Cost figures & model pricing**: per-request cost is computed live from per-model rates (¥ per million tokens); unpriced models warn and count as ¥0. Every priced model's name carries a **rates button** opening its full price table, and the filter row carries a **pricing table** entry opening an overview of every model in the cloud feed — searchable, with simulated billing and expandable effective rates. Rates sync from the cloud feed on every startup — see [Model pricing](#model-pricing).
34
+ - **Cost figures & model pricing**: per-request cost is computed live from per-model rates (¥ per million tokens); unpriced models warn and count as ¥0. Click a priced model name in the dashboard to open its full price table; holding Ctrl while clicking a priced model filters the view to that model. The filter row carries a **pricing table** entry opening an overview of every model in the cloud feed — searchable, with simulated billing and expandable effective rates. Rates sync from the cloud feed on every startup — see [Model pricing](#model-pricing).
33
35
  - **Provider quota**: an input-bar button (left of the model chip) shows the selected provider's remaining quota. See [Provider quota](#provider-quota).
34
36
  - **History backfill**: the first startup syncs requests that happened before installation (idempotent); unreadable session logs are skipped and counted, never fatal to the sync.
35
37
 
@@ -70,16 +72,21 @@ The input-bar button follows the currently selected provider and opens a panel w
70
72
  | Provider | Shows |
71
73
  |---|---|
72
74
  | Zhipu GLM Coding Plan (CN / international) | 5-hour, weekly (some plans also monthly) |
73
- | Kimi For Coding | 5-hour, weekly |
75
+ | Kimi For Coding | 5-hour, monthly (legacy responses: weekly) |
74
76
  | MiniMax Coding Plan (CN / international) | 5-hour, weekly |
75
77
  | OpenCode Go | 5-hour, weekly, monthly |
76
78
  | Command Code | 5-hour, weekly, monthly |
77
79
  | DeepSeek (official API key) | ¥ account balance |
78
80
  | DeepSeek account | topped-up balance, granted balance |
79
81
  | OpenRouter | $ remaining credits |
82
+ | Magpie gateway | every upstream account's quota cards, scoped to the selected model's provider (routing groups show the whole fleet) |
80
83
 
81
84
  Unsupported providers hide the button; a failed query can be retried from the panel. On by default; turn it off with `quota.enabled: false`. Not supported yet: Volcengine, ZenMux, Zhipu Team plan, Claude / Codex / Gemini / Grok official subscriptions, GitHub Copilot.
82
85
 
86
+ A magpie route needs no setup: declare any OpenAI-compatible provider whose base URL points at the gateway (`http://127.0.0.1:3425/v1` by default) — the plugin probes the gateway's hello and reads its aggregated quota report. The gateway key goes in the provider's API key when the gateway is shared from another machine; a loopback gateway needs none.
87
+
88
+ Magpie cards follow the selected model immediately, before sending a request. Reads always use `?kept=1`: polling, opening the panel and retrying only read Magpie's own cache, never trigger upstream quota refreshes. Refresh quotas in Magpie when newer readings are needed; an empty cache does not fall back to a live vendor query.
89
+
83
90
  ## Install
84
91
 
85
92
  ```sh
package/README.zh.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  简体中文 | [English](./README.md)
8
8
 
9
- 一个 [dsh] 用量插件:在 Web 界面直接展示模型 token 用量。安装后打开**设置**(侧栏底部齿轮),即可看到「Token 用量」页 —— 汇总卡片(含费用)、按日总 token 折线图、按模型 / 按会话明细表与定价弹窗,支持按日期区间和模型筛选,效果见上图。
9
+ 一个 [dsh] 用量插件:在 Web 界面直接展示模型 token 用量。安装后打开**设置**(侧栏底部齿轮),即可看到「Token 用量」页 —— 汇总卡片(含费用)、趋势图、按项目 / 按模型 / 按会话 / 运行开销明细与定价弹窗。dsh `0.2.1-rc.3` 及以上版本还可从侧栏「**更多**」菜单在主列打开同一统计页。两处共用日期区间和模型筛选;单日区间显示按小时趋势,更宽区间显示按日趋势。
10
10
 
11
11
  [dsh]: https://github.com/cordiverse/dsh
12
12
 
@@ -23,13 +23,15 @@
23
23
 
24
24
  ## 功能
25
25
 
26
- - **实时记录**:每一次 provider 计费调用发生即记录——token、费用、模型、会话;主对话请求、上下文压缩调用与系统辅助调用(自动审查、会话标题生成、推理翻译)都计入。辅助调用计入总量和按模型表,同时在明细切换的**运行开销**页签按类别单独拆出;它们不归属任何会话,因此按会话表只统计对话请求。这部分历史无法回补——宿主不保存这些调用的用量记录,升级后的第一个请求才开始记录。
27
- - **Web 统计页**:过滤条(日期区间 + 模型下拉 + `1d`/`7d`/`30d` 快捷区间)、汇总卡片、按日趋势图(悬停查看当日总量)、按模型明细表。明细表可在**按模型 / 按会话 / 运行开销**间切换:按会话表按工作区目录分组(可切为列表视图),总 token / 费用 / 最近活跃列可点击排序,**Ctrl+点击**会话行直达该会话的用量页;运行开销页签按类别列出自动审查、标题生成、推理翻译等辅助调用的次数、费用与 token。
26
+ - **实时记录**:每一次 provider 计费调用发生即记录——token、费用、模型、会话;主对话请求、上下文压缩调用与系统辅助调用(自动审查、会话标题生成、推理翻译)都计入。辅助调用计入总量和按模型明细,同时在明细切换的**运行开销**页签按类别单独拆出;它们不归属任何会话,因此按会话明细只统计对话请求。这部分历史无法回补——宿主不保存这些调用的用量记录,升级后的第一个请求才开始记录。
27
+ - **Web 统计页**:过滤条(日期区间 + 模型下拉 + `1d`/`7d`/`30d` 快捷区间)、设置内固定两行的八张紧凑汇总卡片和趋势图(单日按小时、更宽区间按日,悬停查看点位总量)。明细区可在**按项目 / 按模型 / 按会话 / 运行开销**间切换。项目行在会话列表截断前聚合全部匹配的顶层会话;目录尾段相同的工作区会合并。各行可按总 token 或费用排序(会话另支持最近活跃),**Ctrl+点击**可打开宿主列表中的会话(宿主恢复该会话上次选择的页签);运行开销按类别列出辅助调用的次数、费用与 token。
28
+ - **侧边栏「更多」入口**(dsh ≥ 0.2.1-rc.3):左侧栏「更多」菜单内新增「Token 用量」行,点击在主列直接打开四卡大屏(项目 / 会话、模型 / 运行开销);可用宽度较窄时卡片自动改单列。在设置卡片开启**「常驻侧边栏」**后,入口移出「更多」菜单、改为左侧栏的固定一行(关闭即移回「更多」菜单),两处互斥不重复。更早的宿主没有该入口,设置内统计页照常可用。
29
+ - **模型性能视图**:模型列表可切换为平均输出速度、首 token 延迟和请求耗时。无计时请求不参与性能评价;速度和首 token 均值只取流式样本,少于五个流式样本的模型标记为样本不足、不参与排名。汇总格式变化后自动从历史记录回填已有计时,无需手动清缓存。
28
30
  - **会话用量页签**:对话面板新增「用量」视图页签(与聊天 / 轨迹并列),展示当前会话的 dashboard —— 六张数值卡(成功请求数带失败胶囊、费用、缓存命中率、首 token 平均延迟、出字速度、总 token)+ 四项 token 明细条 + 按小时趋势图 + 按模型表。「本会话 / 含子会话」一键切换范围,子会话表逐行钻取并可逐级返回。悬停失败胶囊可看按失败类别的明细(限流 / 网络异常 / 上下文超限 等逐一计数)。
29
31
 
30
32
  ![会话用量页签](docs/images/usage-tab_zh.png)
31
33
 
32
- - **费用统计与模型定价**:按模型单价(¥/百万 token)逐条实时计费,未定价模型高亮提示(费用按 ¥0 计)。定价模型的名字旁有**「定价」小按钮**,点击弹窗展示该模型的完整价格表;过滤条行尾另有**「定价表」**入口,弹窗内可浏览云端定价的全部模型——搜索、模拟计费、展开当前生效价。价格每次启动自动从云端同步——详见「[模型定价](#模型定价)」。
34
+ - **费用统计与模型定价**:按模型单价(¥/百万 token)逐条实时计费,未定价模型高亮提示(费用按 ¥0 计)。点击看板中有定价的模型名,弹窗展示该模型的完整价格表;按住 Ctrl 点击有定价的模型名可只看该模型;过滤条行尾另有**「定价表」**入口,弹窗内可浏览云端定价的全部模型——搜索、模拟计费、展开当前生效价。价格每次启动自动从云端同步——详见「[模型定价](#模型定价)」。
33
35
  - **供应商配额**:输入栏模型选择器左侧的配额按钮,跟随当前选中的供应商展示套餐余量。详见「[供应商配额](#供应商配额)」。
34
36
  - **历史补齐**:首次启动自动同步安装前已发生的请求(幂等);无法解析的会话日志跳过并计数,绝不中断同步。
35
37
 
@@ -70,16 +72,21 @@ plugins:
70
72
  | 供应商 | 展示 |
71
73
  |---|---|
72
74
  | 智谱 GLM Coding Plan(国内 / 国际) | 5 小时、每周(部分套餐另有每月) |
73
- | Kimi For Coding | 5 小时、每周 |
75
+ | Kimi For Coding | 5 小时、每月(旧接口响应另含每周) |
74
76
  | MiniMax Coding Plan(国内 / 国际) | 5 小时、每周 |
75
77
  | OpenCode Go | 5 小时、每周、每月 |
76
78
  | Command Code | 5 小时、每周、每月 |
77
79
  | DeepSeek(官方 API Key) | ¥ 账户余额 |
78
80
  | DeepSeek 账号 | 充值余额、赠金余额 |
79
81
  | OpenRouter | $ 剩余额度 |
82
+ | Magpie 网关 | 全部上游账号的配额卡,按所选模型限定到对应供应商(路由组展示全部) |
80
83
 
81
84
  不支持的供应商不显示该按钮;查询失败可在面板内重试。默认开启,可用 `quota.enabled: false` 关闭。暂不支持:火山方舟、ZenMux、智谱团队版、Claude / Codex / Gemini / Grok 官方订阅、GitHub Copilot。
82
85
 
86
+ magpie 路由无需任何配置:声明一个 baseURL 指向网关(默认 `http://127.0.0.1:3425/v1`)的 OpenAI 兼容供应商即可——插件会通过网关的 hello 接口自动识别并读取汇总配额。网关在另一台机器上共享时,把网关密钥填进供应商的 API Key;本机网关无需密钥。
87
+
88
+ Magpie 卡片在切换模型后立即跟随,无需先发送请求。查询始终使用 `?kept=1`:轮询、打开面板和重试都只读取 Magpie 自身缓存,不触发上游供应商的配额刷新。需要新读数时请在 Magpie 中刷新;缓存为空时也不会回退到实时供应商查询。
89
+
83
90
  ## 安装
84
91
 
85
92
  ```sh
@@ -3,9 +3,10 @@
3
3
  * and record projection for provider calls that are NOT part of a
4
4
  * conversation turn — the Auto review authorization gate, session-title
5
5
  * generation, and reasoning translation. Those calls are issued through
6
- * `ctx.llm.stream()` by their owning host packages and never produce a
7
- * session event, so the plugin records them on the `llm/stream` waterfall
8
- * every streaming call passes through (see `LlmRuntime.stream`).
6
+ * `ctx.llm.stream()` by their owning host packages and do not produce an
7
+ * `assistant/message` usage event, so the plugin records them on the
8
+ * `llm/stream` waterfall every streaming call passes through
9
+ * (see `LlmRuntime.stream`).
9
10
  *
10
11
  * Classification never relies on host exports that older DSH builds may not
11
12
  * ship: the conversation loop always carries a `sessionId`, compaction and
@@ -46,6 +47,9 @@ export interface AuxRequestRecordInput {
46
47
  requestId: string;
47
48
  /** Stream-start wall time, epoch milliseconds. */
48
49
  time: number;
50
+ /** Owning conversation when the host stamped one (currently title
51
+ * generation; older unowned bypass calls stay empty). */
52
+ sessionId?: string;
49
53
  /** Provider model id the bypass call routed to. */
50
54
  model: string;
51
55
  /** Provider-reported model id of the response body, when the adapter's
@@ -57,8 +61,9 @@ export interface AuxRequestRecordInput {
57
61
  }
58
62
  /**
59
63
  * Build the log row for one settled auxiliary model request. The row carries
60
- * `kind: 'aux'` and an empty `sessionId` — a bypass call has no conversation
61
- * owner, so the per-session dimension must never attribute it to one.
64
+ * `kind: 'aux'`; when the host supplies a session owner, that id is retained
65
+ * so per-session views can include the attributable running overhead. Legacy
66
+ * unowned bypass calls keep an empty `sessionId`.
62
67
  * @param input - kind, identity, timing, route, and usage of the call.
63
68
  * @returns the persistable record (usage omitted when unusable).
64
69
  */
@@ -1 +1 @@
1
- {"version":3,"file":"aux-request.d.ts","sourceRoot":"","sources":["../src/aux-request.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,EAAgB,KAAK,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAEhF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,kBAAkB,CAAA;AAExD;;;GAGG;AACH,eAAO,MAAM,yBAAyB,iCAAiC,CAAA;AAEvE;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,GAAG,SAAS,CAgBhF;AAED,yEAAyE;AACzE,MAAM,WAAW,qBAAqB;IACpC,0CAA0C;IAC1C,OAAO,EAAE,OAAO,CAAA;IAChB,yEAAyE;IACzE,SAAS,EAAE,MAAM,CAAA;IACjB,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAA;IACZ,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAA;IACb;;+DAE2D;IAC3D,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,wEAAwE;IACxE,KAAK,CAAC,EAAE,UAAU,CAAA;CACnB;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,qBAAqB,GAAG,WAAW,CAY9E"}
1
+ {"version":3,"file":"aux-request.d.ts","sourceRoot":"","sources":["../src/aux-request.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,EAAgB,KAAK,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAEhF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,kBAAkB,CAAA;AAExD;;;GAGG;AACH,eAAO,MAAM,yBAAyB,iCAAiC,CAAA;AAEvE;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,GAAG,SAAS,CAkBhF;AAED,yEAAyE;AACzE,MAAM,WAAW,qBAAqB;IACpC,0CAA0C;IAC1C,OAAO,EAAE,OAAO,CAAA;IAChB,yEAAyE;IACzE,SAAS,EAAE,MAAM,CAAA;IACjB,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAA;IACZ;6DACyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAA;IACb;;+DAE2D;IAC3D,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,wEAAwE;IACxE,KAAK,CAAC,EAAE,UAAU,CAAA;CACnB;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,qBAAqB,GAAG,WAAW,CAY9E"}
@@ -3,9 +3,10 @@
3
3
  * and record projection for provider calls that are NOT part of a
4
4
  * conversation turn — the Auto review authorization gate, session-title
5
5
  * generation, and reasoning translation. Those calls are issued through
6
- * `ctx.llm.stream()` by their owning host packages and never produce a
7
- * session event, so the plugin records them on the `llm/stream` waterfall
8
- * every streaming call passes through (see `LlmRuntime.stream`).
6
+ * `ctx.llm.stream()` by their owning host packages and do not produce an
7
+ * `assistant/message` usage event, so the plugin records them on the
8
+ * `llm/stream` waterfall every streaming call passes through
9
+ * (see `LlmRuntime.stream`).
9
10
  *
10
11
  * Classification never relies on host exports that older DSH builds may not
11
12
  * ship: the conversation loop always carries a `sessionId`, compaction and
@@ -43,16 +44,18 @@ export function classifyAuxRequest(options) {
43
44
  // Title generation is a bypass call, but its purpose marker is explicit.
44
45
  if (options.purpose === 'session-title')
45
46
  return 'session-title';
47
+ // Newer Auto-review hosts may stamp the owning session while older hosts
48
+ // still omit it. The fixed policy remains authoritative in either shape.
49
+ const system = options.system;
50
+ if (typeof system === 'string' && system.startsWith(AUTO_REVIEW_PROMPT_PREFIX))
51
+ return 'auto-review';
46
52
  // Every conversation-loop request is marked with the session it serves
47
53
  // (dsh-agent-loop freezes `sessionId` into its request); the loop records
48
54
  // the call through `assistant/message`. A hand-built request without a
49
55
  // session is the bypass shape.
50
56
  if (options.sessionId !== undefined)
51
57
  return undefined;
52
- const system = options.system;
53
58
  if (typeof system === 'string') {
54
- if (system.startsWith(AUTO_REVIEW_PROMPT_PREFIX))
55
- return 'auto-review';
56
59
  if (system.startsWith(TRANSLATION_PROMPT_PREFIX))
57
60
  return 'translation';
58
61
  }
@@ -60,8 +63,9 @@ export function classifyAuxRequest(options) {
60
63
  }
61
64
  /**
62
65
  * Build the log row for one settled auxiliary model request. The row carries
63
- * `kind: 'aux'` and an empty `sessionId` — a bypass call has no conversation
64
- * owner, so the per-session dimension must never attribute it to one.
66
+ * `kind: 'aux'`; when the host supplies a session owner, that id is retained
67
+ * so per-session views can include the attributable running overhead. Legacy
68
+ * unowned bypass calls keep an empty `sessionId`.
65
69
  * @param input - kind, identity, timing, route, and usage of the call.
66
70
  * @returns the persistable record (usage omitted when unusable).
67
71
  */
@@ -70,7 +74,7 @@ export function recordFromAuxRequest(input) {
70
74
  return {
71
75
  requestId: input.requestId,
72
76
  time: input.time,
73
- sessionId: '',
77
+ sessionId: input.sessionId ?? '',
74
78
  model: input.model,
75
79
  ...(input.responseModel !== undefined ? { responseModel: input.responseModel } : {}),
76
80
  ...(usage !== undefined ? { usage } : {}),
@@ -1 +1 @@
1
- {"version":3,"file":"aux-request.js","sourceRoot":"","sources":["../src/aux-request.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,YAAY,EAAkC,MAAM,mBAAmB,CAAA;AAEhF;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,eAAe,CAAA;AAExD;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,8BAA8B,CAAA;AAEvE;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAAwB;IACzD,uEAAuE;IACvE,IAAI,OAAO,CAAC,OAAO,KAAK,YAAY;QAAE,OAAO,SAAS,CAAA;IACtD,yEAAyE;IACzE,IAAI,OAAO,CAAC,OAAO,KAAK,eAAe;QAAE,OAAO,eAAe,CAAA;IAC/D,uEAAuE;IACvE,0EAA0E;IAC1E,uEAAuE;IACvE,+BAA+B;IAC/B,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS;QAAE,OAAO,SAAS,CAAA;IACrD,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAA;IAC7B,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC/B,IAAI,MAAM,CAAC,UAAU,CAAC,yBAAyB,CAAC;YAAE,OAAO,aAAa,CAAA;QACtE,IAAI,MAAM,CAAC,UAAU,CAAC,yBAAyB,CAAC;YAAE,OAAO,aAAa,CAAA;IACxE,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC;AAoBD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAA4B;IAC/D,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IACvC,OAAO;QACL,SAAS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AK,SAAS;QAAE,OAAO,SAAS,CAAA;IACrD,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC/B,IAAI,MAAM,CAAC,UAAU,CAAC,yBAAyB,CAAC;YAAE,OAAO,aAAa,CAAA;IACxE,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC;AAuBD;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAA4B;IAC/D,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IACvC,OAAO;QACL,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI,EAAE;QAChC,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,GAAG,CAAC,KAAK,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,KAAK,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACpF,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzC,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,KAAK,CAAC,OAAO;KACvB,CAAA;AACH,CAAC"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * The main page's dashboard (browser half): the four equal-height cards in
3
+ * two rows — projects | sessions, models | runtime overhead — each a card
4
+ * head (title + count, the session head carrying the sort) over the same
5
+ * flat row lists the settings panel's tabs use. The runtime-overhead card
6
+ * is the scroll/flash target of the composite metric card's overhead pill.
7
+ *
8
+ * @module token-usage/client/DashboardCards
9
+ */
10
+ import type { RefObject } from 'react';
11
+ import type { ReactNode } from 'react';
12
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
13
+ import type { AuxSummary, CostState, CostedModelRow, PricingTable, SessionUsageRow } from '../wire.ts';
14
+ import type { RowSort } from './UsageRows.tsx';
15
+ import type { ProjectUsageRow } from './project-rows.ts';
16
+ import type { CurrencyView } from './format.ts';
17
+ /** Props for the four-card dashboard. Every list arrives final from the
18
+ * section; the seats (session jump, model filter, price dialog) pass
19
+ * through to the rows. */
20
+ export interface DashboardCardsProps {
21
+ /** The directory-tail folds (projects card). */
22
+ projectRows: readonly ProjectUsageRow[];
23
+ /** The priced per-model rows (models card). */
24
+ modelRows: readonly CostedModelRow[];
25
+ /** The served per-session rows (sessions card). */
26
+ sessionRows: readonly SessionUsageRow[];
27
+ /** The three lists' controlled sorts (tokens/cost; sessions add last
28
+ * activity). */
29
+ projectSort: RowSort;
30
+ onProjectSortChange: (next: RowSort) => void;
31
+ modelSort: RowSort;
32
+ onModelSortChange: (next: RowSort) => void;
33
+ /** The models card's performance view (a content switch next to the
34
+ * sort control, not a sort pick); up, the card reads the speed rows
35
+ * and the sort control yields its seat. */
36
+ modelPerfView: boolean;
37
+ onModelPerfToggle: (next: boolean) => void;
38
+ sessionSort: RowSort;
39
+ onSessionSortChange: (next: RowSort) => void;
40
+ /** The auxiliary layer (overhead card; absent renders the empty hint). */
41
+ aux: AuxSummary | undefined;
42
+ pricing: PricingTable;
43
+ costState: CostState;
44
+ view: CurrencyView;
45
+ t: TranslateNS<'token-usage'>;
46
+ /** Seats passed through to the row lists (absent on bare hosts). */
47
+ sessionListed?: ((id: string) => boolean) | undefined;
48
+ onSessionOpen?: ((id: string) => void) | undefined;
49
+ onToggleModel?: ((model: string) => void) | undefined;
50
+ onModelName?: ((model: string) => void) | undefined;
51
+ /** The overhead card's ref: the metric card's pill scrolls here. */
52
+ overheadCardRef: RefObject<HTMLDivElement>;
53
+ /** True while the overhead card flashes (pill just clicked). */
54
+ overheadFlash: boolean;
55
+ }
56
+ /**
57
+ * Render the four-card dashboard: projects | sessions on the first row,
58
+ * models | runtime overhead on the second. The lists cap their own height
59
+ * and scroll inside the cards.
60
+ */
61
+ export declare function DashboardCards({ projectRows, modelRows, sessionRows, projectSort, onProjectSortChange, modelSort, onModelSortChange, modelPerfView, onModelPerfToggle, sessionSort, onSessionSortChange, aux, pricing, costState, view, t, sessionListed, onSessionOpen, onToggleModel, onModelName, overheadCardRef, overheadFlash, }: DashboardCardsProps): ReactNode;
62
+ //# sourceMappingURL=DashboardCards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DashboardCards.d.ts","sourceRoot":"","sources":["../../src/client/DashboardCards.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAGtG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAU/C;;0BAE0B;AAC1B,MAAM,WAAW,mBAAmB;IAClC,gDAAgD;IAChD,WAAW,EAAE,SAAS,eAAe,EAAE,CAAA;IACvC,+CAA+C;IAC/C,SAAS,EAAE,SAAS,cAAc,EAAE,CAAA;IACpC,mDAAmD;IACnD,WAAW,EAAE,SAAS,eAAe,EAAE,CAAA;IACvC;oBACgB;IAChB,WAAW,EAAE,OAAO,CAAA;IACpB,mBAAmB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IAC5C,SAAS,EAAE,OAAO,CAAA;IAClB,iBAAiB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IAC1C;;+CAE2C;IAC3C,aAAa,EAAE,OAAO,CAAA;IACtB,iBAAiB,EAAE,C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 import { OverheadRows } from "./OverheadRows.js";
3
+ import { UsageRows, RowSortControl, PerfToggle } from "./UsageRows.js";
4
+ import styles from './DashboardCards.module.css';
5
+ /** The three cards' fixed sort options: projects and models pick between
6
+ * token size and billed cost; sessions add last activity. The models'
7
+ * performance view is a separate head toggle, not a sort pick. */
8
+ const SORT_PROJECT = ['tokens', 'cost'];
9
+ const SORT_SESSION = ['tokens', 'cost', 'recent'];
10
+ const SORT_MODEL = ['tokens', 'cost'];
11
+ /**
12
+ * Render the four-card dashboard: projects | sessions on the first row,
13
+ * models | runtime overhead on the second. The lists cap their own height
14
+ * and scroll inside the cards.
15
+ */
16
+ export function DashboardCards({ projectRows, modelRows, sessionRows, projectSort, onProjectSortChange, modelSort, onModelSortChange, modelPerfView, onModelPerfToggle, sessionSort, onSessionSortChange, aux, pricing, costState, view, t, sessionListed, onSessionOpen, onToggleModel, onModelName, overheadCardRef, overheadFlash, }) {
17
+ return (_jsxs("div", { className: styles['grid2'], children: [_jsxs("div", { className: styles['panel'], children: [_jsxs("div", { className: styles['panelHead'], children: [_jsxs("span", { className: styles['panelTitle'], children: [t('board.projects'), _jsx("span", { className: styles['panelCount'], children: projectSort === 'cost'
18
+ ? t('board.byCost', { count: projectRows.length.toLocaleString() })
19
+ : t('board.byTokens', { count: projectRows.length.toLocaleString() }) })] }), _jsx(RowSortControl, { value: projectSort, options: SORT_PROJECT, onChange: onProjectSortChange, ariaLabel: t('board.projects'), t: t })] }), _jsx(UsageRows, { kind: "project", projectRows: projectRows, sort: projectSort, pricing: pricing, costState: costState, view: view, t: t })] }), _jsxs("div", { className: styles['panel'], children: [_jsxs("div", { className: styles['panelHead'], children: [_jsxs("span", { className: styles['panelTitle'], children: [t('board.sessions'), _jsx("span", { className: styles['panelCount'], children: t('board.sessionsCount', { count: sessionRows.length.toLocaleString() }) })] }), _jsx(RowSortControl, { value: sessionSort, options: SORT_SESSION, onChange: onSessionSortChange, ariaLabel: t('board.sessions'), t: t })] }), _jsx(UsageRows, { kind: "session", sessionRows: sessionRows, sort: sessionSort, costState: costState, view: view, t: t, sessionListed: sessionListed, onSessionOpen: onSessionOpen })] }), _jsxs("div", { className: styles['panel'], children: [_jsxs("div", { className: styles['panelHead'], children: [_jsx("span", { className: styles['panelHeadLeft'], children: _jsxs("span", { className: styles['panelTitle'], children: [t('board.models'), _jsx("span", { className: styles['panelCount'], children: modelPerfView
20
+ ? t('board.bySpeed', { count: modelRows.length.toLocaleString() })
21
+ : modelSort === 'cost'
22
+ ? t('board.byCost', { count: modelRows.length.toLocaleString() })
23
+ : t('board.byTokens', { count: modelRows.length.toLocaleString() }) })] }) }), _jsxs("span", { className: styles['panelHeadRight'], children: [_jsx("span", { className: modelPerfView ? styles['headHidden'] : undefined, children: _jsx(RowSortControl, { value: modelSort, options: SORT_MODEL, onChange: onModelSortChange, ariaLabel: t('board.models'), t: t }) }), _jsx(PerfToggle, { pressed: modelPerfView, onToggle: onModelPerfToggle, t: t })] })] }), _jsx(UsageRows, { kind: "model", modelRows: modelRows, sort: modelSort, perfView: modelPerfView, pricing: pricing, costState: costState, view: view, t: t, onToggleModel: onToggleModel, onModelName: onModelName })] }), _jsxs("div", { ref: overheadCardRef, className: overheadFlash ? `${styles['panel']} ${styles['flash']}` : styles['panel'], children: [_jsx("div", { className: styles['panelHead'], children: _jsxs("span", { className: styles['panelTitle'], children: [t('aux.tab'), _jsx("span", { className: styles['panelCount'], children: t('aux.subtitle') })] }) }), _jsx(OverheadRows, { aux: aux, costState: costState, view: view, t: t })] })] }));
24
+ }
25
+ //# sourceMappingURL=DashboardCards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DashboardCards.js","sourceRoot":"","sources":["../../src/client/DashboardCards.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAoB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,gBAAiB,CAAA;AAIvE,OAAO,MAAM,MAAM,6BAA6B,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CAAC,OAAO,CAAC,aAC7G,cAAK,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,YACjC,gBAAM,SAAS,EAAE,MAAM,CAAC,YAAY,CAAC,aAClC,CAAC,CAAC,SAAS,CAAC,EACb,eAAM,SAAS,EAAE,MAAM,CAAC,YAAY,CAAC,YAAG,CAAC,CAAC,cAAc,CAAC,GAAQ,IAC5D,GACH,EACN,KAAC,YAAY,IAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,GAAI,IAC9D,IACF,CACP,CAAA;AACH,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * The runtime-overhead card's row shape (browser half): one expanded-by-
3
+ * default row per auxiliary kind — the row carries the kind's aggregate
4
+ * (calls · cost · tokens) and discloses its per-model lines on toggle; the
5
+ * total line sits beneath the list. The semantics are the retired table's
6
+ * (same fold, same empty hints, same defensive read of a payload without
7
+ * `aux`); only the shape moved from columns to rows.
8
+ *
9
+ * @module token-usage/client/OverheadRows
10
+ */
11
+ import type { ReactNode } from 'react';
12
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
13
+ import type { AuxSummary, CostState } from '../wire.ts';
14
+ import type { CurrencyView } from './format.ts';
15
+ /**
16
+ * Render the overhead rows: one disclosure row per kind, then the total
17
+ * line. A summary without auxiliary requests — including an older host
18
+ * payload with no `aux` field at all — renders the empty hint instead, so
19
+ * the card keeps a stable body.
20
+ * @param props - the aux layer of the summary (possibly absent), the cost
21
+ * state, the display currency view, and the locale translator.
22
+ */
23
+ export declare function OverheadRows({ aux, costState, view, t, compact }: {
24
+ aux: AuxSummary | undefined;
25
+ costState: CostState;
26
+ view: CurrencyView;
27
+ t: TranslateNS<'token-usage'>;
28
+ compact?: boolean;
29
+ }): ReactNode;
30
+ //# sourceMappingURL=OverheadRows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OverheadRows.d.ts","sourceRoot":"","sources":["../../src/client/OverheadRows.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AACnE,OAAO,KAAK,EAAW,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAGhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAK/C;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAe,EAAE,EAAE;IACzE,GAAG,EAAE,UAAU,GAAG,SAAS,CAAA;IAC3B,SAAS,EAAE,SAAS,CAAA;IACpB,IAAI,EAAE,YAAY,CAAA;IAClB,CAAC,EAAE,WAAW,CAAC,aAAa,CAAC,CAAA;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,GAAG,SAAS,CAuFZ"}
@@ -0,0 +1,57 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /**
3
+ * The runtime-overhead card's row shape (browser half): one expanded-by-
4
+ * default row per auxiliary kind — the row carries the kind's aggregate
5
+ * (calls · cost · tokens) and discloses its per-model lines on toggle; the
6
+ * total line sits beneath the list. The semantics are the retired table's
7
+ * (same fold, same empty hints, same defensive read of a payload without
8
+ * `aux`); only the shape moved from columns to rows.
9
+ *
10
+ * @module token-usage/client/OverheadRows
11
+ */
12
+ import { useState } from 'react';
13
+ import { costsAvailable } from "./PricingStatus.js";
14
+ import { totalTokens } from "./day.js";
15
+ import { formatCost, formatTokens } from "./format.js";
16
+ import list from './UsageRows.module.css';
17
+ import styles from './OverheadRows.module.css';
18
+ /**
19
+ * Render the overhead rows: one disclosure row per kind, then the total
20
+ * line. A summary without auxiliary requests — including an older host
21
+ * payload with no `aux` field at all — renders the empty hint instead, so
22
+ * the card keeps a stable body.
23
+ * @param props - the aux layer of the summary (possibly absent), the cost
24
+ * state, the display currency view, and the locale translator.
25
+ */
26
+ export function OverheadRows({ aux, costState, view, t, compact = false }) {
27
+ // Which kinds are collapsed — inverted so the default is every kind
28
+ // expanded (the user's pick): the aggregate row AND its per-model lines
29
+ // show at once, a toggle folds the drill-in away. Each kind toggles
30
+ // independently; switching tabs unmounts the section, which is the
31
+ // natural reset. New kinds arriving on a refresh default to expanded.
32
+ const [collapsedKinds, setCollapsedKinds] = useState(() => new Set());
33
+ const toggleKind = (auxKind) => {
34
+ setCollapsedKinds(previous => {
35
+ const next = new Set(previous);
36
+ if (next.has(auxKind))
37
+ next.delete(auxKind);
38
+ else
39
+ next.add(auxKind);
40
+ return next;
41
+ });
42
+ };
43
+ if (aux === undefined || aux.total.requests === 0) {
44
+ return _jsx("p", { className: styles['muted'], children: t('aux.empty') });
45
+ }
46
+ const costText = (cost) => costsAvailable(costState) ? formatCost(cost, view) : '—';
47
+ /** One drill-in line: model name ↔ calls · cost · tokens. */
48
+ const modelLine = (model, requests, cost, tokens) => (_jsxs("span", { className: styles['dline'], children: [_jsx("span", { className: styles['dmodelName'], children: model }), _jsxs("span", { children: [t('aux.requestCount', { count: requests.toLocaleString() }), ' · ', costText(cost), ' · ', formatTokens(tokens)] })] }));
49
+ const content = (_jsxs(_Fragment, { children: [_jsx("div", { className: compact ? `${list['rows']} ${list['rowsCompact']}` : list['rows'], role: "list", "aria-label": t('aux.tab'), children: (aux.byKind ?? []).map(kindRow => {
50
+ const expanded = !collapsedKinds.has(kindRow.auxKind);
51
+ return (_jsxs("div", { className: styles['orow'], role: "listitem", children: [_jsxs("div", { className: styles['orowTop'], children: [_jsxs("button", { type: "button", className: styles['kindToggle'], "aria-expanded": expanded, onClick: () => toggleKind(kindRow.auxKind), children: [_jsx("span", { className: styles['chevron'], "aria-hidden": "true", children: "\u25B8" }), t(`aux.kind.${kindRow.auxKind}`)] }), _jsxs("span", { className: styles['onums'], children: [t('aux.requestCount', { count: kindRow.totals.requests.toLocaleString() }), ' · ', _jsx("span", { className: styles['onumsCost'], children: costText(kindRow.cost) }), ' · ', formatTokens(totalTokens(kindRow.totals))] })] }), expanded
52
+ ? (_jsx("div", { className: styles['adetail'], children: (kindRow.byModel ?? []).map(modelRow => (_jsx("span", { children: modelLine(modelRow.model, modelRow.totals.requests, modelRow.cost, totalTokens(modelRow.totals)) }, `${kindRow.auxKind}:${modelRow.model}`))) }))
53
+ : null] }, kindRow.auxKind));
54
+ }) }), _jsxs("div", { className: styles['asum'], children: [_jsx("span", { children: t('aux.totalCount', { count: aux.total.requests.toLocaleString() }) }), _jsxs("span", { children: [_jsx("span", { className: styles['onumsCost'], children: costText(aux.cost) }), ' · ', formatTokens(totalTokens(aux.total))] })] })] }));
55
+ return compact ? _jsx("div", { className: styles['compact'], children: content }) : content;
56
+ }
57
+ //# sourceMappingURL=OverheadRows.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OverheadRows.js","sourceRoot":"","sources":["../../src/client/OverheadRows.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAIhC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAqB,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAEtC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,IAAI,MAAM,wBAAwB,CAAA;AACzC,OAAO,MAAM,MAAM,2BAA2B,CAAA;AAE9C;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,GAAG,KAAK,EAMtE;IACC,oEAAoE;IACpE,wEAAwE;IACxE,oEAAoE;IACpE,mEAAmE;IACnE,sEAAsE;IACtE,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAuB,G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,CAAC,YAC9B,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CACvC,yBACG,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,IADxF,GAAG,OAAO,CAAC,OAAO,IAAI,QAAQ,CAAC,KAAK,EAAE,CAE1C,CACR,CAAC,GACE,CACP;gCACD,CAAC,CAAC,IAAI,KAhC2C,OAAO,CAAC,OAAO,CAiC9D,CACP,CAAA;gBACH,CAAC,CAAC,GACE,EACN,eAAK,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,aAC5B,yBAAO,CAAC,CAAC,gBAAgB,EAAE,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,cAAc,EAAE,EAAE,CAAC,GAAQ,EAClF,2BACE,eAAM,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,YAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,GAAQ,EAChE,KAAK,EACL,YAAY,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,IAChC,IACH,IACL,CACJ,CAAA;IACD,OAAO,OAAO,CAAC,CAAC,CAAC,cAAK,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,YAAG,OAAO,GAAO,CAAC,CAAC,CAAC,OAAO,CAAA;AAC/E,CAAC"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * The dashboards' shared overview board (browser half): the metric cards
3
+ * (the composite first card「请求数 · 运行开销」spanning two grid
4
+ * tracks, then cost / total / hit rate and the four buckets), the pricing
5
+ * status line, and the trend card — titled 趋势, plotting the day's 24
6
+ * hours on a single-day window (fixed; no plot pick) and the daily rows
7
+ * on any wider window. Both the main page and the settings panel render
8
+ * this same board, so the two surfaces read as one.
9
+ *
10
+ * @module token-usage/client/OverviewBoard
11
+ */
12
+ import type { ReactNode } from 'react';
13
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
14
+ import type { AssociationStorageError, AuxSummary, CostState, PricingUnavailableReason, UsageDayRow, UsageHourRow, UsageTotals } from '../wire.ts';
15
+ import type { CurrencyView } from './format.ts';
16
+ /** Props for the overview board — every field is derived data the section
17
+ * (which owns the fetch and the filter state) passes down; the board never
18
+ * requests. */
19
+ export interface OverviewBoardProps {
20
+ /** The window's totals (the top-line aggregate). */
21
+ total: UsageTotals;
22
+ /** Billed cost (¥) of the window; dashed when the cost layer is out. */
23
+ totalCost: number;
24
+ costState: CostState;
25
+ pricingUnavailableReason?: PricingUnavailableReason | undefined;
26
+ associationStorageError?: AssociationStorageError | undefined;
27
+ /** The auxiliary layer driving the composite card's overhead pill
28
+ * (absent / zero renders no pill). */
29
+ aux?: AuxSummary | undefined;
30
+ /** The trend's daily points (always present). */
31
+ byDay: readonly UsageDayRow[];
32
+ /** The trend's hourly points (a single-day window only). */
33
+ byHour: readonly UsageHourRow[];
34
+ /** The active window bounds ('' = whole range). A single-day selection
35
+ * (from === to, both non-empty) offers the hourly toggle. */
36
+ from: string;
37
+ to: string;
38
+ /** Overhead pill click: scroll to / switch to the overhead section. */
39
+ onOverheadActivate: () => void;
40
+ /** The settings panel's narrow body: the metric cards fall back to the
41
+ * section's old two-rows-of-four layout (the composite card keeps its
42
+ * pills but reads the short label), while the page's wide column keeps
43
+ * the demo's single nine-track row. */
44
+ compact?: boolean | undefined;
45
+ /** Currency display view (symbol + rate). */
46
+ view: CurrencyView;
47
+ t: TranslateNS<'token-usage'>;
48
+ }
49
+ /**
50
+ * Render the overview board: one metric row (the composite lead card
51
+ * spans two tracks), the pricing status, and the trend card.
52
+ */
53
+ export declare function OverviewBoard({ total, totalCost, costState, pricingUnavailableReason, associationStorageError, aux, byDay, byHour, from, to, onOverheadActivate, compact, view, t, }: OverviewBoardProps): ReactNode;
54
+ //# sourceMappingURL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AK,EACL,SAAS,EACT,SAAS,EACT,wBAAwB,EACxB,uBAAuB,EACvB,GAAG,EACH,KAAK,EACL,MAAM,EACN,IAAI,EACJ,EAAE,EACF,kBAAkB,EAClB,OAAe,EACf,IAAI,EACJ,CAAC,GACF,EAAE,kBAAkB,GAAG,SAAS,CAkEhC"}
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { costsAvailable } from "./PricingStatus.js";
3
+ import { PricingStatus } from "./PricingStatus.js";
4
+ import { StatCard, RequestsStatCard, OverheadPill } from "./StatCard.js";
5
+ import { TrendChart } from "./TrendChart.js";
6
+ import { HitRateText } from "./HitRateText.js";
7
+ import { formatCost, formatTokens } from "./format.js";
8
+ import { totalTokens } from "./day.js";
9
+ import styles from './OverviewBoard.module.css';
10
+ /**
11
+ * Render the overview board: one metric row (the composite lead card
12
+ * spans two tracks), the pricing status, and the trend card.
13
+ */
14
+ export function OverviewBoard({ total, totalCost, costState, pricingUnavailableReason, associationStorageError, aux, byDay, byHour, from, to, onOverheadActivate, compact = false, view, t, }) {
15
+ // A single-day window plots the day's 24 hours (the section's old
16
+ // semantics, fixed — no plot pick); any other window plots the daily rows.
17
+ const singleDay = from !== '' && from === to;
18
+ // The page's wide column renders the demo's 20px figures; the panel's
19
+ // narrow grid keeps the compact ones.
20
+ const cardSize = compact ? 'sm' : 'lg';
21
+ return (_jsxs("div", { className: styles['board'], children: [_jsxs("div", { className: compact ? styles['metricGridCompact'] : styles['metricGrid'], children: [_jsx("div", { className: compact ? styles['leadSpanCompact'] : styles['leadSpan'], children: _jsx(RequestsStatCard, { requests: total.requests, failures: total.failures ?? 0, failuresByCode: total.failuresByCode, ...(compact
22
+ ? {
23
+ labelExtra: (_jsx(OverheadPill, { requests: aux?.total.requests, byKind: aux?.byKind, onActivate: onOverheadActivate, t: t })),
24
+ // The narrow tile fits the count plus the failure
25
+ // breakdown only as bare text — a capsule wraps to a
26
+ // third line and stretches the whole grid row.
27
+ failureBare: true,
28
+ }
29
+ : {
30
+ overheadRequests: aux?.total.requests,
31
+ overheadByKind: aux?.byKind,
32
+ onOverheadActivate,
33
+ }), size: cardSize, t: t }) }), _jsx(StatCard, { size: cardSize, label: t('stat.cost'), value: costsAvailable(costState) ? formatCost(totalCost, view) : '—' }), _jsx(StatCard, { size: cardSize, label: t('stat.totalTokens'), value: formatTokens(totalTokens(total)) }), _jsx(StatCard, { size: cardSize, label: t('stat.hitRate'), value: _jsx(HitRateText, { totals: total }) }), _jsx(StatCard, { size: cardSize, label: t('stat.input'), value: formatTokens(total.inputTokens) }), _jsx(StatCard, { size: cardSize, label: t('stat.output'), value: formatTokens(total.outputTokens) }), _jsx(StatCard, { size: cardSize, label: t('stat.cacheRead'), value: formatTokens(total.cacheReadTokens) }), _jsx(StatCard, { size: cardSize, label: t('stat.cacheWrite'), value: formatTokens(total.cacheWriteTokens) })] }), _jsx(PricingStatus, { costState: costState, pricingUnavailableReason: pricingUnavailableReason, associationStorageError: associationStorageError, t: t }), _jsxs("div", { className: styles['trendCard'], children: [_jsx("span", { className: styles['trendTitle'], children: t('trend.title') }), _jsx(TrendChart, { rows: byDay, t: t, ...from !== '' ? { from } : {}, ...to !== '' ? { to } : {}, ...(singleDay ? { hours: byHour } : {}) })] })] }));
34
+ }
35
+ //# sourceMappingURL=OverviewBoard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OverviewBoard.js","sourceRoot":"","sources":["../../src/client/OverviewBoard.tsx"],"names":[],"mappings":";AAeA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAqB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,eAAgB,CAAA;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAkB,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAmB,CAAA;AAE/C,OAAO,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AC,eAAe,CAAC,GAAI,EACpG,KAAC,QAAQ,IAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,iBAAiB,CAAC,EAAE,KAAK,EAAE,YAAY,CAAC,KAAK,CAAC,gBAAgB,CAAC,GAAI,IAClG,EACN,KAAC,aAAa,IAAC,SAAS,EAAE,SAAS,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,CAAC,EAAE,CAAC,GAAI,EACnJ,eAAK,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,aACjC,eAAM,SAAS,EAAE,MAAM,CAAC,YAAY,CAAC,YAAG,CAAC,CAAC,aAAa,CAAC,GAAQ,EAChE,KAAC,UAAU,IACT,IAAI,EAAE,KAAK,EACX,CAAC,EAAE,CAAC,KACA,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,KAC3B,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KACvB,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GACxC,IACE,IACF,CACP,CAAA;AACH,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * The sidebar panel list's "More" menu row (browser half): one entry that
3
+ * opens the Token Usage main panel, registered into
4
+ * `sidebar.panellist.actions` (declared by ui-sidebar since dsh
5
+ * 0.2.1-rc.3). The row rides the region's own Menu — the owner supplies
6
+ * `onDismiss` (close the menu before navigating) — and the registered
7
+ * `inject` closure supplies the panel-opening callback, so this component
8
+ * stays declarative. The label reuses the settings nav copy so the entry
9
+ * reads as the same feature across surfaces.
10
+ *
11
+ * On a shell older than 0.2.1-rc.3 the slot is never declared: the inject
12
+ * callback never runs and the row simply never appears — the settings
13
+ * section stays the only entry.
14
+ *
15
+ * @module token-usage/client/PanellistMoreEntry
16
+ */
17
+ import type { ReactNode } from 'react';
18
+ import type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
19
+ export type PanellistMoreEntryProps = PropsRuntime<'sidebar.panellist.actions'> & PropsLocale<'token-usage'> & {
20
+ openPanel: () => void;
21
+ };
22
+ /**
23
+ * Render the More-menu row that opens the Token Usage panel.
24
+ * @param props - the owner's dismissal callback, the injected open
25
+ * callback, and the framework translate seat.
26
+ * @returns one MenuItemButton row.
27
+ */
28
+ export declare function PanellistMoreEntry({ onDismiss, openPanel, t }: PanellistMoreEntryProps): ReactNode;
29
+ //# sourceMappingURL=PanellistMoreEntry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PanellistMoreEntry.d.ts","sourceRoot":"","sources":["../../src/client/PanellistMoreEntry.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAIjF,MAAM,MAAM,uBAAuB,GACjC,YAAY,CAAC,2BAA2B,CAAC,GACvC,WAAW,CAAC,aAAa,CAAC,GAC1B;IAAE,SAAS,EAAE,MAAM,IAAI,CAAA;CAAE,CAAA;AAE7B;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,uBAAuB,GAAG,SAAS,CAOlG"}
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { IconGaugeOutlineRegular, MenuItemButton } from '@deepseek-ai/dsh-client-ui-primitives';
3
+ /**
4
+ * Render the More-menu row that opens the Token Usage panel.
5
+ * @param props - the owner's dismissal callback, the injected open
6
+ * callback, and the framework translate seat.
7
+ * @returns one MenuItemButton row.
8
+ */
9
+ export function PanellistMoreEntry({ onDismiss, openPanel, t }) {
10
+ return (_jsx(MenuItemButton, { icon: _jsx(IconGaugeOutlineRegular, { size: 16 }), onSelect: () => { onDismiss(); openPanel(); }, children: t('nav.label') }));
11
+ }
12
+ //# sourceMappingURL=PanellistMoreEntry.js.map