fix(agent): use semicolon as separator in history annotation to avoid ambiguity with IDs

This commit is contained in:
Dmitrii Balabanov 2026-03-23 11:30:04 +02:00
parent ec84c4dd70
commit 0e72ac87c1
2 changed files with 2 additions and 2 deletions

View file

@ -876,7 +876,7 @@ func messageHistoryAnnotation(msg providers.Message) string {
if len(parts) == 0 {
return ""
}
return fmt.Sprintf("[%s] ", strings.Join(parts, ", "))
return fmt.Sprintf("[%s] ", strings.Join(parts, "; "))
}
func messageSenderAnnotation(sender *providers.MessageSender) string {

View file

@ -226,7 +226,7 @@ func TestMessageHistoryAnnotation_IncludesSenderAndThreading(t *testing.T) {
},
}
if got := messageHistoryAnnotation(msg); got != "[from:Alice Example (@alice), msgs:#m1, reply_to:#p0] " {
if got := messageHistoryAnnotation(msg); got != "[from:Alice Example (@alice); msgs:#m1, reply_to:#p0] " {
t.Fatalf("messageHistoryAnnotation() = %q", got)
}
}