/** * ModelContext: React component for annotating view UI with contextual * information the model can see. */ import { type ReactNode } from "react"; interface ModelContextProps { /** Text describing what the user is currently seeing. */ content: string; /** Optional children — acts as a scope boundary for nested context nodes. */ children?: ReactNode; } /** * Annotate a portion of the view UI with a description the model can see. * * Registers `content` in a hierarchical tree that serializes into an indented * markdown list under `_uiContext`. The store merges that field with * `useViewState` and sends the complete snapshot through ChatGPT widget state * or MCP Apps `ui/update-model-context`. Updates batch per microtask. Failed * requests stay dirty and retry after the next mutation. * * An empty `content` (trimmed) does not register a node and does not orphan * children — nested {@link ModelContext} nodes re-parent to the nearest * registered ancestor (or root). * * On the MCP Apps path, a host without the `updateModelContext` capability * skips pushes and receives a one-time `console.warn`. * * @param props - Component props. * @param props.content - Text describing what the user is currently seeing. * @param props.children - Optional nested UI; nested {@link ModelContext} * nodes serialize as indented children of this node when this node has * non-empty content. * * @example * ```tsx * * * * * * ``` */ export declare function ModelContext({ content, children }: ModelContextProps): import("react").JSX.Element | null; /** * @internal Reset model-context warn-once flag and the active runtime's store * between tests. */ export declare function _resetModelContextForTesting(): void; export {};