UNPKG

@copilotkit/a2ui-renderer

Version:

A2UI Renderer for CopilotKit - render A2UI surfaces in React applications

30 lines (29 loc) 1.03 kB
import { OnActionCallback } from "../types.cjs"; //#region src/react-renderer/core/store.d.ts /** * Stable actions that never change (won't cause re-renders). * These are stored in a ref and exposed via A2UIActionsContext. */ interface A2UIActions { /** Process incoming v0.9 A2UI messages */ processMessages: (messages: Array<Record<string, unknown>>) => void; /** Dispatch a user action to the server */ dispatch: (message: any) => void; /** Get a surface model by ID */ getSurface: (surfaceId: string) => any | undefined; /** Clear all surfaces (creates a new processor) */ clearSurfaces: () => void; } /** * The shape of the A2UI context value. * Combines stable actions with reactive state. */ interface A2UIContextValue extends A2UIActions { /** Version counter for triggering React re-renders */ version: number; /** Callback for dispatching actions to the server */ onAction: OnActionCallback | null; } //#endregion export { A2UIActions, A2UIContextValue }; //# sourceMappingURL=store.d.cts.map