DSH Usage and Cost Panel
DSH web usage/cost floating button plug-in: account balance, peak and valley periods, today/this session consumption estimate and token statistics (including setting switch).
Project overview
编辑你的 web profile 补丁文件 $DSHHOME/profiles/web/cordis.patch.yml,追加:
该文件被运行中的 dsh web 热监听,保存后宿主行自动挂载;随后刷新浏览器页面即可看到悬浮按钮。想完全卸载时,把这两行置 disabled: true。 修改后如何生效 客户端 bundle(UI):改 packages/dsh-client-ui-usage-footer/lib/client.js 后,刷新浏览器页面即可(bundle 按请求实时读取、no-cache)。 宿主插件(API 路由 / 设置注册):改 packages/dsh-usage-status/lib/index.js 后,重启 dsh web(宿主模块按进程缓存,无热重载)。 本地检查 设置持久化
开关状态写入两处并保持一致:浏览器 localStorage(dsh-usage-footer.enabled,无需重启即可用)与宿主设置文档(重启一次 dsh web 后生效,存于 settings.yaml 的 usage-footer 段)。 安全说明 本项目代码不含任何密钥;API Key 始终通过 DSH 凭证服务在宿主侧解析 GET /usage-status 路由仅接受本机回环(loopback)请求,局域网访问返回 403