mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-05-20 00:32:15 +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
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool ContainsContent() => !string.IsNullOrWhiteSpace(this.Delta);
|
||||
public bool ContainsContent() => this.Delta is not null;
|
||||
|
||||
/// <inheritdoc />
|
||||
public ContentStreamChunk GetContent() => new(this.Delta, this.GetSources());
|
||||
@ -36,4 +36,4 @@ public record ResponsesDeltaStreamLine(
|
||||
public IList<ISource> GetSources() => [];
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user