import { type HistoryConfigView } from '#src/history/historyEnabled.js'; /** * Why the history commands have what they have, established by looking rather than inferred from * an absent summary. * * The ABSENCE of this field is itself a fifth reading — "the surface passed nothing at all" — and * the commands render that as *this surface does not provide it*. Absent is the safe direction * for the same reason the slash-command context's `hasSlashMenu` chose it: a surface that says * nothing is never made to claim a state it never checked. */ export type HistoryAvailability = /** * `history.enabled: false` in the resolved config. **The one state that may name the config**, * because it is the one where the config is the answer. */ 'disabled' /** History is on and no store file exists yet — a first session, or the store was deleted. */ | 'empty' /** History is on and a store file IS there, and it could not be opened or read. */ | 'unreadable' /** History is on and the store was read: the summaries below are what it holds. */ | 'available'; /** The `/history` `/insights` `/search` inputs one surface hands the shared command registry. */ export interface HistorySlashProps { /** Why these three commands have what they have. Always set by this builder. */ historyAvailability: HistoryAvailability; /** Pre-rendered recent-conversation lines; present only when `historyAvailability` is `available`. */ historySummary?: string[]; /** Pre-rendered analytics lines; present only when `historyAvailability` is `available`. */ insightsSummary?: string[]; /** Fail-soft search provider; present only when `historyAvailability` is `available`. */ historySearch?: (query: string) => string[]; } /** * Build the read-only history slash-command props from the resolved config, fail-soft. * * **The config is consulted FIRST, and that ordering is the whole point.** Whether the DB file * opens cannot distinguish "the user turned history off" from "the user turned it on and has not * recorded anything yet" — both produce no store — so a builder that only tried to open the file * had to guess, and guessed the config every time. Reading `isHistoryEnabled` before touching the * disk makes the difference a fact. * * Never throws: a store problem must not affect starting or running a session. */ export declare function buildHistorySlashProps(config: HistoryConfigView | undefined): HistorySlashProps;