import { type DiffFormat, type FailedLoad } from "./diff-view.js"; export interface Revision { id: string; /** Who saved it: a person, or "Opengeni" for an approved agent change. */ author: string; /** When, as an ISO time. Shown as "3 days ago" with the exact time on hover. */ createdAt?: string | undefined; /** Or a ready label, when there's no timestamp: "Created 18 Sep". */ createdLabel?: string | undefined; /** One line: "Added: Prefer small PRs." */ summary: string; /** The full text of this version. */ content: string; } export type RevisionHistoryLayout = "stacked" | "split"; export interface RevisionHistoryProps { /** Newest first. The first one is the current version. */ revisions: readonly Revision[]; layout?: RevisionHistoryLayout | undefined; format?: DiffFormat | undefined; /** Restores a version by saving it again as the newest. Return a promise for the saving state. */ onRestore?: ((revision: Revision) => void | Promise) | undefined; /** Why versions can't be restored here, and who can. */ restoreDisabledReason?: string | undefined; /** Which version starts open (stacked) or selected (split). Defaults to the newest. */ defaultRevisionId?: string | undefined; /** The clock for "3 days ago". */ now?: Date | undefined; /** Accessible name: "Workspace instructions history". */ label?: string | undefined; loading?: boolean | undefined; /** What happened, what to do next, and an optional retry. */ error?: FailedLoad | undefined; className?: string | undefined; } /** The text a version replaced: the one saved right before it, or nothing for the first. */ export declare function previousContent(revisions: readonly Revision[], index: number): string; /** Every saved version of a text, what each changed, and Restore. */ export declare function RevisionHistory(props: RevisionHistoryProps): import("react").JSX.Element;