[PR #12469] fix(tui): truncate agent descriptions in dialog #14230

Open
opened 2026-02-16 18:19:02 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/12469

State: open
Merged: No


Problem

Fixes #4825

When creating agents with opencode agent create, the generated descriptions are very long (meant for the model to understand when to use the agent). These descriptions break the /agents dialog layout, making it impossible to read.

Solution

Added truncation for agent descriptions in the agent selection dialog. Descriptions are now capped at 60 characters with an ellipsis (…) appended when needed.

Changes

  • dialog-agent.tsx: Added truncate() helper function
  • Descriptions longer than 60 chars are now truncated with '…'

Screenshots

Before: Agent descriptions wrap multiple lines, breaking the dialog

After: Clean single-line descriptions that fit the dialog

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/12469 **State:** open **Merged:** No --- ## Problem Fixes #4825 When creating agents with `opencode agent create`, the generated descriptions are very long (meant for the model to understand when to use the agent). These descriptions break the `/agents` dialog layout, making it impossible to read. ## Solution Added truncation for agent descriptions in the agent selection dialog. Descriptions are now capped at 60 characters with an ellipsis (…) appended when needed. ## Changes - `dialog-agent.tsx`: Added `truncate()` helper function - Descriptions longer than 60 chars are now truncated with '…' ## Screenshots Before: Agent descriptions wrap multiple lines, breaking the dialog After: Clean single-line descriptions that fit the dialog
yindo added the pull-request label 2026-02-16 18:19:02 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14230