dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
OpenAI Codex plan usage indicator for DeepSeek Harness
English | 简体中文
一个为 DeepSeek Harness Web UI 打造的精致 OpenAI Codex 套餐用量指示器。
该插件保留标准的 Settings 齿轮图标和标签,同时在最右侧添加一个上下文计量器样式的圆环。圆环内含 OpenAI 标志,并会在鼠标悬停或键盘聚焦时打开详细的配额面板。
构建软件包:
pnpm install
pnpm run check
从此目录将其添加到 DSH profile:
dsh plugin --profile web add .
dsh --profile web --dump-config
dsh web
开发期间,只有在运行 pnpm run dev 并重新构建插件输出时,Host 更改才会热重载。浏览器客户端更改需要重新构建,然后刷新现有 Web 页面。client bundle 由 DSH 的 client-module system 加载;既不需要也不应使用单独的 Vite server。
使用以下命令移除:
dsh plugin --profile web remove dsh-codex-usage
tarball 已包含预构建的 Host 和 lazy-CJS client artifacts,从而避免安装时的构建批准:
pnpm pack
dsh plugin --profile web add ./dsh-codex-usage-0.1.8.tgz
对于 Git-host 安装,pnpm 10 要求 profile 允许此软件包的 prepare script。请固定一个 commit,并严格遵循 DSH/pnpm 输出的 allowBuilds 指令。
全部四个字段都可在 Settings → Plugins → Codex usage 中使用。更改会先在本地暂存,直到执行 Save;它们通过 DSH Settings 持久化,保存的设置/profile patch 会实时生效,无需重启。profile row 仍作为已保存用户覆盖项之下的基础配置。
bundle 会插入以下 row:
- id: codex-usage
name: dsh-codex-usage
config:
refreshIntervalMs: 300000
hoverRefreshMinAgeMs: 30000
requestTimeoutMs: 15000
codexCommand: codex
如需更改 composition-layer base,请在 profile 的 cordis.patch.yml 中覆盖整个 row。后续 layers 会替换一个 row 的完整 config value;已保存的 Settings UI values 会覆盖该 base。
| 字段 | 默认值 | 含义 |
|---|---|---|
| refreshIntervalMs | 300000 | 后台轮询间隔;最小值为 60 秒。 |
| hoverRefreshMinAgeMs | 30000 | 再次悬停刷新前所需的最小数据年龄;最小值为 5 秒。 |
| requestTimeoutMs | 15000 | 每个 Codex JSON-RPC request 的超时时间。 |
| codexCommand | codex | Codex executable name 或 absolute path。 |
client artifact 并非普通的 browser ESM。tsdown.config.ts 会生成 DSH 所需的 lazy-CJS registration。React 和 DSH UI packages 保持 external,并通过 DSH 的 client module table 解析,从而防止重复的 React runtimes。
pnpm run typecheck
pnpm run test
pnpm run build
pnpm run pack:check
default suite 会跳过 live provider test。当 Codex 已安装并登录时运行该测试:
$env:CODEX_LIVE = '1'
pnpm exec vitest run tests/codex-live.spec.ts
MIT