import type { MessagePart } from '../../types/api'; import { type AssistantRenderItem } from './assistantTurnModel'; import { type PartPresentationContext } from './partVisibility'; export interface TurnWorkContext extends PartPresentationContext { /** * Action-tool call ids that already have a persisted result. Their * ephemeral placeholder is not real work. */ completedActionToolCallIds: ReadonlySet; } /** * True for a part that is agent work (tools, reasoning) rather than the * turn's closing answer. Status/todo/finish parts are excluded because they * already have another home in the UI. */ export declare function isCollapsibleWorkPart(part: MessagePart, context: TurnWorkContext): boolean; /** Index of the first part that belongs to the closing answer (or `parts.length`). */ export declare function getTrailingAnswerStartIndex(parts: readonly MessagePart[], context: TurnWorkContext): number; export declare function hasCollapsibleWork(parts: readonly MessagePart[], context: TurnWorkContext): boolean; /** * When an older turn is collapsed, hide work plus any commentary that came * before the closing answer. Images, files, and errors stay visible. */ export declare function shouldHidePartWhenWorkCollapsed(part: MessagePart, index: number, answerStart: number, context: TurnWorkContext): boolean; export declare function isWorkRenderItem(item: AssistantRenderItem, context: TurnWorkContext): boolean; /** Index of the first render item that belongs to the closing answer. */ export declare function getTrailingAnswerRenderStart(items: readonly AssistantRenderItem[], context: TurnWorkContext): number; //# sourceMappingURL=turnWork.d.ts.map