5.0 KiB
description, kind
| description | kind |
|---|---|
| Plan-mode status chip for the Web GUI: the composer control that shows plan mode is on and turns it off; for users and maintainers of plan mode. | package-reference |
@deepseek-ai/dsh-client-ui-plan
English | 中文
Summary
This package renders the plan-mode status chip in the Web GUI: when the host-computed projection's effective target is plan mode, the composer shows a warn-colored "Plan ×" button that turns plan mode off; otherwise the seat stays empty. Plan mode itself — the /plan command, the committed plan/mode state, the projection unit, and the policy section — belongs to dsh-plan-mode; this package only renders the projection and sends what a user could equally type. The model exits plan mode through the stable exit_plan_mode tool; its plan review uses the composed Web question channel.
Table of Contents
- Use this package
- Understand the implementation
- Further Exploration
- Model Experience
- Known Limitations and Deferred Work
- Dev Note
Use this package
Mount this plugin alongside ui-conversation and dsh-plan-mode; the chip then occupies the composer's plan seat to the right of the access-mode control whenever plan mode is active. Enter plan mode through the /plan command path — choose Plan from the composer's + Command menu or type /plan — and turn it off with the chip.
What the chip shows
While the effective target is plan mode, the seat renders the warn-colored "Plan ×" status button, which executes /plan off. Otherwise the seat stays empty: a host without plan mode, or a Draft with no session, shows nothing. While plan mode is the effective target, the composer textarea's placeholder switches to the plan-task hint — "describe your task to generate plan" — unless the owning surface supplies its own placeholder.
Failures
Admission failures (matched: false, business errors, transport faults) surface as an inline error and the chip stays until the projection confirms the exit.
Understand the implementation
Implementation internals — click to expand
The chip occupies the conversation-declared conversation.input.plan single seat; the node half is an empty apply (the roster row). Reads ride the generic projection pair through the standard-kit useProjection: the effective target is pending ? !active : active — a folded host value, not client optimism, so an arriving frame corrects the chip either way. The seat's injected face carries one verb, exitPlanMode, which executes /plan off through ctx.remote.commands.execute and maps admission failures to an inline error line. The placeholder and hint text live in ui-conversation's conversation locale namespace and are shared verbatim with the claimed /plan command hint. The accessible description is "Plan mode on, press to turn off".
Further Exploration
Read these pages when the plan surface is not enough. They move from the chip to the plan-mode domain and the composer shell.
- dsh-plan-mode — owns plan mode, the
/plancommand, the projection, and the policy section. - ui-conversation — declares the composer's
conversation.input.planseat and the placeholder locale keys. - Tool catalog — the
exit_plan_modetool schema the model uses to leave plan mode. - Client package map — adjacent browser UI packages.
Model Experience
Indirectly, through the /plan off command line the chip dispatches: dsh-plan-mode owns the model-visible policy section, the exit-tool schema, and the logged state that line drives.
KV Cache effect
Entering or leaving plan mode changes the active plan:policy system-prompt section and therefore the request prefix; the chip itself adds no prompt content.
Known Limitations and Deferred Work
These limits define the current plan chip. They are current package constraints, not a plan-mode comparison or a task backlog.
- Plan mode is guidance, not an execution sandbox — deployments that require enforced read-only planning must compose the independent sandbox and approval policies.
- The chip belongs to the default composer — a pending whole-composer interaction such as plan review temporarily replaces the InputBar and its chip.
- No inactive plan control — entry uses the shared Command source; a session with the capability but inactive mode shows no plan affordance in the tool row.
Dev Note
Working context for maintainers — click to expand
None.