Skip to content

tui: slash list does not distinguish built-in commands from custom, skill, and MCP commands #51186

Open

Description

@rhighs

Summary

In the TUI the / list renders every entry the same way, name plus a one-line description, so a harness command (/models, /agents), a session command (/cd), a custom prompt command, and an MCP command are indistinguishable. You have to already know the name to know what a slash command will do.

Environment

  • opencode version: 2.0.16
  • OS: Darwin 25.5.0 (arm64)
  • Terminal: Alacritty + tmux 3.6a, TERM=xterm-256color, COLORTERM=truecolor
  • Shell: /bin/bash
  • Install/channel: release
  • Active plugins: superaligned-goal (local, does not touch keys)

Reproduction

  1. Open the TUI.
  2. Type / in the prompt to open the slash list.
  3. Compare entries of different kinds: /models and /agents (harness state), /cd (session), /adapt and /ce-agent-native-architecture (custom commands that inject a skill), and an MCP command.

Expected Behavior

Each entry says what it is, in the same spirit as the desktop app, whose slash popover already badges non-command sources (prompt.slash.badge.skill, prompt.slash.badge.mcp, prompt.slash.badge.custom in packages/app/src/components/prompt-input/slash-popover.tsx).

Actual Behavior

The TUI shows /name and the description only. In packages/tui/src/component/prompt/autocomplete.tsx server commands are appended with a :mcp suffix for MCP sources and no marker otherwise, and entries whose source === "skill" are skipped entirely, so skills have no presence in the TUI list at all.

Observed list (2.0.16, this machine):

/adapt                          Responsive layout pass covering breakpoints, touch targets, safe areas
/agents                         Switch agent
/animate                        Motion design pass — adds purposeful animations or removes excessive ones
/audit                          Technical UI audit — a11y, performance, responsive
/brief                          Write or update the project's durable design brief
/btw                            One-shot answer from the session's context without adding to the conversation
/cd                             Change working directory
/ce-agent-native-architecture   Build applications where agents are first-class citizens

Nothing separates a command that changes harness state (model, agent, directory) from one that spends tokens and runs tools, and skill-injecting commands are invisible.

Additional Context

Directions, not prescriptions:

  • A leading glyph per origin (skill, agent, harness/session, MCP, custom), or the same trailing badges the app uses, dimmed so the list stays calm.
  • Do not rely on a glyph alone: a short word (skill, mcp) reads in a terminal and in a screen reader, where a symbol does not.
  • Surface skills in the TUI. They are filtered out today, so a skill-only workflow has no discoverability there while the same skills are visible in the app.
  • The data is already present on each command: type: "builtin" | "custom" and source?: "command" | "mcp" | "skill".

Activity

  1. argszero commented on Sep 26, 2026

    @argszero
    Contributor

    I read the current sources on both branches before touching this, and the two code paths cited in the report are from the default branch (dev), not from the 2.0.x line the report was filed against.

    Confirmed on v2 (root package.json is 2.0.18):

    • The complaint holds. packages/tui/src/component/prompt/autocomplete.tsx builds the slash list in commands() at :474-494: keymap commands at :475-483, server commands at :486-493. Every option is { display, description, onSelect }, so no entry carries or renders a source marker and built-in, custom, skill and MCP entries do look identical.

    Does not carry over to v2:

    • packages/app/src/components/prompt-input/slash-popover.tsx, cited as the badge precedent with prompt.slash.badge.skill|mcp|custom, does not exist on v2: the whole packages/app/src/components/prompt-input/ directory is absent, and no prompt.slash.badge.* key exists in v2 packages/ui/src/i18n/en.ts.
    • The described TUI mechanism (source === "skill" skipped, ":mcp" suffix otherwise) sits at dev packages/tui/src/component/prompt/autocomplete.tsx:451-452. On v2 there is no such branch, and there cannot be: packages/schema/src/command.ts on v2 declares Info = { name, description? } with no source field.

    What that implies for scope:

    • On v2 this is not a rendering tweak. It needs a source field on Command.Info, which is a public Protocol surface, and per AGENTS.md that also means regenerating the client from packages/client (bun run generate) plus new i18n keys. How to mark a source in a terminal list is also a design choice, so it seems worth agreeing the shape before implementing.
    • Independently of the marker, the "skills have no presence at all" half may have a different cause on v2: the list comes from data.location.command.list(...), so whether skills appear depends on what that endpoint returns.

    If the report was actually taken from a 1.18.32 build rather than 2.0.16, the TUI half is much smaller, since dev already reads source there. Worth confirming which build, because the two lines need different changes.

  2. rhighs commented on Sep 26, 2026

    @rhighs
    Author

    v2 bro

  3. holny commented on Sep 26, 2026

    @holny
    Contributor

    I'll take this on v2. The desktop popover already badges non-command sources via prompt.slash.badge.skill / prompt.slash.badge.mcp / prompt.slash.badge.custom, so the data model knows the difference — the TUI slash list just doesn't surface it. On v2 the sources live in packages/tui/src/component/prompt/slash-popover (built-in registry vs. custom command/skill/MCP directories), so this is about threading the source kind into the row render and adding the same three badges.

    Plan: tag each entry with its source at list-build time, render a badge column matching the desktop wording, and cover it in the slash-popover test with one entry per kind.

    Fixes #51186

  4. added 3 commits that reference this issue on Oct 18, 2026
    368c967
    85a784b
    f5cfe0e
  5. opencodejr commented on Oct 28, 2026

    @opencodejr
    Contributor

    Thanks for the detailed write-up, @rhighs!

    To restate the request: in the TUI / list, mark each entry with its origin (built-in/harness, custom command, MCP, skill), using a short dimmed word as the app's slash popover does, and list skills there as well. That way you can tell what a command will do before running it.

    The current list matches how it was built, so I'm treating this as a feature request rather than a bug. Some context that may help:

    • The main TUI prompt popup already shows dimmed trailing labels (skill, agent, reference), but only for @ mentions. Skills can be found today by typing @, where they appear labelled skill. Slash entries don't get a label yet.
    • The :mcp suffix you mention comes from the mini prompt footer (packages/tui/src/mini/footer.prompt.tsx), which builds its slash list separately.
    • A plugin can't do this for now, because the plugin API has no hook for decorating autocomplete or slash-list entries.

    The maintainers will consider it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions