> For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt.

# Function: useOpenUI()

> **useOpenUI**(): [`OpenUIContextValue`](/next/zh/api/genui/openui/core/interfaces/OpenUIContextValue.md)

访问完整的 OpenUI 上下文。在 `OpenUiRenderer` 树之外使用时会抛出异常。

## Returns

[`OpenUIContextValue`](/next/zh/api/genui/openui/core/interfaces/OpenUIContextValue.md)
