import type { Session } from './sessions.js';
export type SessionSummary = Pick<Session, 'id' | 'name' | 'cwd' | 'model' | 'createdAt' | 'updatedAt' | 'turnCount'>;
export interface SessionPickerState {
    filter: string;
    selected: number;
}
export type SessionPickerInput = {
    type: 'accept';
} | {
    type: 'cancel';
} | {
    type: 'backspace';
} | {
    type: 'move';
    delta: number;
} | {
    type: 'jump';
    target: 'start' | 'end';
} | {
    type: 'append';
    text: string;
} | {
    type: 'ignore';
};
export declare function formatSessionPickerLine(session: SessionSummary): string;
export declare function sessionPickerSearchText(session: SessionSummary): string;
export declare function filterSessionPickerItems(sessions: SessionSummary[], filter: string): SessionSummary[];
export declare function maxVisibleSessionRows(termRows?: number): number;
export declare function visibleSessionPickerWindow<T>(items: T[], selected: number, maxRows: number): {
    items: T[];
    startIdx: number;
    endIdx: number;
};
export declare function parseSessionPickerInput(buf: Buffer): SessionPickerInput;
export declare function applySessionPickerInput(state: SessionPickerState, input: SessionPickerInput, visibleCount: number): {
    state: SessionPickerState;
    accepted?: boolean;
    cancelled?: boolean;
};
export declare function eraseSessionPickerRows(rowCount: number): string;
export declare function pickSession(sessions: SessionSummary[], opts?: {
    title?: string;
    initialFilter?: string;
}): Promise<string | null>;
