Merge pull request #648 from paperclipai/paperclip-nicer-runlogs-formats

Humanize run transcripts and polish transcript UX
This commit is contained in:
Dotta
2026-03-11 17:02:33 -05:00
committed by GitHub
22 changed files with 2094 additions and 1102 deletions

View File

@@ -71,6 +71,12 @@ export function parseClaudeStdoutLine(line: string, ts: string): TranscriptEntry
kind: "tool_call",
ts,
name: typeof block.name === "string" ? block.name : "unknown",
toolUseId:
typeof block.id === "string"
? block.id
: typeof block.tool_use_id === "string"
? block.tool_use_id
: undefined,
input: block.input ?? {},
});
}

View File

@@ -64,6 +64,7 @@ function parseCommandExecutionItem(
kind: "tool_call",
ts,
name: "command_execution",
toolUseId: id || command || "command_execution",
input: {
id,
command,
@@ -148,6 +149,7 @@ function parseCodexItem(
kind: "tool_call",
ts,
name: asString(item.name, "unknown"),
toolUseId: asString(item.id),
input: item.input ?? {},
}];
}

View File

@@ -142,6 +142,12 @@ function parseAssistantMessage(messageRaw: unknown, ts: string): TranscriptEntry
kind: "tool_call",
ts,
name,
toolUseId:
asString(part.tool_use_id) ||
asString(part.toolUseId) ||
asString(part.call_id) ||
asString(part.id) ||
undefined,
input,
});
continue;
@@ -199,6 +205,7 @@ function parseCursorToolCallEvent(event: Record<string, unknown>, ts: string): T
kind: "tool_call",
ts,
name: toolName,
toolUseId: callId,
input,
}];
}

View File

@@ -50,6 +50,7 @@ function parseToolUse(parsed: Record<string, unknown>, ts: string): TranscriptEn
kind: "tool_call",
ts,
name: toolName,
toolUseId: asString(part.callID) || asString(part.id) || undefined,
input,
};