dsh-session-cost
开发工具 活跃维护

dsh-session-cost

glangzh/dsh-session-cost

为DSH网页端提供轻量扩展能力,支持实时查看会话花费明细与账户余额信息,无需跳转多页面查询,数据展示清晰直观,安装使用门槛极低。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
None
开源协议
15 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:glangzh/dsh-session-cost
git clone https://github.com/glangzh/dsh-session-cost.git
git clone git@github.com:glangzh/dsh-session-cost.git
README.md main

dsh-session-cost

为 dsh(DeepSeek Harness)网页端提供会话花费 + 账户余额查询。会话头部右上角(Session log 旁)一个图标按钮,点击弹窗显示当前会话的 DeepSeek 花费明细与账户余额。

功能

  • 会话花费:展示输入(未缓存+缓存写)/ 输入(缓存命中)/ 输出 + 合计
  • 仅统计 DeepSeek 模型,按每次调用实际模型计价
  • 账户余额:DeepSeek 开放平台余额查询

安装

通过 dsh plugin 安装到任意 profile:

# git 安装(推荐,纯 JS 无构建,可直接用;建议锁定 commit)
dsh plugin --profile web add github:glangzh/dsh-session-cost

# 本地目录(开发调试)
dsh plugin --profile web add ./dsh-session-cost

重启 dsh web(或所在应用)生效;更新用 dsh plugin --profile web update dsh-session-cost,卸载用 dsh plugin --profile web remove dsh-session-cost。

注:若插件含 TypeScript 构建步骤,git 安装需要 prepare 脚本,并在 profile 的 pnpm-workspace.yaml 中对该包授权构建。

配置

  • DeepSeek API Key:环境变量 DEEPSEEK_API_KEY,或 ~/.dsh/.credentials.yaml 中的 DEEPSEEK_API_KEY 条目
  • 价目表覆盖:DSH_PRICES_FILE 指向自定义 JSON
  • 价格缓存:~/.dsh/session-cost/prices.json

免责

花费为近似口径(token 桶 × 表价),精确账单以 DeepSeek 官方为准;峰谷时段与价格以官方公告为准。