bowenliang123/dsh-context
bowenliang123/dsh-contextDSH 上下文洞察面板:Context 仪表盘 + /context命令 + Context 浏览器,查看 Context的分类组成、内容详情、演进趋势、压缩/注入事件、统计等一站式 Context 全生命周期管理。
把 DeepSeek Harness 的日常活动画成 GitHub 风格的贡献热力图:账号菜单里的入口打开居中弹窗,含头像与用户名、按五档配色的一年活动、年份选择器与逐格 tooltip。
Happycoding Everyday
Your DeepSeek Harness activity as a GitHub-style contribution graph. English | 中文
*Display name Happycoding Everyday; the package, the repository and the plugin id stay dsh-happycode.*
Happycoding Everyday reads the session logs DeepSeek Harness already writes on your machine, turns them into one number per day, and draws the year the way GitHub draws it: weeks across, Monday to Sunday down, five shades of green, a tooltip on every cell. It is a plugin, not a service — nothing leaves the machine.
From the DSH plugin market, search Happycoding Everyday and install it in one click. From a terminal:
dsh plugin --profile <profile> add dsh-happycodeOn DSH Desktop, install it from Settings → Plugins instead (the app owns that profile). Restart DSH once so the server half loads. Afterwards the client half reloads with the page.
Then open your avatar menu at the bottom of the sidebar. HappyCode sits between Settings and Feedback — the menu keeps the short name, the dialog carries the full one.
three rows around it, with a small heat-grid glyph.
Coding since Oct 2026beside it, read from the account launcher the host already rendered. No picture? The first letter on a brand-coloured tile. No account at all? The row is not drawn. Never your e-mail: the host only exposes a masked one, so an @ means "no name".
90px title band, close button in the top-right corner, Escape and a click on the backdrop. Its height follows the content (min(1500px, 94vw) wide, capped at 88vh) instead of reserving empty space.
padding cells at both ends so no neighbouring year leaks in.
21px at the design width, 14px floor — and recomputed whenever the window changes, so there is no dead space to the right of the grid.
Jan…Dec and Mon/Wed/Fri at 18px.aligned.
with activity, newest first, capped at three. A new year still gets a button, even before it has any activity.
19 contributions on October 24th. andNo contributions on October 23rd., GitHub's wording, with ordinals.
plugin's page under Plugins.
One contribution value per day, from three kinds of event in the session log:
Event · Weight · Default A message you sent (user/message with a real user source) · m · 1 A tool call (tool/call) · t · 1 A tool call that writes a file (write, edit, str_replace_editor, …) · f · 3
value = 1·m + 1·t + 3·f
Deliberately not counted: injected context (runtime snapshots, skill catalogs, time context), assistant messages, tool results, sub-agent sessions, and empty sessions. The rules and the evidence behind them live in docs/data-schema.md.
Colours are bucketed from your own data: the 25th/50th/75th percentile of the non-zero days inside the current window become the three thresholds. Fewer than eight active days, or quartiles that collapse onto each other, fall back to GitHub's fixed 1–9 / 10–19 / 20–39 / 40+.
HTTP routes and nothing else. No telemetry, no fonts, no avatars fetched.
~/.dsh/sessions/ and the session projection cacheare only ever read.
~/.dsh/profiles//.dsh-happycode/, holdingdaily.json, sessions.json and settings.json.
error messages only.
0.2.1 or newer, prereleases included (engines.dsh: ">=0.2.1-0" — theaccount menu and the plugin configuration page are what it targets).
22.15 or newer, for the built-in Zstandard decoder. On an older Node thecompressed logs are skipped and logged rather than crashing.
~/.dsh/sessions/<workspace>/session-<id>/session.v4.jsonl.zstd (read-only)
│ concatenated zstd frames → JSONL
▼
daily.json { "2026-10-24": { m: 8, t: 11, f: 0 } } (cache)
│
▼
GET /dsh-happycode/api/graph?year=2026 → { total, days[], thresholds, … }
GET /dsh-happycode/api/graph?range=last365 (kept for the roadmap; unused by this UI)
│
▼
client bundle → account-menu row → dialogThe first index runs in the background; afterwards only sessions whose size or mtime changed are decoded again. A session that fails to decode is skipped and counted in the status, never retried and never fatal.
npm test # 53 tests: decoding, counting, caching, routes, UI
npm run render:preview # regenerate the README preview from the grid geometryThe client bundle is hand-written CommonJS in client/client.js — no build step. It registers itself with the host's window.__ModuleLoader__ and requires only react and @deepseek-ai/dsh-client-ui-primitives from the host's module table.
See docs/host-ui-notes.md for how the account-menu row is injected and why.
MIT.