realLoganLuo/dsh-session-cost--packages-ui-session-cost1

@logan-luo/dsh-client-ui-session-cost

会话成本展示界面插件:提供 Dock 栏成本条、单次会话成本查看标签页以及基于成本 Remote 的使用量仪表盘。

AI 分析

核心用途是在 Web UI 中直观展示当前会话的预估花费、模型费率和历史趋势。适合需要实时监控 API 消费额度的用户。需配合后台账本服务运行。

包名
@logan-luo/dsh-client-ui-session-cost
版本
0.1.0-rc.6
许可证
MIT
最近更新
2026年8月16日

安装

此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗

@logan-luo/dsh-client-ui-session-cost

English | 中文

Session cost surfaces, browser half: the dock cost strip, the per-session cost view tab, and the usage dashboard. The pricing, projection, and ledger live in @logan-luo/dsh-session-cost.

Shipped surfaces

  • Dock cost strip (src/client/CostDockRow.tsx): the second conversation.composer.dock row under the built-in stats line — estimated cost, the dominant model's current rate, and an unpriced count. Reads useProjection('costStats').
  • Cost view tab (src/client/CostViewTab.tsx): a conversation.view tab with totals, per-model rows, per-day trend, and the rate versions that produced the figures.
  • Usage dashboard (src/client/DashboardTrigger.tsx): a sidebar.footer.action entry opening the global usage dialog — project / time-range (today, week, month, all) / grouping (day, week, month, model, project) selection over the cost.dashboard Remote, with totals, per-model buckets, and groups. The DashboardController (src/client/controller.ts) owns the view state and the refresh/selection verbs.

Model Experience

None: the package renders host-computed projection values and Remote rollups; it assembles no model request.

KV Cache effect

None; the package neither assembles nor sends a provider request.

Known Limitations and Deferred Work

  • Time-range presets are calendarized in the same fixed Beijing offset as the rate card; a named timezone stays a deferred config option shared with the node half.
  • The dashboard's project list is the distinct set of ledger projects; project renames on disk split history into two rows.