mirror of
https://github.com/block/buzz.git
synced 2026-11-08 18:31:56 +00:00
feat(desktop): add timestamps and avatar chips to ACP transcript (#463)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@ import {
|
||||
isGenericToolTitle,
|
||||
normalizeToolName,
|
||||
} from "./agentSessionToolCatalog";
|
||||
import { asRecord, asString, shorten, titleCase } from "./agentSessionUtils";
|
||||
import { asRecord, asString, titleCase } from "./agentSessionUtils";
|
||||
|
||||
export function extractPromptText(payload: Record<string, unknown>): string {
|
||||
const params = asRecord(payload.params);
|
||||
@@ -194,18 +194,14 @@ export function describeTurnStarted(payload: unknown): string {
|
||||
)
|
||||
: [];
|
||||
return ids.length > 0
|
||||
? `Triggered by ${ids.map(shorten).join(", ")}.`
|
||||
: "Heartbeat or internal turn.";
|
||||
? `Triggered by ${ids.length === 1 ? "1 event" : `${ids.length} events`}.`
|
||||
: "";
|
||||
}
|
||||
|
||||
export function describeSessionResolved(payload: unknown): string {
|
||||
const record = asRecord(payload);
|
||||
const sessionId = asString(record.sessionId);
|
||||
const isNewSession = record.isNewSession === true;
|
||||
if (!sessionId) {
|
||||
return "Using existing ACP session.";
|
||||
}
|
||||
return `${isNewSession ? "Created" : "Using"} session ${shorten(sessionId)}.`;
|
||||
return isNewSession ? "New session created." : "";
|
||||
}
|
||||
|
||||
export function describeRawEvent(event: ObserverEvent): string {
|
||||
|
||||
Reference in New Issue
Block a user