/** * Subagent execution rendering component. * Shows real-time activity from a delegated subagent task using * the same bordered box style as shell/view tools: * - Top border * - Task description (always visible) * - Streaming tool call activity (capped rolling window) * - Bottom border with agent type, model, status, duration */ import type { TUI } from '@earendil-works/pi-tui'; import type { ChatSpacingKind } from './chat-spacing.js'; import type { IToolExecutionComponent } from './tool-execution-interface.js'; import { WidthAwareContainer } from './width-aware-container.js'; export type SubagentActivity = { kind: 'tool'; name: string; args: unknown; result?: string; isError?: boolean; done: boolean; } | { kind: 'text'; text: string; }; export type SubagentToolCall = Extract; export interface SubagentExecutionOptions { /** When true, auto-collapse to a single summary line on completion. Default false. */ collapseOnComplete?: boolean; /** True when this subagent is running on a forked copy of the parent thread. */ forked?: boolean; /** When true, show full completed content including the final result. Default false. */ expandOnComplete?: boolean; /** Footer label before the agent type. Default "subagent". */ label?: string; /** Max activity lines shown while running. Default 15. */ maxActivityLines?: number; /** Max activity lines shown when completed and collapsed. Default 15. */ collapsedLines?: number; colors?: { border?: string; label?: string; agentType?: string; icon?: string; }; icons?: { running?: string; success?: string; error?: string; }; } export declare class SubagentExecutionComponent extends WidthAwareContainer implements IToolExecutionComponent { private ui; private agentType; private task; private modelId?; private activity; private lastTextSnapshot; private done; private isError; private startTime; private durationMs; private finalResult?; private expanded; private collapseOnComplete; private expandOnComplete; private forked; private label; private maxActivityLines; private collapsedLines; private colors; private icons; constructor(agentType: string, task: string, ui: TUI, modelId?: string, options?: SubagentExecutionOptions); addToolStart(name: string, args: unknown): void; setTask(task: string): void; setText(text: string): void; addText(text: string): void; addToolEnd(name: string, result: unknown, isError: boolean): void; finish(isError: boolean, durationMs: number, result?: string): void; setExpanded(expanded: boolean): void; toggleExpanded(): void; updateArgs(_args: unknown): void; updateResult(_result: unknown, _isPartial: boolean): void; getChatSpacingKind(): ChatSpacingKind; protected rebuildForWidth(termWidth: number): void; } //# sourceMappingURL=subagent-execution.d.ts.map