fix: indent multi-line persona descriptions in list output instead of truncating

This commit is contained in:
2026-06-17 00:21:01 +02:00
parent bc54f711e0
commit 6b68b13039
+3 -5
View File
@@ -149,11 +149,9 @@ func (p *Plugin) listPersonas() string {
b.WriteString("Available personas:\n\n```\n")
for _, id := range ids {
desc := personaLibrary[id]
// Only show the first line — the full prompts are multi-line now.
if idx := strings.Index(desc, "\n"); idx > 0 {
desc = desc[:idx]
}
b.WriteString(fmt.Sprintf(" %-12s %s\n", id, desc))
// Indent continuation lines so multi-line descriptions stay readable.
indented := strings.ReplaceAll(desc, "\n", "\n "+strings.Repeat(" ", 14))
b.WriteString(fmt.Sprintf(" %-12s %s\n", id, indented))
}
b.WriteString("```\nUse /ai persona <name> to switch.")
return b.String()