badai147/dsh-ocgo-usage

badai147★ 2JavaScriptLast synced: 2026-08-19

Open on GitHub

在 DeepSeek Harness Web 侧边栏左下角显示 OpenCode Go 用量的插件。

README excerpt

dsh-ocgo-usage 在 DeepSeek Harness Web 侧边栏左下角显示 OpenCode Go 用量的插件。 Show your OpenCode Go usage in the DeepSeek Harness web sidebar's bottom-left corner. 功能 / Features - 左下角常驻按钮(与设置按钮同列同款):仪表盘图标 + 本月剩余用量百分比 ,剩余 ≤20% 变橙、≤0 变红 - 悬停展开明细卡片(向上弹出): DeepSeek 高峰时段时间轴 (北京时间)+ 滚动 / 本周 / 本月三条用量进度 + 已用百分比 + 重置时间 - 高峰时段按北京时间展示:DeepSeek V4 Flash / Pro 高峰 09:00-12:00、14:00-18:00(即 UTC 01:00-04:00、06:00-10:00);时间轴高亮当前时刻所处区间并显示距下一切换点的剩余时间 - 数据每 60 秒自动刷新 - 零配置:自动读取 DSH 供应商配置中的 opencode-go API key( /.dsh/.ocg-state.json → /.dsh/.credentials.yaml → 环境变量) - 零构建:Client 端为手写 ModuleLoader bundle,Host 端为纯 Node ESM 安装 / Install 从 GitHub 源安装(备选): 重启 dsh web ,左下角(设置按钮旁)即可看到「Go 用量」按钮。 💡 安装后重启 dsh web 生效;自 0.1.1 起为纯 Node 实现,无需系统安装 python3。 使用 / Usage 1. 在 DSH 设置中配置 opencode-go 供应商(含 API key)——插件自动读取,无需额外配置 2. 悬停左下角「Go 用量」按钮查看明细 3. 常驻角标显示本月剩余用量百分比(如本月已用 5% 则显示 95% (本月) ) 工作原理 / How it works - Host ( lib/index.js ):注册 DSH web server 路由 GET /api/ocgo-usage ,按序读取 DSH 供应商配置中的 opencode-go API key,代理请求 https://opencode.ai/zen/go/v1/usage ;key 只在本机处理,不下发浏览器 - Client ( lib/client.js ):手写 window. ModuleLoader .load bundle,注册 sidebar.footer.action 按钮 + shell.overlay 悬浮卡片,通过本地路由取数 - 刷新 :激活即拉取,之后每 60 秒自动刷新 - 跨平台 :Host 用 Node…

View full README on GitHub →
Skins / UIdeepseekdeepseek-harnessdsh-pluginsidebar

Category