diff --git a/Services/AnthropicService.Cli.cs b/Services/AnthropicService.Cli.cs index 55a5e24..eaa4f7e 100644 --- a/Services/AnthropicService.Cli.cs +++ b/Services/AnthropicService.Cli.cs @@ -85,7 +85,17 @@ public partial class AnthropicService { var autoCtx = await BuildAutoContextAsync(messages, chainId, agentId); if (autoCtx != null) + { systemText.AppendLine(autoCtx); + await SseHelper.TryWriteSse(response, "auto_context", new { context = autoCtx }, sseCt); + await _db.SaveMessage(new MessageRecord + { + ChainId = chainId, + Role = "system", + Type = "auto_context", + Content = autoCtx + }); + } } catch (Exception ex) {