@promptbook/remote-client
Version:
Promptbook: Turn your company's scattered knowledge into AI ready books
23 lines (22 loc) • 664 B
TypeScript
/**
* Represents a parsed message button from markdown
*
* @public exported from `@promptbook/components`
*/
export type MessageButton = {
text: string;
message: string;
};
/**
* Parses markdown buttons in the format [Button Text](?message=Message%20to%20send)
* Returns both the content without buttons and the extracted buttons
*
* @param content The markdown content that may contain buttons
* @returns Object with contentWithoutButtons and buttons array
*
* @public exported from `@promptbook/components`
*/
export declare function parseMessageButtons(content: string): {
contentWithoutButtons: string;
buttons: MessageButton[];
};