/** One piece of per-message context. Context for the model, never instructions. */ export type MessageContextItem = Readonly<{ /** Stable identity, such as "selection"; leaving an item out is remembered per id and label. */ id: string; /** The text the model receives with each message. */ text: string; /** Short pill text, such as "Sheet1 ยท B2:D14". Without one, the item is sent but not shown. */ label?: string | undefined; /** Longer description in the pill's tooltip. */ detail?: string | undefined; }>; /** * What a page supplies: plain text, one item, a list of items, or a function * read when each message is sent (not shown in the composer). */ export type MessageContextInput = string | MessageContextItem | readonly MessageContextItem[] | (() => string | undefined) | undefined; export type MessageContextPill = Readonly<{ id: string; label: string; detail?: string | undefined; /** The person left this out of their messages. */ excluded: boolean; }>; export type MessageContextStore = Readonly<{ set(input: MessageContextInput): void; /** The pills to show, stable between changes (for useSyncExternalStore). */ pills(): readonly MessageContextPill[]; subscribe(listener: () => void): () => void; exclude(id: string): void; include(id: string): void; /** The context text to send with a message now, without excluded items. */ forSend(): string | undefined; }>; export declare function createMessageContextStore(initial?: MessageContextInput): MessageContextStore;