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:
1 parent
9fe6bed59b
commit
2ac0078960
1 file changed
+10
@@ -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)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user