We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9de6070 commit 302d032Copy full SHA for 302d032
1 file changed
pkg/tui/dialog/tools.go
@@ -68,14 +68,14 @@ func (d *toolsDialog) renderLines(contentWidth, _ int) []string {
68
}
69
70
name := lipgloss.NewStyle().Foreground(styles.Highlight).Render(" " + t.DisplayName())
71
- if t.Description != "" {
+ if desc, _, _ := strings.Cut(t.Description, "\n"); desc != "" {
72
separator := " • "
73
separatorWidth := lipgloss.Width(separator)
74
nameWidth := lipgloss.Width(name)
75
availableWidth := contentWidth - nameWidth - separatorWidth
76
if availableWidth > 0 {
77
- desc := toolcommon.TruncateText(t.Description, availableWidth)
78
- name += styles.MutedStyle.Render(separator + desc)
+ truncated := toolcommon.TruncateText(desc, availableWidth)
+ name += styles.MutedStyle.Render(separator + truncated)
79
80
81
lines = append(lines, name)
0 commit comments