fix: Auto-Context SSE-Event und DB-Save auch im CLI-Codepfad

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
MelekiandClaude Opus 4.6 committed 2026-04-01 10:12:07 +02:00
1 parent 9fe6bed59b
commit 2ac0078960
1 file changed
+10
+10
View File
@@ -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)
{