{"slug": "dsh-agent-enhancer-0-3-2-prompts-rollback-token-billing-and-auto-model-routing", "title": "DSH Agent Enhancer 0.3.2: prompts, rollback, token billing and Auto model routing for the DeepSeek Harness desktop", "summary": "A developer released dsh-agent-enhancer 0.3.2, an MIT-licensed plugin for the official DeepSeek Harness (DSH) desktop client that adds prompt history, one-click prompt optimization, next-prompt prediction, conversation and file rollback, token usage billing, per-account balance display, context inspection with one-click compaction, and Auto model routing. All features are exposed inside the existing session and settings UI rather than a separate window, and the plugin is distributed via GitHub and npm.", "body_md": "`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.\n\nGitHub:  `https://github.com/rebornace/dsh-agent-enhancer`  ｜ npm:  `dsh-agent-enhancer`\n\n| Scenario | Feature | Notes | \n|---|---|---|\n| Recall a prompt already sent in this session | Prompt history | `↑↓` to navigate,`Alt+R` to search; Enter fills the draft, does not send | \n| A draft is too vague to execute | Prompt optimization | Fills in steps, scope and constraints; undoable; chips preserved | \n| Not sure what to ask next | Next-prompt prediction | Gray suggestion after a reply, `Tab` to accept; one per turn | \n| Need to go back to a previous turn | Conversation & file rollback | Preview before confirming; conversation only or conversation + tracked files; undoable | \n| Need to see token spend and account balance | Token billing + per-account balance | Local summary, estimated \"¥\" from official pricing; balances shown separately | \n| Need to inspect context usage | Context ring + details + compaction | Splits system prompt / tools / messages; one-click official `/compact` | \n| Prefer not to pick a model tier manually | Auto routing | Maps to Instant / Thinking / Pro; optional small-model classifier | \n| Need to update the plugin | In-app update check | npm installs can be updated from settings | \n\n**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.\n\n**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.\n\n**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.\n\nNext 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.\n\nScope 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.\n\nTo revert, use **Undo restore** in the input `+` or `/` menu.\n\nRestore only changes what is currently visible; the official session log and statistics stay intact.\n\nOut of scope: processes, terminals, untracked files, binary files, external services.\n\nClick 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**.\n\nThe estimated \"**¥**\" value is computed from official pricing as a reference, not a billing receipt.\n\nUnder **Settings → Models**, the DeepSeek account (Platform wallet) and API Key balance are shown separately, two decimal places, refreshable on click.\n\nAn **occupancy ring** in the session shows how much of the context window is used.\n\nClick into the **details**: system prompt / tools / messages listed separately.\n\nWhen you need to free space, trigger the official **compact** (`/compact`) directly.\n\nChoose **Auto** in the model list; auxiliary requests (optimize / predict / compaction) can also be set to Auto or pinned to a specific model.\n\nIn settings, map Auto to **Instant / Thinking / Pro** tiers.\n\nDefault 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.\n\nFor npm installs, check for updates directly in **Settings → Built-in plugins → Agent Enhance**.\n\nLocal link installs are given manual step instructions instead.\n\n**Recalling an earlier prompt**\n\nIn a long session, `Alt+R` to search by keyword, Enter to fill the draft, edit, then resend.\n\n**Completing a vague draft**\n\nType a short request, click optimize, and get a prompt with inputs/outputs, edge cases and acceptance criteria before asking the agent to act.\n\n**Going back to a previous turn**\n\nIf 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.\n\n**Checking cost distribution**\n\nOpen the billing panel, inspect the 30-day token share by function and model, then move auxiliary requests onto a cheaper model.\n\n**Handling high context usage**\n\nWhen the occupancy ring is high, inspect the breakdown in details, or run compaction.\n\n**Official desktop app (recommended)**: open **Settings → Plugins**, search `dsh-agent-enhancer` or \"Agent Enhance\", install, then fully quit and restart the desktop client.\n\n**CLI** (if you have the `dsh` CLI):\n\n```\ndsh plugin --profile desktop add dsh-agent-enhancer@0.3.2\n```\n\nNotes:\n\nThe 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.\n\nCompatibility: **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`.\n\nIf you previously installed the old package `dsh-composer-enhancer`, uninstall it first.\n\nQuit all desktop windows and tray processes before installing / upgrading / uninstalling.\n\nAll capabilities are on by default and can be toggled individually in **Settings → Built-in plugins → Agent Enhance**.\n\nSupported environment: official DSH desktop client (desktop profile), version 0.2.2-rc.1+.\n\nRollback does not cover processes, terminals, untracked files, binary files or external services; scope is conversation only, or conversation plus tracked text files.\n\nThe estimated \"¥\" and context detail values are approximations, not exact billing figures.\n\nOptimization 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.\n\nBalance queries use the desktop client's stored credentials; the plugin itself does not store API keys.\n\n`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.", "url": "https://wpnews.pro/news/dsh-agent-enhancer-0-3-2-prompts-rollback-token-billing-and-auto-model-routing", "canonical_source": "https://dev.to/rebornace/dsh-agent-enhancer-032-prompts-rollback-token-billing-and-auto-model-routing-for-the-deepseek-264h", "published_at": "2026-11-05 14:37:39+00:00", "updated_at": "2026-11-05 14:49:39.593546+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "developer-tools", "large-language-models"], "entities": ["DeepSeek Harness", "dsh-agent-enhancer", "DeepSeek", "GitHub", "npm"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/dsh-agent-enhancer-0-3-2-prompts-rollback-token-billing-and-auto-model-routing", "markdown": "https://wpnews.pro/news/dsh-agent-enhancer-0-3-2-prompts-rollback-token-billing-and-auto-model-routing.md", "text": "https://wpnews.pro/news/dsh-agent-enhancer-0-3-2-prompts-rollback-token-billing-and-auto-model-routing.txt", "jsonld": "https://wpnews.pro/news/dsh-agent-enhancer-0-3-2-prompts-rollback-token-billing-and-auto-model-routing.jsonld"}}