UNPKG

@assistant-ui/react

Version:

Open-source TypeScript/React library for building production-grade AI chat experiences

33 lines • 961 B
/** * Module augmentation namespace for assistant-ui type extensions. * * @example * ```typescript * declare module "@assistant-ui/react" { * namespace Assistant { * interface Commands { * myCustomCommand: { * type: "my-custom-command"; * data: string; * }; * } * * interface ExternalState { * myCustomState: { * foo: string; * }; * } * } * } * ``` */ import type { Assistant as CoreAssistant } from "@assistant-ui/core"; export declare namespace Assistant { interface Commands extends CoreAssistant.Commands { } interface ExternalState extends CoreAssistant.ExternalState { } } export type UserCommands = Assistant.Commands[keyof Assistant.Commands]; export type UserExternalState = keyof Assistant.ExternalState extends never ? Record<string, unknown> : Assistant.ExternalState[keyof Assistant.ExternalState]; //# sourceMappingURL=augmentations.d.ts.map