ccch1mneyyy/working-activity
Lively Working-line extension for pi CLI and DSH
working‑activity
What it is – A pair of open‑source extensions that add a real‑time “working‑activity” status line to two different AI‑agent platforms:
- pi‑CLI (
pi-working-activity) - DeepSeek Harness (DSH) (
dsh-working-activity)
Both versions share the same idea: while an LLM‑driven coding‑assistant is thinking or running tools, a compact line is shown in the terminal / web UI / desktop GUI that tells you what the agent is doing, how long it has been running, progress percentages, token usage, cost, and a handful of playful messages.
Why it matters
LLM‑based coding agents often spend a lot of time “thinking” or invoking external tools (e.g., git pull, npm install, model‑weight download). Without feedback the user watches a silent spinner and has no idea whether the agent is still working, stuck, or has finished. working‑activity fills that gap with:
- Live tool‑execution updates (start, progress, end)
- Model self‑narration – the agent writes a short “I’m doing …” line that is displayed instantly.
- Context‑usage warnings so you know when you’re approaching the model’s token limit.
- Cost & token statistics for each round, helping you keep budgets in check.
- Optional fun elements (animated frames, random phrases, holiday easter‑eggs) that can be turned off for a minimal UI.
The project therefore improves transparency, ergonomics, and budget awareness for anyone building or using LLM‑driven coding agents on the pi or DeepSeek platforms.
Core features (pi version – the README is most detailed for this side)
| Feature | What you see | How it works |
|---|---|---|
| Real‑time tool activity | 翻翻 src/index.ts / 跑命令 npm run build |
Listens to tool_execution_start / tool_execution_end events emitted by the agent. |
| Tool progress | 拉取模型权重 · 42% · 8s |
Parses tool_execution_update for percent/phase fields; falls back to elapsed time. |
| Quick‑tool queue | Very short tools (<1.5 s) are still shown for ~1 s each. | Queues fast tools so the user sees them. |
| Thinking phrase pool | Random short Chinese phrases change every ~2.6 s. | 95 pre‑written phrases; longer‑thinking thresholds add special messages. |
| Rare visual easter‑egg | Colour‑shifting animated text appears ~once every 6‑7 min. | 1/150 probability, four layered CSS effects. |
| Model self‑narration | ⏵ 查一下报错原因 appears in the line. |
Extension injects a system‑prompt rule (⏵ … ≤20 字). Parses the model’s streaming output for the marker. |
| Timing & summary | 搞定 ✓ · 4 工具 · 想3s 干2s plus a final cost line. |
Tracks start/end timestamps, aggregates per‑round and session‑wide. |
| Context‑usage warning | ⚠ 上下文85% turns yellow/red when thresholds are crossed. |
Checks session_compact usage every 3 s; thresholds configurable. |
| Combo & slow‑tool tags | 火力全开×5 for many rapid tools; 这个有点慢 · for >30 s tools. |
Simple counters on consecutive tool events. |
| Remaining‑time estimate | 拉取模型权重 · 42% · 还剩~11s |
Uses elapsed time and reported percent to extrapolate. |
| Git branch display | 拉代码 · main · 3s |
Detects git‑related commands and queries the current branch. |
| Time‑aware phrases | Night‑time, weekend, holiday messages. | Checks local clock and a built‑in holiday list. |
| Animated frames | /activity frames moon changes the decorative animation. |
28 built‑in frame presets; random picks each round. |
| Failure messages | 翻车了 · 读文件 config.json ✗ |
Random short failure strings replace the plain “✗”. |
| Sub‑agent count | 小弟×3 when parallel sub‑agents run. |
|
| Token‑per‑second estimate | ~42 tok/s (optional) |
Roughly counts characters in the streaming delta. |
| Custom tool mapping | User‑defined verb phrases for their own tools. | |
| Interactive settings panel | /activity settings opens a searchable UI to toggle any feature. |
|
| Doctor command | /activity doctor validates config, theme, and animation data. |
|
| Mode switch | minimal (only essential info) vs lively (full fun UI). |
All of the above can be toggled via the /activity command suite or by editing ~/.pi/agent/working-activity.json.
DeepSeek Harness (DSH) version
The DSH plugin mirrors the pi functionality but is packaged as a Cordis host plugin (dsh-working-activity). It publishes a workingActivity projection that is consumed by three front‑ends:
- TUI (
dsh‑tui) - Web UI (client bundle)
- Desktop GUI (React‑based)
Key differences:
- No tool‑progress percentages (DSH does not emit them).
- The status line is emitted as a projection rather than directly to the terminal.
- Optional
publish: truewrites a lightweight log record for replay; otherwise the line stays in‑memory only. - Compatibility layers are provided for several DSH host releases (0.1.x‑alpha, 0.2.x‑rc).
Configuration keys are analogous to the pi version (frames, narrate, context thresholds, etc.) and are stored in the profile’s plugin config.
Getting started
pi‑CLI
pi install npm:pi-working-activity
# configuration file is created at ~/.pi/agent/working-activity.json
# use the /activity command suite inside the agent chat to control it
DeepSeek Harness
# add the plugin to a profile
dsh plugin --profile <profile> add dsh-working-activity
# the plugin self‑mounts; no extra steps needed
Both installations are zero‑build for pi (the TypeScript source is loaded directly) and a normal npm publish for DSH.
Configuration (excerpt)
{
"frames": "moon",
"narrate": true,
"contextWarnAt": 80,
"contextDangerAt": 95,
"showTokPerSec": false,
"workRemindAt": 3,
"customPhrases": [],
"customActions": {"my_deploy": ["部署一下", "上线中"]},
"mode": "lively",
"features": {"rareEggs": true, "shimmer": "auto"}
}
All keys are documented in the README; they can be edited manually or via the interactive /activity settings UI.
Who might use this?
- Developers building coding assistants on the pi or DeepSeek platforms who want immediate visual feedback on tool usage and model reasoning.
- Power users who run long‑running tool chains (model downloads, builds, deployments) and need progress, cost, and token‑usage visibility.
- Teams concerned about token budgets – the per‑round cost line helps keep LLM expenses transparent.
- Anyone who likes a bit of personality – the optional animated frames, holiday messages, and random phrases add a light‑hearted touch without affecting core functionality.
License
- Core repository (pi version & docs): MIT
- DSH plugin package: BSD‑3‑Clause
All information above is taken directly from the repository’s README; no external assumptions have been added.
Related
- Project
- Project
- Project
- Project
- Dispatch