For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /api/genui/openui/interfaces/UseOpenUIStateOptions.md.
Lynx
  • English
  • genui / openui / UseOpenUIStateOptions

    UseOpenUIStateOptions

    Inputs used to parse OpenUI text and build renderer state.

    Properties

    initialQueryResults?

    optional initialQueryResults: Readonly<Record<string, unknown>>;

    Prefetched Query results keyed by the Query assignment name (statement ID). They are available during the initial render and act as fallbacks while an optional tool provider revalidates them after commit.

    Defined in

    @lynx-js/genui/openui/src/core/hooks/useOpenUIState.ts:105


    initialState?

    optional initialState: Record<string, unknown>;

    Defined in

    @lynx-js/genui/openui/src/core/hooks/useOpenUIState.ts:99


    isStreaming

    isStreaming: boolean;

    Defined in

    @lynx-js/genui/openui/src/core/hooks/useOpenUIState.ts:96


    library

    library: CoreLibrary<ComponentRenderer<any>>;

    Defined in

    @lynx-js/genui/openui/src/core/hooks/useOpenUIState.ts:95


    onAction()?

    optional onAction: (event: ActionEvent) => void;

    Parameters

    ParameterType
    eventActionEvent

    Returns

    void

    Defined in

    @lynx-js/genui/openui/src/core/hooks/useOpenUIState.ts:97


    onError()?

    optional onError: (errors: OpenUIError[]) => void;

    Callback for structured, LLM-friendly errors. See OpenUIError type.

    Parameters

    ParameterType
    errorsOpenUIError[]

    Returns

    void

    Defined in

    @lynx-js/genui/openui/src/core/hooks/useOpenUIState.ts:109


    onStateUpdate()?

    optional onStateUpdate: (state: Record<string, unknown>) => void;

    Parameters

    ParameterType
    stateRecord<string, unknown>

    Returns

    void

    Defined in

    @lynx-js/genui/openui/src/core/hooks/useOpenUIState.ts:98


    response

    response: null | string;

    Defined in

    @lynx-js/genui/openui/src/core/hooks/useOpenUIState.ts:94


    toolProvider?

    optional toolProvider: any;

    ToolProvider for Query data fetching — MCP, REST, GraphQL, or any backend.

    Defined in

    @lynx-js/genui/openui/src/core/hooks/useOpenUIState.ts:107

    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.