Problem
DeepSeek TUI's system prompt includes Mode/Approval-Policy labels but no reference to its own built-in slash-commands (/mode, /config, /approval, /compact, etc.).
When a user asks "how do I switch modes?", the agent must either:
- Reason from incomplete prompt fragments → hallucinates
- Run deepseek --help ad-hoc → wastes time and often doesn't occur to the agent
Proposal: tui_help — an on-demand retrieval tool
Add a tool following the diagnostics pattern:
tui_help(query: "mode" | "approval" | "compact" | ...)
- tui_help("mode") → returns commands for switching Plan/Agent/YOLO
- tui_help("approval") → returns approval-policy commands
- tui_help("") → returns a cheatsheet of common slash-commands
- Implementation reads from the CLI binary, single source of truth
Why on-demand > static prompt injection
| Aspect |
Static injection |
tui_help |
| Token cost |
Wasted every session |
Only when queried |
| Precision |
Full help, many irrelevant commands |
Scoped to query |
| Freshness |
Two copies drift |
Live from binary |
Fits existing pattern
diagnostics and doctor already exist for self-inspection. tui_help extends this cleanly.
deepseek-tui 0.8.37 (4c32a31)
Problem
DeepSeek TUI's system prompt includes Mode/Approval-Policy labels but no reference to its own built-in slash-commands (/mode, /config, /approval, /compact, etc.).
When a user asks "how do I switch modes?", the agent must either:
Proposal: tui_help — an on-demand retrieval tool
Add a tool following the diagnostics pattern:
Why on-demand > static prompt injection
Fits existing pattern
diagnostics and doctor already exist for self-inspection. tui_help extends this cleanly.
deepseek-tui 0.8.37 (4c32a31)