mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-16 02:40:39 +09:00
fix cursor stream-json multiplexed output handling
This commit is contained in:
parent
875924a7f3
commit
426c1044b6
6 changed files with 89 additions and 7 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import pc from "picocolors";
|
||||
import { normalizeCursorStreamLine } from "../shared/stream.js";
|
||||
|
||||
function asRecord(value: unknown): Record<string, unknown> | null {
|
||||
if (typeof value !== "object" || value === null || Array.isArray(value)) return null;
|
||||
|
|
@ -121,7 +122,7 @@ function printLegacyToolEvent(part: Record<string, unknown>): void {
|
|||
}
|
||||
|
||||
export function printCursorStreamEvent(raw: string, _debug: boolean): void {
|
||||
const line = raw.trim();
|
||||
const line = normalizeCursorStreamLine(raw).line;
|
||||
if (!line) return;
|
||||
|
||||
let parsed: Record<string, unknown> | null = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue