ccch1mneyyy/working-activity--packages-activity-working-activity ↗★ 662
dsh-working-activity
为TUI和Web界面提供模型运行状态、工具执行及耗时的实时状态栏。 适合需要直观监控DSH模型思考、工具调用进度和耗时详情的用户。
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:ccch1mneyyy/working-activity#441540af310ad90c475140c3cf45fb70c2739298&path:packages/activity/working-activity说明文档
阅读完整 README ↗TUI usage
Install the plugin into a profile that composes the official dsh-tui, then
add the ${activity} slot to the left prompt template in the profile's user
layer ($DSH_HOME/profiles/ /cordis.patch.yml):
- id: tui
config:
theme:
leftPrompt: '${cwd}${git/worktree}${activity}${model}${token_meter/cache_hit_rate}${context}'
While a turn runs, the prompt line shows e.g. dsh main 跑个命令 npm test · 12s deepseek-chat …; while thinking, 嗯…让我捋捋 · 总1m23s; after the turn, 搞定 ✓ · 4 工具 · 想12s 干11s briefly. Without ${activity} in the template, the plugin is inert in the TUI (the slot is unregistered values are omitted by the template renderer).
Web usage
The Web half is one entry — WorkingLine on conversation.input.dock — rendered as a single dim row above the composer card (phase-colored marker, the host's line, the turn's tool count). It renders nothing before the first value and while the phase is idle.
Transport: a session projection, not the session log. The node half folds every committed session event into the workingActivity session projection, and the host ships the whole value (phase, line, tool count, timestamps) to clients through the projection store. The browser reads it with the session standard kit's useProjection('workingActivity'). What follows from that:
- Nothing is appended to the session log for the Web UI: no
publish: truesession is needed, and no log becomes unresumable on this package's account. - The runtime patch is obsolete. Earlier releases required a patched
@deepseek-ai/dsh-client-runtimethat copiedactivity/statusevents ontoConversationSnapshot.activity. That package is frozen at0.1.1-rc.2and absent from the current (0.1.7-rc.2) host line; this package no longer declares it, and theConversationSnapshot.activitydeclaration merge is gone. The projection is the only transport. - The elapsed counter refreshes on events.
lineis painted exactly as the host rendered it at the last fold, so a running tool's· 12scan lag until the next committed event; client-side ticking is a known follow-up (the value carriesphaseStartedAt/turnStartedAtfor it).
The entry declares the client cohort it actually uses — in peerDependencies and in dsh.client.inject: @deepseek-ai/dsh-client-ui-slots (slot contract), @deepseek-ai/dsh-client-ui-conversation (the dock seat), @deepseek-ai/dsh-client-ui-session (the session standard kit supplying useProjection), @deepseek-ai/dsh-client-ui-renderer (the slots service it registers through), and @deepseek-ai/dsh-session-projection (the projection key's type table). Every one of them is an optional peer, so a profile without the Web composition is unaffected.
Configuration
| Key | Type | Default | Meaning |
|---|---|---|---|
phrases | boolean | true | Playful copy pool; false renders plain functional labels |
publish | boolean | false | Append activity/status session events for log-replaying UI consumers. Off by default: appended events currently make session logs unresumable (see note below). The Web client reads the session projection instead and needs none of this |
tickMs | number | 500 | Status render tick interval (100–5000) |
publishIntervalMs | number | 2000 | Minimum interval between published events while the line is stable (500–30000) |
detailLimit | number | 40 | Max displayed detail length (paths/commands/patterns), 8–120 |
customActions | object | {} | Exact tool-name → action-copy pools, e.g. {"my_deploy": ["部署一下", "上线中"]} |
narrate | boolean | true | Inject the ⏵ self-narration contract into the system prompt; the line is surfaced live and stripped from the chat body |