* wip(v0.7.7): handoff baseline of partial sub-agent stabilization Captures uncommitted work-in-progress on the v0.7.7 stabilization lane so subsequent fixes have a stable starting point. Subsequent commits finish the canonical SubAgentJob/SwarmJob model, fix sidebar/transcript/ footer agreement, copy/paste/cancel contract, checklist rendering, shell summary preservation, monotonic spend, and version provenance. Refs #235 #236 #237 #238 #239 #240 #241 #242 #243 #244 #245 * release: bump workspace version to 0.7.7 (#245) Refs #245 * fix(v0.7.7): canonical swarm card binding, monotonic spend, checklist + shell summary - Add `swarm_card_index: HashMap<swarm_id, history_index>` so overlapping fanouts each project to their own FanoutCard. Eliminates the screenshot contradiction where a stale background swarm's progress clobbered a newer card (#236, #238). - Suppress fanout-class tools (`agent_swarm`, `spawn_agents_on_csv`, `rlm`, `agent_spawn`) from `active_tool_status_label` so the footer no longer reports "tool agent_swarm · 1 active" while sidebar+card show the actual worker counts (#236, #238). - Add `App::displayed_session_cost` + `displayed_cost_high_water` so the visible session+sub-agent total is monotonic across reconciliation events (cache discounts, provisional → final). New tests: monotonicity under negative reconciliation; duplicate dedup keeps display steady (#244). - Preserve high-signal summary lines from the truncated tail of shell output: `test result:`, `failures:`, `error[E…]`, `Finished`, `Compiling`, panic markers. Stops the agent re-running cargo gates just to see pass/fail under truncation (#242). - Render `checklist_write` / `todo_*` results as a purpose-built checklist card with completed/total + percent header, per-item status markers, and a collapsing affordance for long lists. Plumbed through the existing `GenericToolCell` so no new variant threading is needed (#241). Refs #236 #238 #241 #242 #244 * fix(v0.7.7): Esc clears active tool entries optimistically (#243) When Esc cancels the foreground turn we now finalize the active cell immediately rather than waiting for the engine's TurnComplete echo to drain. This stops the footer "tool ... · X active" chip from briefly contradicting the cancelled state, and frees the composer for the next message. Background `block:false` swarms are intentionally NOT killed here — they remain durable, tracked through `swarm_jobs` and `swarm_card_index` so their FanoutCard updates as workers land. Subsequent `swarm_status` / `swarm_result` / `swarm_cancel` tool calls see the canonical store. New focused test verifies: after Esc, `active_cell` is None, the background swarm record is preserved, and `is_loading` is cleared so the composer can submit immediately. Refs #243 * fix(v0.7.7): Windows .exe lookup + post-turn snapshot detach (#247, #234) #247 — npm-distributed Windows package failed at runtime because the Rust dispatcher's `delegate_to_tui` / `delegate_simple_tui` looked for a sibling named exactly "deepseek-tui", while the actual file shipped by `scripts/install.js` is `deepseek-tui.exe`. Replace both lookups with `locate_sibling_tui_binary`, which: - Honours `DEEPSEEK_TUI_BIN` for explicit overrides - Tries `deepseek-tui{EXE_SUFFIX}` first (`.exe` on Windows, "" elsewhere) - Falls back to suffix-less `deepseek-tui` on Windows so users who applied the issue's manual workaround still launch successfully - Emits a platform-correct error path in the bail message Tests: `sibling_tui_candidate_picks_platform_correct_name`, `sibling_tui_candidate_windows_falls_back_to_suffixless` (windows-only), `locate_sibling_tui_binary_honours_env_override`. #234 — Detach the post-turn workspace snapshot so `git add -A && git commit` no longer pins the engine loop after `Event::TurnComplete`. The snapshot still runs on `tokio::task::spawn_blocking`, but the engine no longer awaits its `JoinHandle`, so the UI accepts input (text, copy, paste, selection) without waiting for the bookkeeping to finish. Cycle advance and pre-turn snapshot remain awaited — they are correctness-sensitive and the cycle path already emits a status chip ("↻ context refreshing…") so the user has visible feedback. Refs #234 #247 * chore(v0.7.7): bump npm package version 0.7.6 → 0.7.7 Required by `scripts/release/check-versions.sh` ("Version drift" CI gate); the workspace was bumped to 0.7.7 but `npm/deepseek-tui/package.json` still reported 0.7.6, blocking PR #246 from going green. Refs #245
3.8 KiB
Modes and Approvals
DeepSeek TUI has two related concepts:
- TUI mode: what kind of visible interaction you're in (Plan/Agent/YOLO).
- Approval mode: how aggressively the UI asks before executing tools.
TUI Modes
Press Tab to complete composer menus, queue a draft as a next-turn follow-up
while a turn is running, or cycle through the visible modes when the composer is
otherwise idle: Plan → Agent → YOLO → Plan.
Press Shift+Tab to cycle reasoning effort.
- Plan: design-first prompting. Read-only investigation tools stay available; shell and patch execution stay off. Use this when you want to think out loud and produce a plan to hand to a human (yourself later, or a reviewer).
- Agent: multi-step tool use. Approvals for shell and paid tools (file writes are allowed without a prompt).
- YOLO: enables shell + trust mode and auto-approves all tools. Use only in trusted repos.
All three modes have access to the rlm_query tool — a structured tool call that fans out 1–16 cheap parallel children on deepseek-v4-flash. The model reaches for it when work is decomposable.
Compatibility Notes
/normalis a hidden compatibility alias that switches toAgent.- Older settings files with
default_mode = "normal"still load asagent; saving rewrites the normalized value.
Escape Key Behavior
Esc is a cancel stack, not a mode switch.
- Close slash menus or transient UI first.
- Cancel the active request if a turn is running.
- Discard a queued draft if the composer is empty.
- Clear the current input if text is present.
- Otherwise it is a no-op.
Approval Mode
You can override approval behavior at runtime:
/config
# edit the approval_mode row to: suggest | auto | never
Legacy note: /set approval_mode ... was retired in favor of /config.
suggest(default): uses the per-mode rules above.auto: auto-approves all tools (similar to YOLO approval behavior, but without forcing YOLO mode).never: blocks any tool that isn't considered safe/read-only.
Small-Screen Status Behavior
When terminal height is constrained, the status area compacts first so header/chat/composer/footer remain visible:
- Loading and queued status rows are budgeted by available height.
- Queued previews collapse to compact summaries when full previews do not fit.
/queueworkflows remain available; compact status only affects rendering density.
Workspace Boundary and Trust Mode
By default, file tools are restricted to the --workspace directory. Enable trust mode to allow file access outside the workspace:
/trust
YOLO mode enables trust mode automatically.
MCP Behavior
MCP tools are exposed as mcp_<server>_<tool> and use the same approval flow as built-in tools. Read-only MCP helpers may auto-run in suggestive approval modes; MCP tools with possible side effects require approval.
See MCP.md.
Related CLI Flags
Run deepseek --help for the canonical list. Common flags:
-p, --prompt <TEXT>: one-shot prompt mode (prints and exits)--model <MODEL>: when using thedeepseekfacade, forward a DeepSeek model override to the TUI--workspace <DIR>: workspace root for file tools--yolo: start in YOLO mode-r, --resume <ID|PREFIX|latest>: resume a saved session-c, --continue: resume the most recent session--max-subagents <N>: clamp to1..=20--no-alt-screen: run inline without the alternate screen buffer--mouse-capture/--no-mouse-capture: opt in or out of internal mouse scrolling, transcript selection, and right-click context actions. Mouse capture is enabled by default when the alternate screen is active; use--no-mouse-capturewhen you need terminal-native drag selection.--profile <NAME>: select config profile--config <PATH>: config file path-v, --verbose: verbose logging