mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-05-21 19:32:14 +00:00
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.
This commit is contained in:
parent
ea4e3f0199
commit
3202b8b629
@ -12,7 +12,7 @@ public record ResponsesDeltaStreamLine(
|
|||||||
#region Implementation of IResponseStreamLine
|
#region Implementation of IResponseStreamLine
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public bool ContainsContent() => !string.IsNullOrWhiteSpace(this.Delta);
|
public bool ContainsContent() => this.Delta is not null;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public ContentStreamChunk GetContent() => new(this.Delta, this.GetSources());
|
public ContentStreamChunk GetContent() => new(this.Delta, this.GetSources());
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user