useDashboardCopilot()
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Connect a dashboard and assistant using one CopilotHandler and one outer GenAiStore.
export declare function useDashboardCopilot(): IUseDashboardCopilotResult;
Returns
Component props and actions for the connected dashboard and assistant.
Remarks
Call once per dashboard/assistant pair. Call dashboardProps, genAiStoreProps, and assistantProps with optional application props, then spread their results onto the respective components. These getters compose event handlers and connection callbacks so application customizations do not replace internal wiring. Spread composingProps directly; keep the assistant beside the dashboard and wrap only the dashboard in the composing presentation. Definitions are applied only to an initialized dashboard in edit mode. To generate a new dashboard, mount an empty Dashboard in edit mode before calling generateDashboard; this hook does not navigate or replace an existing saved dashboard. Remount the pair when changing backend or workspace.