From 53db5165a30870defe2e89a5ced51a06ad359660 Mon Sep 17 00:00:00 2001 From: viettranx Date: Mon, 2 Mar 2026 16:41:20 +0700 Subject: [PATCH] feat: add a hint to bot reply bodies indicating full content is in session history for LLM context. --- internal/channels/telegram/context.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/channels/telegram/context.go b/internal/channels/telegram/context.go index e9694048..1b32ce7a 100644 --- a/internal/channels/telegram/context.go +++ b/internal/channels/telegram/context.go @@ -145,6 +145,12 @@ func extractReplyInfo(msg *telego.Message, botUsername string) *ReplyInfo { info.Body = info.Body[:500] + "..." } + // Hint for bot replies: the full response is already in session history, + // so the LLM doesn't need the full text here — just enough to identify it. + if info.IsBotReply && info.Body != "" { + info.Body += "\n(This is your previous response — full content is in session history above)" + } + return info }