fix: truncate persona list output to first line (multi-line prompts were dumping full text)
This commit is contained in:
+4
-1
@@ -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.")
|
||||
|
||||
Reference in New Issue
Block a user