Personal center for DeepSeek Harness: cross-session usage statistics, per-model cost estimation, global custom instructions, a data-driven desktop pet, and a conversation status overview, all local and offline.
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:
Token Usage — real usage stats: today / cumulative tokens, session count, tool calls, a GitHub-style activity heatmap (daily / weekly / cumulative), per-model breakdown, top tools, and session review; with sub-tabs (Overview / Review / Model Cost).
Personalization — global custom instructions (like ChatGPT / Codex "Personalization → Custom instructions"), applied to all chats on this machine.
Appearance — a global font-size stepper (default 14, range 11–16, step 1): scales the whole UI instantly and remembers your choice.
Desktop Pet — bitmap (black / blue whale) and vector ("round black / round blue") skins, driven by your real usage (5 emotions), with a session-status overview (double-click a session to jump into it).
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.
Built-in presets (deepseek / kimi / gemini / gpt) with provider→model autocomplete, editable;
Shows this week / this month / cumulative cost.
Personalization (layered instructions: v0.7)
Global instructions (identity baseline): identity / working principles / response preferences, applied to every chat on this machine;
Per-workspace instructions (project-specific): each workspace gets its own instructions, injected by longest-prefix cwd match as "global + workspace" merged text; unconfigured workspaces fall back to global only;
Template library: 5 built-in templates (PM / developer / writing / translator / general assistant), one-click apply to global or current workspace; save / edit / delete your own;
Injection preview: live "global + current workspace" merged text + ≈token estimate at the bottom;
All local (settings.yaml), zero network, no migration of existing custom-instructions data; bilingual, DSH design tokens.
Appearance (global font size: v1.0)
New "Appearance" tab with a global font-size stepper: default 14, range 11–16, step 1, instant preview, saved to local localStorage;
The engine scans all stylesheets for DSH --dsw-font-* tokens and hard-coded font-size rules, then offsets everything by "current − 14" via a <style> override layer — at the default 14 the layer is empty and the UI is 100% untouched;
Only shifts global font size, never touches other modules' layout; local, zero network.
Desktop Pet (black / blue whale)
A round little black whale in the bottom-right corner (S size by default), pure frontend, zero deps (alpha-transparent WebP assets, dark-theme outline glow);
Vector skins (v1.1): "round black / round blue" (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;
Pet list: black whale / blue whale each with a full config card (preview + today's stats + opacity + toggle), mutually exclusive — only one enabled at a time; the preview art plays random idle expressions while the panel is open (rotates every 10s, wakes on enable); disabled cards stay static;
Always-on but quiet when idle (Codex-pet style): shows a single static idle frame, plays an animation on emotion change (~2s) and a small reaction on hover / click;
happy = cache-hit rate ≥ 70%; busy = today's tool calls ≥ 400; tired = today's tokens ≥ 200M; wallet-pain = today's cost ≥ ¥10 (needs configured prices); dozing = no activity ≥ 10 min (thresholds calibrated on real local data);
Click pops a random data bubble (today's tokens / cache-hit rate / top tool / today's cost), auto-dismisses in 3s;
Session status overview: a toggle card at the top of the Pet tab (on by default); hover the "Session status" button (or click the pet) → frosted-glass panel listing live session states (running / failed / done / idle + summary counts, running/failed on top); double-click a session to jump into it; failures shown honestly in red; event-driven from the platform's existing sessions projection (zero polling); close by clicking outside or pressing ESC; when disabled, the button hides and the pet returns to usage-driven emotions;
Free drag: drag anywhere, position remembered (restores after refresh); scales proportionally with window resize, stays in viewport;
Right-click menu: hide pet;
Minimal Pet tab panel: top "Session status" card (title + toggle + description, grayed when pet disabled) + two pet cards (preview + name + ⓘ hint + today's stats + opacity (30%/60%/100%) + enable toggle); toggles are mutually exclusive, interaction is toggle-only (no hover/selection visuals);
enabled:false creates no DOM and does no polling; API failures keep the last state, never crash;
Uses only aggregated numbers (today's tokens / tool calls / cost, cache-hit rate, last-activity time), never reads chat content.
🛠 Install
Method 1: Plugin console / CLI (recommended)
dsh plugin --profile web add github:PolinniZhong/dsh-personal-center
Planned (not yet): usage export (JSON/CSV), year-over-year comparison, more skins / emotions — see docs/common/PLAN.md.
🤔 Why (project rationale summary)
Feasible: DSH is plugin-based (host plugin + browser bundle); session logs record token usage and tool-call events; MCP tools are named mcp__<server>__<tool> for direct categorization;
User psychology: quantified feedback (GitHub-contribution style), cost transparency (per-token billing), differentiation (no official personal center / global stats), privacy-friendly (aggregates only);