/** * Dedicated interactive memory editor UI component. * Displays session memory items with navigation, editing, and review capabilities. */ import { Container, type Focusable } from "@apholdings/jensen-tui"; import type { MemoryHistorySnapshot, MemoryItem } from "../../../core/memory.js"; export interface MemoryEditorCallbacks { getMemoryItems(): readonly MemoryItem[]; getMemoryHistory(): readonly MemoryHistorySnapshot[]; setMemoryItem(key: string, value: string): MemoryItem[]; deleteMemoryItem(key: string): MemoryItem[]; clearMemory(): MemoryItem[]; requestRender(): void; } export declare class MemoryEditorComponent extends Container implements Focusable { private mode; private selectedIndex; private reviewSection; private keyInput; private valueInput; private editingItemKey; private callbacks; private requestRender; private readonly maxVisible; private readonly maxValuePreview; /** Index of the base snapshot for diff mode (the earlier snapshot in the pair) */ private diffBaseIndex; /** Index (in original chronological order) of the explicitly armed baseline snapshot */ private armedBaselineIndex; /** * Tracks the explicit two-step compare chooser flow. * - "none": no compare chooser active * - "target_picking": baseline is armed; operator is selecting a target snapshot */ private compareStep; private _focused; get focused(): boolean; set focused(value: boolean); constructor(callbacks: MemoryEditorCallbacks, requestRender: () => void); /** Refresh the displayed list from current backend state */ refresh(): void; invalidate(): void; render(width: number): string[]; private renderListMode; private renderTitleBar; private renderItemList; private renderItemLine; private renderReviewMode; private renderReviewItemLine; /** * Format a date as a relative age label. */ private getRelativeAgeLabel; private renderHistoryMode; private renderHistorySnapshotLine; private renderHistoryDetailMode; private renderHistoryActionHints; private renderHistoryDetailActionHints; private renderHistoryDiffMode; private renderHistoryDiffActionHints; private renderConfirmMode; private renderInputMode; private renderActionHints; handleInput(keyData: string): void; private handleListInput; private handleReviewInput; private handleHistoryInput; private handleHistoryDetailInput; private handleHistoryDiffInput; private matchesCtrlShiftC; private startAdd; private startEdit; private startDelete; private startClearAll; private onKeyInputSubmit; private onValueInputSubmit; private cancelInput; private confirmDestructiveAction; private enterReviewMode; private syncReviewSection; private enterHistoryMode; /** * Sync selectedIndex when entering history list mode from detail or returning to list. * Resets to show the current/most recent snapshot. */ private syncHistorySelection; /** * Arm the currently selected snapshot as the explicit baseline. * Uses the current selectedIndex (in original chronological order). */ private armBaseline; /** * Clear the armed baseline and exit any active compare chooser step. */ private clearBaseline; } //# sourceMappingURL=memory-editor.d.ts.map