nuwa-skill
alchaincyf
你想蒸馏的下一个员工,何必是同事。蒸馏任何人的思维方式——心智模型、决策启发式、表达DNA。Distill how anyone thinks.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:MarkTina/dsh-activity-heat
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
A DeepSeek Harness plugin that surfaces the sessions and workspaces you most recently talked to, using a heat score derived from elapsed time — so the conversation you just had never gets buried.
Sessions pile up in the DSH sidebar, nested inside workspace groups. The one you just spoke in is pushed out of sight within minutes.
This plugin computes a 0–100% heat score from time since last activity and expresses it in three places plus a panel — the more recent, the more visible.
| Where | What it does |
|---|---|
| Sidebar entry | A heat-ring icon whose brightness follows the hottest session in the profile |
| Session title | A small dot before the title text: solid = warm/blazing, hollow = active and cooler. Cold sessions are grey, hotter ones turn blue; active sessions pulse gently; hidden after 7 days. The row-leading cell stays with the host's state dot and the schedule clock |
| Session hover card | Heat 4/5 · Warm, Last active: 40 min ago, This workspace is hot; the status line is rendered natively by the host (Running / Waiting for approval / Plan review / Waiting for answer / Completed / Idle) |
| Main panel | Sessions / Workspaces views, each with heat filters and a count selector |
Sessions 58 / Workspaces 10 — no more mixed list10 / 20 / 30 / 50, workspaces 5 / 10 / 20Current state is a badge before the title, and the relative time lives in the right column, not the meta row.StateDot (blue spinner / amber dot / green dot / grey dot). The data source is the host useSessionStatus (running / pendingInteraction / completionUnread); “N subagents running” stacks alongside the primary state. Waiting states and Completed drop the running frame; only Running keeps it.contextTimeline.timing) and same segmentation as the host's timing panel; the card is portaled to document.body so the scrolling list can never clip itcurrentColor — no colored emoji⌃⌄ handle on the right while more rows remainRight-click a session card (or focus it and press Shift+F10 / the Menu key):
| Action | Notes |
|---|---|
| Open session | Same as clicking the card |
| Open in terminal | Opens the session/workspace directory in the system terminal: Windows tries Windows Terminal → PowerShell 7 → Windows PowerShell; macOS uses Terminal; Linux uses x-terminal-emulator |
| Open in… | Two-level cascading menu (hover submenu in the panel; the native sidebar row menu expands the same submenu on hover — no second click). The first row is always "Open in terminal"; the rest list locally probed file managers / editors / terminals (including Git Bash and WSL); picking one opens the session/workspace directory there |
| Copy session ID / title / latest prompt / working directory | The latest prompt is copied in full; clipboard failures are reported |
| Pin / unpin | Writes the host sidebar order; this panel keeps sorting by heat |
| Rename… | Prefilled with the current title; an empty title cannot be saved |
| Fork session | Creates a branch at the last completed turn without navigating |
| Download session log | Uses the host api/session.export route; reports unavailability when the export package is not mounted |
| Archive session | Confirmation first; disabled while the session is running; 6 s undo |
Workspace cards also offer open workspace, open in…, new session in workspace, and copy workspace name / path. Ungrouped cards have no actionable entries and ignore right-click.
The menu is portaled to document.body so the scrolling list cannot clip it; arrow keys plus Enter cover every action, Esc or an outside click closes it, and focus returns to the card.
Status model, labels and colours all follow the host's sessionStatuses(); the plugin no longer draws its own whale-tail status marks:
running === true, blue StateDot spinner + "Running"; the card gets the orbiting band and breathing glow, and DeepSeek whales swim back and forth along the bottom edge (one more every minute, up to 5).pendingInteraction.kind is approval / plan-review / question, amber warning dot; highest priority.completionUnread === true (a non-main session finished but unread), green dot + "Completed"; clears when opened.runningSubagentCount > 0, "N subagents running" is shown alongside the primary state.useSessionStatus snapshot; only fall back to summary.running, userQuestions.active or the local seen watermark when that snapshot is missing. Running sessions still count as heat 5/5 and sort first.Workspace cards: when any session inside the workspace is Running, the card shows the same running frame and "Running" mark, so live work is visible from the Workspaces view too.
A workspace card also aggregates everything that can be summed: session count, turns, steps, tokens and total conversation time. Cache hit rate is weighted across the workspace's billing buckets (not an average of percentages), and context usage shows the most loaded session. Nothing that cannot be summarised — prompts, the current-session flag — is carried over.
prefers-reduced-motionis respected: with reduced motion enabled, all animation stops.
StatusDot that mirrors the host’s, from useSessionStatus; subagents stack on top of the primary state./heat command — reach the panel without opening it (the collapsed badge is no longer registered because the host uses that seam for its update badge). The session-header corner seat belongs to ui-sidebar-right’s panel button, so this plugin no longer contends for it.shell.bottom (the full-width row below all three columns); appears only when sessions are running or waiting, click to open; nothing reserved when idle. Do not mount it on conversation.composer.dock — the host’s own session stats (turns/steps/speed, tokens/cache hit) live there and would collide with the stats row.contextMenus service, so the host renders them with the same native menu as built-in rows (identical icon / type scale / spacing / hover / keyboard navigation); the "Open in…" submenu cascades natively on hover. They still read the same action catalog (SESSION_ACTION_DEFS) as the panel.stopActivity (stopping is irreversible)./heat command: type /heat to open the panel.Every surface is built from host theme tokens plus color-mix — no hard-coded colors — so light and dark themes work automatically:
--color-blue-500 /* heat color (blue, falls back to #3b82f6) */
--dsw-alias-bg-base /* opaque card background (hides the orbit band) */
--dsw-specific-menu /* glass surface: host translucent menu fill (light #f8f9fa94 / dark #43454a73) */
--dsw-menu-backdrop-filter /* background blur: blur(40px) saturate(150%) */
--dsw-alias-label-primary /* primary text */
--dsw-alias-label-secondary /* secondary text */
--dsw-alias-border-l1 /* separators, tracks and glass hairlines */
--dsw-alias-state-success-primary /* the green "Done" mark */
--ds-ease-in-out /* shared easing curve */
Three layers:
color-mix(..., 70%, bg-base)) over the panel background, with a 1px top highlight and a hairline gradient border.backdrop-filter layer; hover cards use the host's --dsw-menu-backdrop-filter.Heat uses just three bands — light grey → deep grey → bright blue (HEAT_TONES): light grey for cold/stale/recent, deep grey for active, bright blue for warm/blazing. The bar keeps its band colour for the full height and only brightens toward the top (the same tone mixed with white, heatBarSurface), with a 1px inner highlight and a hairline glass edge (heatBarShadow) — so it reads as a lit glass rod, and the lower half no longer dissolves into the card. The grey steps use the neutral label tokens, which read as light grey in light themes and dark grey in dark themes — no per-theme colours.
Heat meters and heat bars are continuous, tick-free fills shaped like “water rushing against a baffle in a pipe”: the track and water body are shaded as a cylindrical section (darker top/bottom, brighter middle), the fill is the tier colour with a liquid-level gradient that gently sloshes, caustics drift forward around the upper-middle of the bore while a water-surface glint rises and falls slightly above centre, and the leading edge is a bright water wall inset top and bottom, centred, with a soft surge and periodic ripple. Warm tiers add a matching glow; every heat-bar surface shares the same styling.
The left edge of each card is a workspace bookmark rail (ah-ws-tag): a full-height, lightly tinted left column with an 11px folder icon and the workspace name (.82em, single-line ellipsis, full name on hover), icon aligned with the name and content horizontally centered, separated from the body by a hairline vertical rule; the session status is responsive (in a right-side status column at ≥960px, or below the name when narrower); width clamp(104px,16%,196px); when there is no workspace the same-width rail is kept. The vertical thermometer is removed; workspace-view cards already show the name as their title.
Motion (all of it stops under prefers-reduced-motion: reduce):
min(index, 8) × 20 ms stagger; filter chips cross-fade their fill and border; segmented controls cross-fade their fill.conic-gradient and brightens on hover.Performance trade-off: static cards never run backdrop-filter (a 50-row list stays smooth) — only the hovered card and the popover are truly frosted. The list fades at its edges with gradient masks instead of mask, so the frosted children are not broken.
This plugin is installed as a local directory or a GitHub repository; it is not published to npm (private: true).
# inside your DSH profile directory
cd ~/.dsh/profiles/<your-profile>
pnpm add github:MarkTina/dsh-activity-heat#v0.5.3
Pin a tag (#v0.5.3) rather than following main, so an unrelated commit cannot change what you run. To upgrade later, bump the tag and restart DSH.
The repository must be public; a private repo needs a token (https://<token>@github.com/... or an SSH remote) before pnpm add can fetch it.
Then append the package name to dsh.profile.bundles in that profile's package.json:
"@local/activity-heat"
First install normally activates through the host's HMR — if the row does not appear, restart DSH once. Updating an already-installed copy (same path, changed files) always needs a full quit-and-relaunch: a page refresh only reloads the UI, and toggling the plugin does not re-read changed modules.
Desktop profiles are managed by the Electron app. Install through its plugin manager (GitHub / local directory) rather than running
pnpminside~/.dsh/profiles/desktop— the app owns that directory and will reject or overwrite manual changes.
cd ~/.dsh/profiles/<your-profile>
pnpm add link:/absolute/path/dsh-activity-heat
Add @local/activity-heat to dsh.profile.bundles the same way.
Default Ctrl + Alt + H (Cmd + Alt + H on macOS) switches to the Recent Activity panel. Pressing it again while the panel is open returns you to the conversation you came from — the panel never replaces the session, so the toggle is a round trip.
Change it under Settings → Shortcuts, searching for “Recent Activity”.
You can also type /heat to open the panel (when the host mounts the command service).
Why not
Ctrl+H? The host treatsCtrl+C/V/X/Z/Y/Q/Has reserved system keys (browser history etc.), so a bareCtrl+Hdefault is rejected asreserved. Addingaltuses the web whitelist branch. For the same reason the plugin deliberately declares no Linux profile — on Linuxalt+controlis treated as reserved and would fail the whole registration. Linux users can bind a key in Settings.
Defaults live in cordis.patch.yml. To override, add a row with the same id to your profile's cordis.patch.yml (config is replaced whole, not deep-merged — write every field):
- id: activity-heat
config:
hotMinutes: 10 # blazing window (minutes)
warmMinutes: 60 # warm
activeMinutes: 360 # active
recentMinutes: 1440 # recent
staleDays: 7 # stale (hidden beyond this)
topCount: 8 # default rows in the panel
tickSeconds: 60 # heat decay refresh interval
showRowDots: true # show the heat dot before a session title
showHoverHeat: true # show the heat section in the hover card
Everything is read from public host snapshots — no private APIs, nothing written to the session log:
| Purpose | Source |
|---|---|
| Last activity time | sessions.list.byId[id].updatedAt (same as the sidebar row trailing time) |
| Title / draft / subagent / archive | the same title blank origin, plus workspaces.list.archivedSessionIds |
| Workspace membership | workspaces.list.items[].sessionIds (same mapping as the host groupByWorkspace) |
| Turns / steps | sessions.list.projectionsBySession[id].values.sessionStats.turns / .steps — the values the composer activity pill reads |
| Tokens | …values.tokenUsage — billed input (uncachedInputTokens + cacheReadTokens + cacheWriteTokens) plus outputTokens, the same whole-log total as the composer usage pill |
| Cache hit rate | …values.tokenUsage.cacheReadTokens / billed input, using the host's own rounding (a partial hit never displays as 100%) |
| Context usage | …values.contextPressure — projectedTokens ?? pressureTokens over contextWindow, the value the composer context meter reads |
| Session prompt | …values.contextTimeline (initialPrompt / lastUser / lastReply) — the status bar does not show prompts |
| Conversation time & breakdown | …values.contextTimeline.timing (wallMs / ttftMs / genMs / toolsMs and the generation subdivisions) — the same source and segmentation as the host timing panel |
| Session status | useSessionStatus snapshot: running / pendingInteraction.kind (approval / plan-review / question) / completionUnread; subagent count from …values.subagentCatalog combined with child running |
Excluded: archived sessions, subagent child sessions, blank draft sessions.
The package follows the DSH bundle layout: a Host entry, a Web client entry, one loader patch, and exported display resources.
dsh-activity-heat/
├── index.js Host half — open-terminal route (launches the system terminal); otherwise mount-only
├── client.js Web half — ModuleLoader factory, slots, locale
├── DESIGN.md Design charter — red lines; deviations in VETO-LIST.md
├── cordis.patch.yml Bundle patch — inserts the activity-heat row + defaults
├── locale/
│ ├── zh.json Plugin metadata + UI dictionary (Chinese)
│ └── en.json Plugin metadata + UI dictionary (English)
├── icon.svg Plugin icon (exported as ./icon)
├── test/ Dependency-free self-checks, run with node
├── package.json Manifest — dsh.bundle.patch, dsh.client, exports, files
├── README.md This file
├── README.zh.md Chinese README
├── CHANGELOG.md
└── LICENSE
Visible UI text is routed through the host Client locale service (ctx.locale), falling back to the bundled Chinese dictionary when the service is unavailable. The two locale JSON files carry the same keys; node test/locale.cjs keeps them and the inlined dictionary in sync.
Release builds log nothing. To trace the full chain, flip the switch at the top of client.js to true and reload the page:
var ACTIVITY_HEAT_DEBUG = false; // ← change to true
The repo ships dependency-free logic tests that load the real client.js against a minimal React stand-in — no browser required:
node test/panel.cjs # registration / sorting / filtering / rendering / click-through
node test/menu.cjs # right-click menu: actions, confirmation, export probe, capability fallback
node test/shortcut.cjs # shortcut defaults against host reserved-key rules
node test/boot-timing.cjs # restart timing: recovery when slots become ready late
node test/locale.cjs # locale dictionaries and metadata stay in sync
pnpm test runs all five.
Turns, tokens, cache hit rate and context usage read sessionStats, tokenUsage and contextPressure — the same projections as the composer status bar, so the numbers match it exactly. Profiles that only expose contextTimeline fall back to its values; in that case the figures can differ from the status bar.
No Linux default shortcut is declared; Linux users bind one in Settings.
The right-click menu does not delete sessions: the host only supports archiving, and archived sessions can be restored from the sidebar's archived view.
Running sessions' archive item becomes “Stop and archive…”: the dialog lists the running turn / subagents / jobs / schedules and stops them (irreversible) before archiving; the panel re-sorts by heat afterwards.
"Download session log" requires the host to mount dsh-session-log-export; without it the item reports unavailability instead of opening a 404 page.
The host's native sidebar rows expose no right-click event, but they do expose sidebar.workspaces.session.menu.item / .row.action seats; the plugin's terminal / copy / download actions live there, while pin / rename / fork / archive use the host's own items and the central panel keeps the full menu.
updatedAt is the host's last-activity snapshot and does not refresh with tool steps or streaming output; the panel treats running sessions as maximum heat, which does not mean they just received a message.
"Open in…" is implemented by the plugin's own Host routes: GET /activity-heat/open-with/apps probes installed apps that can open a directory (Windows: App Paths registry + common install paths + PATH; macOS: .app bundles; Linux: xdg-open), and POST /activity-heat/open-with/open launches with the target directory and reports the real outcome. The list is cached for 60s; if probing fails it falls back to the host open-in-app/apps.
On Windows, Git Bash / WSL are grouped as terminals (they open a shell in that directory). "Open in terminal" is implemented by POST /activity-heat/open-terminal; Windows tries Windows Terminal → PowerShell 7 → Windows PowerShell and reports a failure when none is available.
Waiting-for-approval / plan-review rely on the host pendingInteraction; older hosts expose only userQuestions, so both fall back to “Waiting”.
The right-sidebar dock and /heat require the host to mount sidebarRightTabs / commandUi; otherwise the entry is simply absent.
Batch-archiving a running session uses stopActivity; stopping is not reversible.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: session。