import { type ReactNode } from "react"; import { type EnhancedStore, type Store } from "@reduxjs/toolkit"; import { type IAnalyticalBackend, type IUserWorkspaceSettings } from "@gooddata/sdk-backend-spi"; import { type CatalogItem, type GenAIObjectType, type IColorPalette, type IInsight, type IListedDashboard } from "@gooddata/sdk-model"; import { type ChatEventHandler } from "../store/events.js"; import { type GenAIAssistantDisplayMode, type GenAIAssistantMode, type LinkHandlerEvent } from "./ConfigContext.js"; /** * Props for the GenAiStore component. * @public */ export type GenAiStoreProps = { /** * Store to use for the GenAiStore component. */ providedStore?: Promise; /** * Analytical backend to use for server communication. */ backend?: IAnalyticalBackend; /** * The workspace ID the user is working with. */ workspace?: string; /** * Catalog items for autocomplete. */ catalogItems?: CatalogItem[]; /** * Dashboards offered by the context chooser. When provided, the list is taken as complete and * no dashboards are loaded from the backend. */ dashboards?: IListedDashboard[]; /** * Visualizations offered by the context chooser. When provided, the list is taken as complete * and no visualizations are loaded from the backend. */ visualizations?: IInsight[]; /** * User settings to use for the chat UI. */ settings?: IUserWorkspaceSettings; /** * Callback to handle link clicks. */ onLinkClick?: (linkClickEvent: LinkHandlerEvent) => string | undefined; /** * Whether to allow native links to be opened in a new tab. */ allowNativeLinks?: boolean; /** * Event handlers to subscribe to chat events. */ eventHandlers?: ChatEventHandler[]; /** * A list of object types to search for. */ objectTypes?: GenAIObjectType[]; /** * Only objects with these tags will be included */ includeTags?: string[]; /** * Objects with these tags will be excluded */ excludeTags?: string[]; /** * Color palette to use for the chat UI. */ colorPalette?: IColorPalette; /** * Mode of the assistant. Adapts the internal layout to a narrow or to a wide container; * the assistant always fills its parent element, so this does not resize it. * On small screens the fullscreen layout is always used. */ mode?: GenAIAssistantMode; /** * Display mode of the Gen AI assistant. */ displayMode?: GenAIAssistantDisplayMode; /** * When provided, the function will be called with the store dispatch function * after the store has been initialized. */ onDispatcher?: (dispatch: EnhancedStore["dispatch"]) => void; /** * Render function or component to be wrapped with the Gen AI store. */ children: ReactNode | ((genAIStore: EnhancedStore) => ReactNode); /** * When `true`, the assistant operates against the caller's preview agent * for this workspace (backend agent id: `{userId}-{workspaceId}-preview`). * New conversations are created as preview conversations and the * conversation list is filtered to preview conversations only. * * The preview agent must already exist and be enabled; otherwise * conversation creation will fail. * * Note: toggling this prop rebuilds the chat state from scratch. * * @internal */ isPreview?: boolean; /** * Enables the Interaction Intelligence panel on assistant messages. Agent builder * passes `true`; regular assistants leave this off. Also requires * `settings.enableGenAiInteractionIntelligence` to be enabled — both must be true for the * panel to be usable. * * @internal */ allowInteractionIntelligence?: boolean; }; /** * Provides the Gen AI store to the application. * @public */ export declare function GenAiStore(props: GenAiStoreProps): import("react/jsx-runtime").JSX.Element | null; //# sourceMappingURL=GenAiStore.d.ts.map