UNPKG

@assistant-ui/react

Version:

React components for AI chat.

31 lines 1.12 kB
import { ReadonlyStore } from "../ReadonlyStore"; import { ComposerRuntime, ComposerState } from "../../api/ComposerRuntime"; import { UseBoundStore } from "zustand"; export type ComposerContextValue = { useComposer: UseBoundStore<ReadonlyStore<ComposerState>>; type: "edit" | "new"; }; export declare const useComposerContext: () => ComposerContextValue; export declare const useComposer: { (): ComposerState; <TSelected>(selector: (state: ComposerState) => TSelected): TSelected; (options: { optional: true; }): ComposerState | null; <TSelected>(options: { optional: true; selector?: (state: ComposerState) => TSelected; }): TSelected | null; }, useComposerStore: { (): ReadonlyStore<ComposerState>; (options: { optional: true; }): ReadonlyStore<ComposerState> | null; }; export declare function useComposerRuntime(options?: { optional?: false | undefined; }): ComposerRuntime; export declare function useComposerRuntime(options?: { optional?: boolean | undefined; }): ComposerRuntime | null; //# sourceMappingURL=ComposerContext.d.ts.map