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

    UseOpenUIStateOptions

    Inputs used to parse OpenUI text and build renderer state.

    属性

    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.

    定义于

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


    initialState?

    optional initialState: Record<string, unknown>;

    定义于

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


    isStreaming

    isStreaming: boolean;

    定义于

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


    library

    library: CoreLibrary<ComponentRenderer<any>>;

    定义于

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


    onAction()?

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

    参数

    范围类型
    eventActionEvent

    返回

    void

    定义于

    @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.

    参数

    范围类型
    errorsOpenUIError[]

    返回

    void

    定义于

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


    onStateUpdate()?

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

    参数

    范围类型
    stateRecord<string, unknown>

    返回

    void

    定义于

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


    response

    response: null | string;

    定义于

    @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.

    定义于

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

    除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。