UNPKG

deep-chat

Version:

Customizable chat component for AI APIs

51 lines 2.99 kB
import { MessageElementsStyles, MessageRoleStyles, MessageStyles, UserContent } from '../../../types/messages'; import { MessageContentI, MessageToElements, Overwrite } from '../../../types/messagesInternal'; import { ProcessedTextToSpeechConfig } from './textToSpeech/textToSpeech'; import { RemarkableOptions } from '../../../types/remarkable'; import { HTMLClassUtilities } from '../../../types/html'; import { IntroPanel } from '../introPanel/introPanel'; import { Response } from '../../../types/response'; import { Avatars } from '../../../types/avatars'; import { DeepChat } from '../../../deepChat'; import { Names } from '../../../types/names'; import { MessageElements } from './messages'; export declare class MessagesBase { messageElementRefs: MessageElements[]; textToSpeech?: ProcessedTextToSpeechConfig; submitUserMessage?: (content: UserContent) => void; readonly elementRef: HTMLElement; readonly messageStyles?: MessageStyles; readonly htmlClassUtilities: HTMLClassUtilities; readonly messageToElements: MessageToElements; protected _introPanel?: IntroPanel; protected readonly _avatars?: Avatars; protected readonly _names?: Names; private _remarkable; private readonly _onMessage?; static readonly TEXT_BUBBLE_CLASS = "text-message"; static readonly INTRO_CLASS = "deep-chat-intro"; constructor(deepChat: DeepChat); private static createContainerElement; addNewTextMessage(text: string, role: string, overwrite?: Overwrite, isTop?: boolean): MessageElements; private overwriteText; protected createAndAppendNewMessageElement(text: string, role: string): MessageElements; private createAndPrependNewMessageElement; createMessageElementsOnOrientation(text: string, role: string, isTop: boolean): MessageElements; createNewMessageElement(text: string, role: string, isTop?: boolean): MessageElements; private revealRoleElementsIfTempRemoved; protected static isTemporaryElement(elements: MessageElements): boolean; createElements(text: string, role: string): MessageElements; createMessageElements(text: string, role: string, isTop?: boolean): MessageElements; protected static createBaseElements(role: string): MessageElements; private addInnerContainerElements; applyCustomStyles(elements: MessageElements | undefined, role: string, media: boolean, otherStyles?: MessageRoleStyles | MessageElementsStyles): void; static createMessageContent(content: Response): MessageContentI; removeMessage(messageElements: MessageElements): void; removeLastMessage(): void; isLastMessageError(): boolean | undefined; static isLoadingMessage(elements?: MessageElements): boolean | undefined; sendClientUpdate(message: MessageContentI, isHistory?: boolean): void; renderText(bubbleElement: HTMLElement, text: string): void; protected refreshTextMessages(customConfig?: RemarkableOptions): void; } //# sourceMappingURL=messagesBase.d.ts.map