dsh-at-file
FSMargoo/dsh-at-fileCodex 风格的 `@file` 文件引用,输入框里直接搜索并引用工作区文件。
给 AI 编程 Agent 的轻量心情指示器——把会话行为(连续失败、重复调用、活动强度)折叠成四态 Mood(顺利 / 困惑 / 受挫 / 过载),以低干扰的会话头部状态灯呈现。
A tiny mood ring for your AI coding agent.
"Your agent doesn't have feelings. But its behavior does. It's not science. It's a mood ring."
dsh-mood watches how your AI coding agent is working — consecutive failures, repeating the same tool, activity level — and folds that into one simple four-state Mood, shown as a low-friction status light in the session header: doing fine 😊, confused 😕, frustrated 😤, overwhelmed 🤯.
Machine-readable project facts: llms.txt
After installing and refreshing dsh web, a status light appears beside the session header. Have the agent fail a few times and watch it go 😊 → 😤; a run of stable successes brings it back to 😊:
| Without dsh-mood | With dsh-mood |
|---|---|
| You guess whether the agent is fine or stuck by reading the log. | At a glance you see the current Mood, a verifiable why (e.g. 3 consecutive failures), and the session's mood journey. |
Coding agents are good at moving quickly — and just as good at getting stuck. Consecutive failures, repeating the same call, several abnormal signals at once. While you wait, the one thing you want to know is: does it look OK right now?
Mood is not magic. It is an interpretable behavior classification. Every Mood comes from observed signals and gives you a fixed, verifiable why. It never interrupts the workflow and never pretends to measure the model's inner psychology.
| Read progress at a glance | Catch stalls | Low-friction | Kind of fun |
|---|---|---|---|
| No log reading to see if things look normal. | Repeated failures / repeated actions get a hint. | It's a status light, not a dashboard. | Four faces + a session journey you don't mind glancing at. |
| Mood | Meaning | Observed signal |
|---|---|---|
| 😊 GOOD | Everything looks fine | steady useful results, no abnormal repetition |
| 😕 CONFUSED | Starting to spin | repeating the same / highly similar action |
| 😤 FRUSTRATED | Failing visibly | a short run of clear consecutive failures |
| 🤯 OVERWHELMED | Out of control / overloaded | high activity + failure + repetition together |
When several hold at once, priority is: 🤯 OVERWHELMED > 😤 FRUSTRATED > 😕 CONFUSED > 😊 GOOD. A normal, complex task is not flagged OVERWHELMED just for many tool calls — it requires several abnormal signals together.
flowchart LR
A["session/event (tool result / tool call)"] --> B["sliding window: failures · repeat · activity"]
B --> C{"several conditions hold?"}
C -- OVERWHELMED --> D["🤯 overwhelmed"]
C -- FRUSTRATED --> E["😤 frustrated"]
C -- CONFUSED --> F["😕 confused"]
C -- otherwise --> G["😊 good"]
D --> H["header status light + why + journey"]
E --> H
F --> H
G --> H
The state machine is a pure fold: session/event → MoodState → MoodProjection. The host computes it; the browser reads it directly via useProjection('mood'). No external dependencies, fully predictable.
😊 → 😤 → 😊), shown on hover.Invoke-WebRequest `
-Uri 'https://github.com/Raphaelutumn/dsh-mood/releases/latest/download/dsh-external-dsh-mood-0.1.0.tgz' `
-OutFile '.\dsh-mood-0.1.0.tgz'
dsh plugin --profile web add .\dsh-mood-0.1.0.tgz
When running from a DeepSeek Harness source checkout:
$env:DSH_HOME='D:\Deepseek harness\.dsh'
corepack pnpm --dir 'D:\Deepseek harness' dsh plugin --profile web add .\dsh-mood-0.1.0.tgz
git clone https://github.com/Raphaelutumn/dsh-mood.git
Set-Location .\dsh-mood
corepack pnpm install
corepack pnpm pack --pack-destination .
dsh plugin --profile web add .\dsh-external-dsh-mood-0.1.0.tgz
dsh plugin --profile web remove dsh-mood
If you run the DeepSeek Harness monorepo directly, the two packages
@deepseek-ai/dsh-mood(host) and@deepseek-ai/dsh-client-mood(client) are already wired intodsh-base/dsh-web-appand load with the default profile.
| Field | Default | Meaning |
|---|---|---|
confusedRepeatThreshold | 3 | consecutive occurrences of one tool that mean CONFUSED |
frustratedFailureThreshold | 3 | consecutive failures that mean FRUSTRATED |
overwhelmedSignalCount | 3 | whether high activity + failure + repetition are all present for OVERWHELMED |
stableSuccessesToRecover | 2 | consecutive successes required to return to GOOD |
changeCooldownMs | 60000 | how long before the same reason stops re-surfacing |
repetitionWindow | 12 | recent tool calls kept for repeat detection |
highActivityThreshold | 4 | window length treated as "high activity" |
Override in the profile's cordis.patch.yml:
- id: mood
config:
frustratedFailureThreshold: 5
stableSuccessesToRecover: 3
changeCooldownMs: 30000
All config values must be positive integers. Invalid config fails plugin load loudly rather than silently weakening behavior.
| Environment | Support & verification |
|---|---|
| Node.js 20 / 22 / 24 | matches DeepSeek Harness |
| DeepSeek Harness | host @deepseek-ai/dsh-mood + client @deepseek-ai/dsh-client-mood; standalone @dsh-external/dsh-mood |
| Session header UI | conversation.session.header.utilities slot (right-aligned, additive, never pollutes the message flow) |
Mood is a pure observer: it changes no model request, adds no prompt, and vetoes no tool. ctx.mood.snapshot(session) reads the current snapshot; mood/change events notify host-side consumers when the Mood changes.
No. It is a read-only behavior observer — no injected prompts, no call vetoing or rewriting. The status light lives only in the session header and never touches the message flow.
No. Mood is an interpretable behavior classification; every why comes from observed signals. It does not pretend to measure the model's mental state.
To avoid flipping on success/failure alternation. Upgrades are sensitive, recovery is conservative — that is the core anti-flash design.
Config-tunable for real-task calibration.@dsh-external/dsh-mood package here builds and serves against the current DeepSeek Harness source. The DSH packages published to npm are still at 0.0.1-rc.1 and do not yet expose the web-client APIs (conversation.session.header.utilities, useProjection) this plugin uses — so a standalone dsh plugin add of the browser half is not yet supported against the public npm stack. It runs inside the DeepSeek Harness monorepo and with the default web profile. We will publish standalone once the public client stack catches up. See packages/dsh-mood/README.md.Issues and clearly-scoped pull requests are welcome. Local verification:
corepack pnpm install
corepack pnpm test
corepack pnpm typecheck
corepack pnpm build
Behavior must be test-backed. The project has 32 tests (host 22 + client 10).