mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-16 19:00:38 +09:00
coalesce cursor thinking deltas in run log streaming
This commit is contained in:
parent
8f70e79240
commit
1c9b7ef918
6 changed files with 73 additions and 13 deletions
|
|
@ -219,8 +219,10 @@ export function parseCursorStdoutLine(line: string, ts: string): TranscriptEntry
|
|||
|
||||
if (type === "thinking") {
|
||||
const text = asString(parsed.text).trim() || asString(asRecord(parsed.delta)?.text).trim();
|
||||
const subtype = asString(parsed.subtype).trim().toLowerCase();
|
||||
const isDelta = subtype === "delta" || asRecord(parsed.delta) !== null;
|
||||
if (!text) return [];
|
||||
return [{ kind: "thinking", ts, text }];
|
||||
return [{ kind: "thinking", ts, text, ...(isDelta ? { delta: true } : {}) }];
|
||||
}
|
||||
|
||||
if (type === "tool_call") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue