dsh-task-mode-switch
Manifest validSwitch a DSH task's Agent preset (mode) from the composer toolbar, including tasks that have already started. Features AUTO mode that selects a preset based on task content.
dsh-task-mode-switch
Switch a DeepSeek Harness task's Agent preset (mode) from the composer, including a task that has already started, plus AUTO, which picks one from the task text.
在 DeepSeek Harness 输入框工具栏切换任务的 Agent 模式(预设),包括已经在进行中的旧任务;另有 AUTO 按任务内容自动选择。
Install / 安装
dsh plugin --profile desktop add dsh-task-mode-switch # DSH Desktop
dsh plugin --profile web add dsh-task-mode-switch # dsh web
Or straight from the repository (the package sits at its root):
dsh plugin --profile desktop add https://github.com/StephenXiong001/dsh-task-mode-switch # DSH Desktop
dsh plugin --profile web add https://github.com/StephenXiong001/dsh-task-mode-switch # dsh web
Restart DSH, then open the + / tool row at the left of the composer: a mode control sits beside the permission and plan controls.
What you get / 功能
| 选择 | preset | 说明 |
|---|---|---|
| 标准模式 / Standard | standard | Everyday tasks: files, commands, search, subagents |
| PTC 模式 / PTC | ptc | Batches tool calls; bulk filtering, dedupe, aggregation |
| 极简模式 / Minimal | minimal | Smallest tool set, for comparisons and baselines |
| 创造模式 / Creator | cordis | Extends DSH: plugins, presets, skills |
| AUTO | — | Picks one of the above from the composer draft (keyword heuristic, local, no model call) |
Clicking a mode switches the task you are looking at, not just the default for new tasks. A separate menu row (「新任务默认模式 ▸」/ "Default for new tasks") writes the default for tasks created later, so the two actions can never be confused. While a turn is running the control refuses with an explanation; it never re-binds a composition mid-step.
New presets need no plugin update. The menu is drawn from the live roster: the four presets above keep their shipped icons and hints, and any additional preset a newer DSH registers is appended automatically, labeled with the name the preset publishes (or its id). Opening the menu re-reads the roster, so a preset added while the page is open shows up on the next click. AUTO still classifies only the four presets above; a preset it does not know is left alone.
The same switch is available as a slash command:
/mode # report the current preset and what can be switched to
/mode ptc # switch this task
How it works / 实现要点
- Composition. The shipped
agentPresets.selectRemote refuses a started session (agent-preset/locked). This bundle's Host half re-composes one through the registry's ownrecompose()entry (whose contract says "the caller owns the blank-session check") and therefore takes that responsibility itself: refuse while running, re-bind through the registry (never by touching scope internals, sotools/changeis announced), then appendagent-preset/selectedto the Session log, because a model-visible change must be logged. - Request series. Tool declarations are projected from the Session's recorded request series; a tool missing from it is announced as a deferred addition. A preset switch replaces the whole catalog, so every tool would be deferred, and providers reject a request whose tools are all deferred ("at least one tool must have defer_loading=false"). The plugin asks for a request-series restart on the first admitted step after a switch, via the documented
agent/pre-stepwaterfall andPreStepDecision.startsRequestSeries, the same field the shipped goal-round driver sets. - UI. One registration into
conversation.input.left, using the baseline@deepseek-ai/dsh-client-ui-primitivesMenu(ported popup) and theme tokens; no DOM of other plugins is touched, and no model-facing tool is registered (choosing a mode is a user-owned decision).
Caveats / 代价与限制
- Switching mid-task changes the tool catalog and prompt sections of that task; the next request restarts its request series, so that turn's KV cache is rebuilt from scratch. Earlier turns keep the tools they ran with.
- The switch relies on a registry entry whose caller owns the blank-session guard; the composition is only re-bound between turns.
- AUTO is a keyword heuristic over the draft. It never calls a model, and only ever picks a mode when at least one strong keyword matches; otherwise it keeps the current mode.
- Verified on DSH
0.2.2-rc.1(Windows desktop). A deployment without the Agent-preset registry has nothing to switch, and the control says so.
License
MIT. See LICENSE.
Comments
Loading…
Similar plugins
by WASD258-jpg
Force-switch the agent preset (mode) of a DSH session after it has started, bypassing the blank-only lock. /preset command, set_agent_preset tool, composer dropdown.
★ 0
JavaScript
Aug 15, 2026
dsh plugin --profile web add @wasd258/dsh-preset-forceby aefuimn
Hot-switch agent presets (working modes) inside a running DSH session: mode changes are armed immediately and applied at the next step boundary through agentPresets.recompose, via the /mode slash command.
★ 0
MIT
JavaScript
Aug 21, 2026
dsh plugin --profile web add dsh-agent-preset-switcherby Wakis-kaf
Defines DSH agent modes as real presets, each with its own persona, tool set and mounted plugins, including a pure mode that starts with no capability at all.
★ 0
MIT
JavaScript
Nov 17, 2026
dsh plugin --profile web add dsh-agents-modelsby timsok-shit
Switch agent presets in any DSH conversation — even ones that already have messages.
★ 0
JavaScript
Aug 19, 2026
dsh plugin --profile web add dsh-preset-switchBuild presets for DSH Agents: package personas, prompts, skills, tools and runtime contexts into reusable capability bundles. Each task loads only the components it requires.
★ 1
MIT
JavaScript
dsh plugin --profile web add dsh-my-agent-presetby titanwings
DSH 自动化插件:让 Coding 任务按计划在全新 Agent Session 中运行,并由用户或 Agent 创建和管理定时任务。 / Run coding tasks in fresh Agent sessions and manage schedules from DSH Web or an Agent.
★ 101
MIT
TypeScript
Sep 8, 2026
dsh plugin --profile web add @dsh-external/dsh-automation