fix: truncate persona list output to first line (multi-line prompts were dumping full text)

This commit is contained in:
2026-06-17 00:20:22 +02:00
parent 11bc5c44af
commit bc54f711e0
+4 -1
View File
@@ -149,7 +149,10 @@ 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))
}
b.WriteString("```\nUse /ai persona <name> to switch.")