Skip to content

fix: show agent descriptions in @ autocomplete menu - #35321

Closed
lotgzy wants to merge 1 commit into
anomalyco:devfrom
lotgzy:fix/agent-autocomplete-description
Closed

lotgzy wants to merge 1 commit into
anomalyco:devfrom
lotgzy:fix/agent-autocomplete-description

Conversation

@lotgzy

@lotgzy lotgzy commented Jul 4, 2026

Copy link
Copy Markdown

Problem

When typing @ in the TUI prompt, the autocomplete menu shows agent names but not their descriptions. This makes it hard to know what each agent does without memorizing them or checking the config.

Root Cause

The agents createMemo in packages/tui/src/component/prompt/autocomplete.tsx creates AutocompleteOption objects without the description field, even though:

  1. AutocompleteOption type supports description?: string
  2. The rendering code already renders descriptions via <Show when={option().description}>
  3. All other option sources (commands, referenceAliases, mcpResources) already pass description

Fix

One-line change: add description: agent.description to the agent AutocompleteOption mapping.

Before

(agent): AutocompleteOption => ({
    display: "@" + agent.name,
    onSelect: () => { ... },
})

After

(agent): AutocompleteOption => ({
    display: "@" + agent.name,
    description: agent.description,
    onSelect: () => { ... },
})

Verification

The rendering logic (lines at bottom of the file) already handles descriptions:

<Show when={option().description}>
    <text ...>
        {" " + option().description?.trimStart()}
    </text>
</Show>

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Jul 4, 2026
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Jul 4, 2026
@github-actions github-actions Bot closed this Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant