Han-1413141/dsh-cost-meter
Han-1413141/dsh-cost-meter会话与当日 API 费用统计、预算图框(已用%)、官方余额、历史看板,支持峰谷计价与官方价格一键同步。
DeepSeek Harness 个人中心:跨会话用量统计、按模型成本估算、全局自定义指令、外观全局字号、数据驱动的桌面宠物(位图/矢量皮肤)与会话状态概览,纯本地离线运行。
A local, offline personal center for DeepSeek Harness — usage stats, cost estimation, custom instructions, global font size, and a desktop pet.
A local plugin for DeepSeek Harness (DSH) desktop / web. Adds a Personal Center section to Settings, with four tabs:
Model cost estimation lives inside Token Usage: per-model pricing (peak / off-peak, per currency, official presets) plus cache-hit-rate stats.
100% local — no network, no reading chat content. See PRIVACY.md. Bilingual UI (中文 / English), follows DSH's language automatically.
Token Usage · Personalization ·
Appearance (global font size) · Pet ·
Token Usage · light · Review · dark ·
Pet panel · light · Pet panel · dark ·
Session status overview (double-click to jump)
Five emotion animations (happy / busy / tired / wallet-pain / dozing):
Black whale · Blue whale ·
New actions (v0.8.0) (thinking / waiting / celebrate / drag / wave):
Black whale · Blue whale ·
Model cost · dark
Personalization · per workspace (layered instructions + templates)
mcp____ form);Data source: aggregates local session logs in real time — numbers only, never reads content. See docs/common/DESIGN.md.
custom-instructions data; bilingual, DSH design tokens.localStorage;--dsw-font-* tokens and hard-coded font-size rules, then offsets everything by "current − 14" via a `` override layer — at the default 14 the layer is empty and the UI is 100% untouched;black-vector / blue-vector) — pure-DOM (radial-gradient body + capsule eyes), zero assets; mouse-follow in four layers (eyes / head shift / deform / light source) + turn perspective (side eye shrinks, eye gap compresses) + blink on approach / squint on eye click / tickle on body click / random head zoom; coexists with bitmap skins (mutually exclusive), switching rebuilds the instance;/personal-center/stats, priority: wallet-pain > tired > busy > dozing > happy;sessions projection (zero polling); close by clicking outside or pressing ESC; when disabled, the button hides and the pet returns to usage-driven emotions;enabled:false creates no DOM and does no polling; API failures keep the last state, never crash;dsh plugin --profile web add github:PolinniZhong/dsh-personal-centerOr: Web GUI → Settings → Plugins → Plugin Console, search "个人中心".
package.json:"dsh-personal-center": "link:/absolute/path/to/DSH 个人中心""dsh-personal-center" to the dsh.profile.bundles list;Note: if node_modules has no package after restart, symlink manually:ln -s /absolute/path/DSH 个人中心 /profiles/web/node_modules/dsh-personal-centerSettings → Plugins → Plugin Console, disable / remove dsh-personal-center; or remove the dependency and bundles entry from package.json.
Version · Content · Status v0.1 · Personalization → custom instructions (global injection) · ✅ v0.2 · "Personal" section: stats (real data) + personalization · ✅ v0.3 · Cost estimation (peak/off-peak, per currency, presets), cache-hit rate, session review, Token activity · ✅ v0.4 · Desktop pet (5 emotions, idle-static, drag memory, minimal panel) · ✅ v0.5 · Pet polish + session-status overview (action-level live state) · ✅ v0.6 · Session-status overview upgrade (action-level live display) · ✅ v0.7 · Personalization enhancement: global + per-workspace (layered injection) + templates + preview · ✅ (v0.7) v0.8 · 5 new pet actions (thinking/waiting/celebrate/drag/wave) + session-status emotion-driven · ✅ (v0.8.1) v0.9 · "Personal Center" rename, pet single-page, session-status fixes (running-on-top / double-click / hover-stable), i18n, proportional window-follow · ✅ (v0.9.0) v1.0 · Appearance tab + global font-size engine, sticky/frosted header, i18n template library, code governance refactor (4 module prefixes + SDD) · ✅ (v1.0.0)
Planned (not yet): usage export (JSON/CSV), year-over-year comparison, more skins / emotions — see docs/common/PLAN.md.
mcp____ for direct categorization;├── package.json # dsh.bundle.patch + dsh.client declaration
├── cordis.patch.yml # plugin row
├── lib/
│ ├── index.js # host: settings namespaces + prompt injection + stats + loopback routes (pet config/assets)
│ ├── client.js # browser: Personal Center UI (stats + cost + personalization + appearance/font + pet panel/overlay)
│ └── pet-assets/ # pet animation assets (5×WebP, built from RGBA frames)
├── docs/
│ ├── README.md # knowledge map (entry)
│ ├── SDD.md # module spec & boundaries (class prefixes / pitfalls / new-module SOP)
│ ├── MODULE-MAP.md # feature → code/route/doc/asset map
│ ├── common/ # DESIGN / DESIGN-SYSTEM / PLAN / PLATFORM-NOTES / release
│ ├── personal-profile/ # Token Usage: DATA-MODEL / COST-ESTIMATION
│ ├── personalization/ # Personalization: PRD
│ └── pet/ # Pet: DESKTOP-PET / status overview spec
├── docs/screenshots/ # screenshots
├── PRIVACY.md # privacy
├── README.md
└── LICENSE # MITFor architecture / pitfalls / conventions, start with docs/README.md.
Architecture references dsh-omi-voice (link dependency + bundle patch pattern) and dsh-plugin-hub (plugin console install channel).