Added status texts for prompt processing and reasoning to the chat (#1205)

Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
j-erlerandThorsten Sommer authored and GitHub committed 2026-11-21 09:43:31 +01:00
1 parent 6cdb0bc551
commit 28b88580a9
29 files changed
+504 -30

No files matched your search

@@ -22,7 +22,7 @@ public sealed class AnthropicMessageStreamAccumulator
private const string EVENT_MESSAGE_STOP = "message_stop";
private const string DELTA_TEXT = "text_delta";
private readonly Dictionary<int, AnthropicContentBlockBuilder> openBlocks = [];
private readonly SortedDictionary<int, JsonElement> finishedBlocks = [];
private readonly Dictionary<string, string> unparsableToolArguments = [];
@@ -81,7 +81,7 @@ public sealed class AnthropicMessageStreamAccumulator
this.openBlocks[line.Index] = openBlock;
}
return new AnthropicStreamPart(openBlock.Append(line.Delta));
return new AnthropicStreamPart(openBlock.Append(line.Delta)) { IsReasoning = line.Delta.Type is AnthropicContentBlockBuilder.DELTA_THINKING };
case EVENT_BLOCK_STOP:
if (this.openBlocks.Remove(line.Index, out var finishedBlock))