import type { JobRow } from "../../lib/protocol.js"; import { type Overlay, type OverlayHost } from "../overlay-host.js"; /** What the overlay needs of the view (no daemon: `keepOne` is the view's). */ export type CompareHost = Pick, "theme" | "say" | "close" | "requestRender" | "attachTo" | "rows" | "termRows" | "worktreeChange">; export interface CompareOpts { /** The sessions to compare, in column order. */ ids: string[]; /** Their fan-out when they are one (k keeps one of a fan-out only). */ fanoutId?: string; /** The column to start on, when it is one of `ids`. */ selectedId?: string; /** k twice: keep `keep`, delete `others` (the overlay has closed itself). */ keepOne(keep: JobRow, others: JobRow[]): Promise; /** Enter: the view's cursor goes to this row (the overlay has closed itself and attaches next). */ select(id: string): void; } /** * M26: one column per session, ← → choose, Enter opens it, r reads the worktrees again, k twice * keeps it (a fan-out only). Rows are read from the host each time, so it follows the list; it * closes itself when none of them is left. Reads each worktree's change when it opens. */ export declare function createCompareOverlay(host: CompareHost, opts: CompareOpts): Overlay;