/** * Rendering functions for subagent results */ import type { AgentToolResult } from "@lpb-work/pi-agent-core"; import { type ExtensionContext } from "@lpb-work/pi-coding-agent"; import { type Component } from "@lpb-work/pi-tui"; import { type AsyncJobState, type Details } from "../shared/types.ts"; type Theme = ExtensionContext["ui"]["theme"]; /** * Truncate a line to maxWidth, preserving ANSI styling through the ellipsis. * * pi-tui's truncateToWidth adds \x1b[0m before ellipsis which resets all styling, * causing background color bleed in the TUI. This implementation tracks active * ANSI styles and re-applies them before the ellipsis. * * Uses Intl.Segmenter for proper Unicode/emoji handling (not char-by-char). */ export declare function truncLine(text: string, maxWidth: number): string; interface LegacyResultAnimationContext { state: { subagentResultAnimationTimer?: ReturnType; }; } export declare function clearLegacyResultAnimationTimer(context: LegacyResultAnimationContext): void; export declare function widgetRenderKey(job: AsyncJobState): string; export declare function buildWidgetLines(jobs: AsyncJobState[], theme: Theme, width?: number, expanded?: boolean, frame?: number): string[]; /** * Render the async jobs widget */ export declare function renderWidget(ctx: ExtensionContext, jobs: AsyncJobState[]): void; export declare function renderSubagentSummary(result: AgentToolResult
, options: { isPartial?: boolean; }, theme: Theme): Component; /** * Render a subagent result */ export declare function renderSubagentResult(result: AgentToolResult
, options: { expanded: boolean; }, theme: Theme, frame?: number): Component; export {}; //# sourceMappingURL=render.d.ts.map