mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-15 02:20:38 +09:00
preserve thinking delta whitespace in runlog streaming
This commit is contained in:
parent
34d9122b45
commit
d37e1d3dc3
4 changed files with 20 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue