From 0e72ac87c1e407f5d73b9b985b3591aaf8028f7a Mon Sep 17 00:00:00 2001 From: Dmitrii Balabanov Date: Mon, 23 Mar 2026 11:30:04 +0200 Subject: [PATCH] fix(agent): use semicolon as separator in history annotation to avoid ambiguity with IDs --- pkg/agent/context.go | 2 +- pkg/agent/context_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/agent/context.go b/pkg/agent/context.go index 1ccf32611..9d87938b5 100644 --- a/pkg/agent/context.go +++ b/pkg/agent/context.go @@ -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 { diff --git a/pkg/agent/context_test.go b/pkg/agent/context_test.go index 08cec97b8..7337e8b4a 100644 --- a/pkg/agent/context_test.go +++ b/pkg/agent/context_test.go @@ -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) } }