import type { ExtensionContext } from "@earendil-works/pi-coding-agent"; import type { WorkflowSessionView } from "../client/view.js"; /** Client-backed projection of the server-owned run into the origin Pi session. */ export declare class SessionWorkflowView { private readonly scrollHint?; private session; private scroll; private shownScroll; private maxScroll; private focus; private staleReason; private visible; private actionHint; private lastNoticeKey; private pageNodes; /** Window the widget already asked for, so repeated key presses ask once. */ private requestedNodeCursor; /** Start of the last loaded window that held a row, so an empty one can page back. */ private lastWindowStart; /** Position to show when the asked window arrives, applied only on success. */ private pendingScroll; /** `scrollHint` is the effective scroll key label resolved from the configuration file. */ constructor(scrollHint?: string | undefined); /** * Serve a node window that starts at `cursor`. The session view holds one * bounded window, so scrolling past an edge asks the server for the adjacent * window instead of keeping the complete node history. */ setNodePager(pageNodes: (cursor: number | null) => Promise | void): void; update(session: WorkflowSessionView, ctx: ExtensionContext): void; /** * Keep the last view for display while the connection is lost. Every state * change needs a fresh snapshot, so this view no longer authorizes commands. */ markStale(message: string, ctx: ExtensionContext): void; setActionHint(hint: string | undefined, ctx: ExtensionContext): void; refresh(ctx: ExtensionContext): void; scrollUp(ctx: ExtensionContext): void; scrollDown(ctx: ExtensionContext): void; clear(ctx: ExtensionContext): void; /** * Ask for one node window. A failed request stays retryable, so the same edge * can ask again instead of leaving the loaded window stuck, and the view keeps * its position until the asked window arrives. */ private requestWindow; private scrollBy; private clearWidget; private render; private notifyTransition; }