import type { MessagePart } from '../../types/api'; /** * Decides, for a single persisted message part, whether the timeline shows its * content or an inert placeholder. * * Every persisted part owns exactly one list row. Some parts have nothing to * show *in the timeline* — their content is surfaced by the live status row or * the todo panel, or they are simply empty. Those rows used to render `null`, * which collapsed them to zero pixels and, worse, flipped a tool call from a * full-height box to nothing the moment another part streamed in. This module * makes that decision explicit, positional-free and unit testable: * * - suppression depends only on the part itself and on whether its tool call * has been resolved, never on the part's index in the turn, so a row's * height changes at most once and only when its own data changes; * - a suppressed part still yields a row, so the part → row mapping stays 1:1 * and LegendList keeps a stable, measurable item for it. */ export type PartPresentation = 'visible' | 'suppressed'; export interface PartPresentationContext { /** * Tool call ids in this turn that already have a persisted `tool_result`. * A call is interesting only until its result lands. */ resolvedToolCallIds: ReadonlySet; } /** * Tool results whose content is rendered by the todo panel rather than the * thread, so their timeline row has nothing to show. */ export declare function isTodoTool(toolName: string | null | undefined): boolean; /** True when a text/reasoning part carries something worth rendering. */ export declare function hasRenderableText(part: MessagePart): boolean; /** * True when this tool call still renders its live "running…" box. Derived from * the call's own result rather than from its position in the turn, so appending * unrelated parts can never change it. */ export declare function isLiveToolCallPart(part: MessagePart, { resolvedToolCallIds }: PartPresentationContext): boolean; /** * Whether a part renders its content in the timeline. Mirrors exactly the cases * `MessagePartItem` declines to render, so moving the decision here changes no * visuals — it only replaces a `null` return with a measurable placeholder row. */ export declare function getPartPresentation(part: MessagePart, context: PartPresentationContext): PartPresentation; //# sourceMappingURL=partVisibility.d.ts.map