dsh-agent-enhancer is a plugin for the official DeepSeek Harness (DSH) desktop client, current version 0.3.2 , MIT licensed. It adds prompt history, one-click prompt optimization, next-prompt prediction, conversation & file rollback, token usage billing, per-account balance, context inspection with one-click compaction, and Auto model routing. All entry points live inside the official session and settings UI β no separate window, no client replacement.
GitHub: https://github.com/rebornace/dsh-agent-enhancer ο½ npm: dsh-agent-enhancer
| Scenario | Feature | Notes |
|---|---|---|
| Recall a prompt already sent in this session | Prompt history | ββ to navigate,Alt+R to search; Enter fills the draft, does not send |
| A draft is too vague to execute | Prompt optimization | Fills in steps, scope and constraints; undoable; chips preserved |
| Not sure what to ask next | Next-prompt prediction | Gray suggestion after a reply, Tab to accept; one per turn |
| Need to go back to a previous turn | Conversation & file rollback | Preview before confirming; conversation only or conversation + tracked files; undoable |
| Need to see token spend and account balance | Token billing + per-account balance | Local summary, estimated "Β₯" from official pricing; balances shown separately |
| Need to inspect context usage | Context ring + details + compaction | Splits system prompt / tools / messages; one-click official /compact |
| Prefer not to pick a model tier manually | Auto routing | Maps to Instant / Thinking / Pro; optional small-model classifier |
| Need to update the plugin | In-app update check | npm installs can be updated from settings |
Prompt history: press β at the first line of the input box or β at the last line to browse prompts already sent in the currently loaded session; Esc exits. Alt+R opens search (on some environments Ctrl+R also works). Enter only fills the draft β it never sends.
One-click optimization: click the optimize button on the right side of the input. A vague draft is rewritten into a prompt with steps, scope and constraints; an already clear draft gets only minor edits. With a selection, only the selection is optimized. The result is undoable, and reference chips keep their content and order.
Next-prompt prediction: after each reply, a gray suggestion appears in the input; press Tab to accept. At most one per turn, and it disappears as soon as you start typing or switch sessions.
Next to a message (or from the checkpoint timeline in the right sidebar), click Restore to here. A preview shows what will be rolled back, which files are involved, and whether there are conflicts β nothing changes before you confirm.
Scope is conversation only or conversation + tracked files. After restore, that turn's user prompt is filled back into the draft, so you can edit and resend.
To revert, use Undo restore in the input + or / menu.
Restore only changes what is currently visible; the official session log and statistics stay intact.
Out of scope: processes, terminals, untracked files, binary files, external services.
Click the Token usage meter next to the session to open the right sidebar billing panel: input / output / cached-read token totals, trends over time, per-function share (history / optimize / predict / compaction / main chat), and per-model and per-call details. Time range: today / 7 days / 30 days / all time.
The estimated "Β₯" value is computed from official pricing as a reference, not a billing receipt.
Under Settings β Models, the DeepSeek account (Platform wallet) and API Key balance are shown separately, two decimal places, refreshable on click.
An occupancy ring in the session shows how much of the context window is used.
Click into the details: system prompt / tools / messages listed separately.
When you need to free space, trigger the official compact (/compact) directly.
Choose Auto in the model list; auxiliary requests (optimize / predict / compaction) can also be set to Auto or pinned to a specific model.
In settings, map Auto to Instant / Thinking / Pro tiers.
Default decisions use built-in Chinese/English heuristics. An optional small-model classifier can be enabled; when it fails, routing falls back to the heuristic and does not block the main request.
For npm installs, check for updates directly in Settings β Built-in plugins β Agent Enhance.
Local link installs are given manual step instructions instead.
Recalling an earlier prompt
In a long session, Alt+R to search by keyword, Enter to fill the draft, edit, then resend.
Completing a vague draft
Type a short request, click optimize, and get a prompt with inputs/outputs, edge cases and acceptance criteria before asking the agent to act.
Going back to a previous turn
If the agent went in the wrong direction, click Restore to here, review the preview (conversation only or with files), confirm to go back; if you change your mind, use undo restore.
Checking cost distribution
Open the billing panel, inspect the 30-day token share by function and model, then move auxiliary requests onto a cheaper model.
Handling high context usage
When the occupancy ring is high, inspect the breakdown in details, or run compaction.
Official desktop app (recommended): open Settings β Plugins, search dsh-agent-enhancer or "Agent Enhance", install, then fully quit and restart the desktop client.
CLI (if you have the dsh CLI):
dsh plugin --profile desktop add dsh-agent-enhancer@0.3.2
Notes:
The plugin targets the Desktop (desktop) profile. Do not install into the web profile β the command may report success, but the desktop client will not load it.
Compatibility: DSH Desktop 0.2.2-rc.1 and above (>=0.2.2-rc.1 <0.3.0-0), Node ^22.19.0 || >=24.0.0.
If you previously installed the old package dsh-composer-enhancer, uninstall it first.
Quit all desktop windows and tray processes before installing / upgrading / uninstalling.
All capabilities are on by default and can be toggled individually in Settings β Built-in plugins β Agent Enhance.
Supported environment: official DSH desktop client (desktop profile), version 0.2.2-rc.1+.
Rollback does not cover processes, terminals, untracked files, binary files or external services; scope is conversation only, or conversation plus tracked text files.
The estimated "Β₯" and context detail values are approximations, not exact billing figures.
Optimization sends the draft or selection plus the latest completed turn; prediction sends the latest completed turn. Disable the corresponding capability in settings if you do not want that.
Balance queries use the desktop client's stored credentials; the plugin itself does not store API keys.
dsh-agent-enhancer adds prompt, rollback, usage/context and model-routing capabilities inside the official desktop UI. The code is MIT licensed, data is processed locally, and there is no telemetry upload. Details and the full changelog are in the repository README and CHANGELOG.