Prompt history: list preview shows the message as written, not the engine's time line (#660)

Version 0.1.13.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Richard
2026-09-19 15:36:55 +02:00
co-authored by Claude Opus 5
parent 5adf4c1ca6
commit 996330a77e
6 changed files with 19 additions and 6 deletions
+3 -2
View File
@@ -217,7 +217,7 @@ public sealed class AgentEngine : IAgentMessageRouter, Staging.IFrozenCallExecut
messages.Add(ChatMessage.System(systemPrompt));
messages.Add(ChatMessage.User(MitZeit(userMessage, source)));
recorder.Begin(systemPrompt, messages[^1].Content?.ToString() ?? userMessage);
recorder.Begin(systemPrompt, messages[^1].Content ?? userMessage, userMessage);
string? finalMessage = null;
var truncated = false;
@@ -556,7 +556,8 @@ public sealed class AgentEngine : IAgentMessageRouter, Staging.IFrozenCallExecut
AddChatEntry(agentConfig.AgentId, "user", userMessage, source);
recorder.Begin(
messages.Count > 0 && messages[0].Role == "system" ? messages[0].Content?.ToString() : null,
messages[^1].Content?.ToString() ?? userMessage);
messages[^1].Content ?? userMessage,
userMessage);
string? finalMessage = null;
var truncated = false;