Skip to content

Feature: Add tui_help tool for on-demand command reference #1708

@wangdayong228

Description

@wangdayong228

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:

  1. Reason from incomplete prompt fragments → hallucinates
  2. 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions