(data: Output, progressMessagesForMessage: ProgressMessage<Progress>[], {
tools,
verbose,
theme,
isTranscriptMode = false
}: {
tools: Tools;
verbose: boolean;
theme: ThemeName;
isTranscriptMode?: boolean;
})
| 313 | return hasProgressMessage(pm.data); |
| 314 | } |
| 315 | export function renderToolResultMessage(data: Output, progressMessagesForMessage: ProgressMessage<Progress>[], { |
| 316 | tools, |
| 317 | verbose, |
| 318 | theme, |
| 319 | isTranscriptMode = false |
| 320 | }: { |
| 321 | tools: Tools; |
| 322 | verbose: boolean; |
| 323 | theme: ThemeName; |
| 324 | isTranscriptMode?: boolean; |
| 325 | }): React.ReactNode { |
| 326 | // Remote-launched agents (ant-only) use a private output type not in the |
| 327 | // public schema. Narrow via the internal discriminant. |
| 328 | const internal = data as Output | RemoteLaunchedOutput; |
| 329 | if (internal.status === 'remote_launched') { |
| 330 | return <Box flexDirection="column"> |
| 331 | <MessageResponse height={1}> |
| 332 | <Text> |
| 333 | Remote agent launched{' '} |
| 334 | <Text dimColor> |
| 335 | · {internal.taskId} · {internal.sessionUrl} |
| 336 | </Text> |
| 337 | </Text> |
| 338 | </MessageResponse> |
| 339 | </Box>; |
| 340 | } |
| 341 | if (data.status === 'async_launched') { |
| 342 | const { |
| 343 | prompt |
| 344 | } = data; |
| 345 | return <Box flexDirection="column"> |
| 346 | <MessageResponse height={1}> |
| 347 | <Text> |
| 348 | Backgrounded agent |
| 349 | {!isTranscriptMode && <Text dimColor> |
| 350 | {' ('} |
| 351 | <Byline> |
| 352 | <KeyboardShortcutHint shortcut="↓" action="manage" /> |
| 353 | {prompt && <ConfigurableShortcutHint action="app:toggleTranscript" context="Global" fallback="ctrl+o" description="expand" />} |
| 354 | </Byline> |
| 355 | {')'} |
| 356 | </Text>} |
| 357 | </Text> |
| 358 | </MessageResponse> |
| 359 | {isTranscriptMode && prompt && <MessageResponse> |
| 360 | <AgentPromptDisplay prompt={prompt} theme={theme} /> |
| 361 | </MessageResponse>} |
| 362 | </Box>; |
| 363 | } |
| 364 | if (data.status !== 'completed') { |
| 365 | return null; |
| 366 | } |
| 367 | const { |
| 368 | agentId, |
| 369 | totalDurationMs, |
| 370 | totalToolUseCount, |
| 371 | totalTokens, |
| 372 | usage, |
nothing calls this directly
no test coverage detected