This type defines the configuration for a component to be exposed to the chat.
interface ExposedComponent<T extends ComponentType<any>> {
children?: 'any' | ExposedComponent<any>[] | false;
component: T;
description: string;
name: string;
props?: ComponentPropSchema<T>;
}
Examples
exposeComponent(CardComponent, {
name: 'CardComponent',
description: 'Show a card with children components to the user',
children: 'any',
props: {
title: s.string('The title of the card'),
description: s.streaming.string('The description of the card'),
},
});