@promptbook/wizard
Version:
Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action
70 lines (69 loc) • 2.8 kB
TypeScript
import type { UIEvent } from 'react';
import type { Promisable } from 'type-fest';
import type { id } from '../../../types/string_token';
import type { ChatMessage } from '../types/ChatMessage';
import type { ChatParticipant } from '../types/ChatParticipant';
import type { ParsedCitation } from '../utils/parseCitationsFromContent';
import type { ChatProps } from './ChatProps';
/**
* Props for the Chat message list container.
*
* @private component of `<Chat/>`
*/
export type ChatMessageListProps = {
messages: ReadonlyArray<ChatMessage>;
participants: ReadonlyArray<ChatParticipant>;
expandedMessageId: id | null;
messageRatings: Map<id, number>;
setExpandedMessageId: (value: id | null) => void;
handleRating: (message: ChatMessage, rating: number) => void;
mode: 'LIGHT' | 'DARK';
isCopyButtonEnabled?: boolean;
isFeedbackEnabled?: boolean;
/**
* Chooses which feedback controls should be rendered.
*/
feedbackMode?: ChatProps['feedbackMode'];
/**
* Optional localized labels used by feedback controls.
*/
feedbackTranslations?: ChatProps['feedbackTranslations'];
/**
* Optional localized labels used by timestamp metadata.
*/
timingTranslations?: ChatProps['timingTranslations'];
/**
* Optional moment locale used to format message timestamps.
*/
chatLocale?: ChatProps['chatLocale'];
onCopy?: () => void;
onMessage?: (messageContent: string) => Promisable<void>;
onActionButton?: ChatProps['onActionButton'];
onQuickMessageButton?: ChatProps['onQuickMessageButton'];
onReplyToMessage?: ChatProps['onReplyToMessage'];
canReplyToMessage?: ChatProps['canReplyToMessage'];
onCreateAgent?: (bookContent: string) => void;
toolTitles?: Record<string, string>;
teammates?: ChatProps['teammates'];
teamAgentProfiles?: ChatProps['teamAgentProfiles'];
visualMode?: ChatProps['visualMode'];
onToolCallClick?: (toolCall: NonNullable<ChatMessage['toolCalls']>[number]) => void;
onCitationClick?: (citation: ParsedCitation) => void;
soundSystem?: ChatProps['soundSystem'];
isSpeechPlaybackEnabled?: ChatProps['isSpeechPlaybackEnabled'];
elevenLabsVoiceId?: ChatProps['elevenLabsVoiceId'];
/**
* Optional localized labels for Chat UI elements such as lifecycle badges.
*/
chatUiTranslations?: ChatProps['chatUiTranslations'];
setChatMessagesElement: (element: HTMLDivElement | null) => void;
onScroll: (event: UIEvent<HTMLDivElement>) => void;
chatMessagesClassName?: string;
hasActions: boolean;
};
/**
* Renders the list of chat messages.
*
* @private component of `<Chat/>`
*/
export declare function ChatMessageList(props: ChatMessageListProps): import("react/jsx-runtime").JSX.Element;