From 3202b8b6297479709ebec848a4f0cb12ddb42eef Mon Sep 17 00:00:00 2001 From: Oliver Kunc <36070570+OliverKunc@users.noreply.github.com> Date: Fri, 13 Feb 2026 18:15:42 +0100 Subject: [PATCH] do not discard whitespaces Before this change, this line threw away whitespace chunks such as newlines or spaces. Token boundaries collapsed, so this corrupted both the stream and the rendering: short code blocks disappeared entirely, longer code blocks were truncated and multiple list items shared a single line. --- .../Provider/OpenAI/ResponsesDeltaStreamLine.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/MindWork AI Studio/Provider/OpenAI/ResponsesDeltaStreamLine.cs b/app/MindWork AI Studio/Provider/OpenAI/ResponsesDeltaStreamLine.cs index 5bad9c1b..98ea7eb2 100644 --- a/app/MindWork AI Studio/Provider/OpenAI/ResponsesDeltaStreamLine.cs +++ b/app/MindWork AI Studio/Provider/OpenAI/ResponsesDeltaStreamLine.cs @@ -12,7 +12,7 @@ public record ResponsesDeltaStreamLine( #region Implementation of IResponseStreamLine /// - public bool ContainsContent() => !string.IsNullOrWhiteSpace(this.Delta); + public bool ContainsContent() => this.Delta is not null; /// public ContentStreamChunk GetContent() => new(this.Delta, this.GetSources()); @@ -36,4 +36,4 @@ public record ResponsesDeltaStreamLine( public IList GetSources() => []; #endregion -} \ No newline at end of file +}