preserve thinking delta whitespace in runlog streaming

This commit is contained in:
Dotta
2026-03-05 09:25:03 -06:00
parent 34d9122b45
commit d37e1d3dc3
4 changed files with 20 additions and 7 deletions

View File

@@ -100,8 +100,8 @@ function parseStdoutChunk(
const summarized: Array<{ text: string; tone: FeedTone; thinkingDelta?: boolean }> = [];
const appendSummary = (entry: TranscriptEntry) => {
if (entry.kind === "thinking" && entry.delta) {
const text = entry.text.trim();
if (!text) return;
const text = entry.text;
if (!text.trim()) return;
const last = summarized[summarized.length - 1];
if (last && last.thinkingDelta) {
last.text += text;

View File

@@ -111,8 +111,8 @@ function parseStdoutChunk(
const summarized: Array<{ text: string; tone: FeedTone; thinkingDelta?: boolean }> = [];
const appendSummary = (entry: TranscriptEntry) => {
if (entry.kind === "thinking" && entry.delta) {
const text = entry.text.trim();
if (!text) return;
const text = entry.text;
if (!text.trim()) return;
const last = summarized[summarized.length - 1];
if (last && last.thinkingDelta) {
last.text += text;