diff --git a/internal/llm/agent/agent.go b/internal/llm/agent/agent.go index 799cec2e67cc1cdc433903081da86db68ae31e99..ec48fc2956ac5ed3baa031ba2ed4b2f905b65ae0 100644 --- a/internal/llm/agent/agent.go +++ b/internal/llm/agent/agent.go @@ -326,7 +326,13 @@ func (a *agent) generateTitle(ctx context.Context, sessionID string, content str return fmt.Errorf("no response received from title provider") } - title := strings.TrimSpace(strings.ReplaceAll(finalResponse.Content, "\n", " ")) + title := strings.ReplaceAll(finalResponse.Content, "\n", " ") + + if idx := strings.Index(title, ""); idx > 0 { + title = title[idx+len(""):] + } + + title = strings.TrimSpace(title) if title == "" { return nil }