import { EventEmitter } from '../../stencil-public-runtime';
import { AiIconType } from '../../utils/icon-types';
export declare class BielMessage {
messageId?: string;
sender: 'user' | 'ai';
text: string;
sources?: {
title: string;
url: string;
}[];
availableActions?: {
name: string;
button_text: string;
url: string;
}[];
feedback?: 0 | 1;
hideFeedback: boolean;
bielId: string;
isPartial: boolean;
partialId: number;
sourcesText: string;
aiIcon: AiIconType;
hideAvatars: boolean;
hideSources: boolean;
assistantLabel: string;
smoothStreaming: boolean;
content: string;
rawContent: string;
feed: 0 | 1;
src: {
title: string;
url: string;
}[];
showSources: boolean;
copied: boolean;
completed: boolean;
el: HTMLElement;
scrollToBottom: EventEmitter<{
bielId: string;
}>;
feedbackSent: EventEmitter<{
bielId: string;
messageId: string;
reaction: 0 | 1;
}>;
private copyResetTimer;
private revealBacklog;
private revealCarry;
private revealRafId;
private lastRevealTs;
private pendingReveal;
private lastMarkdownTs;
private pendingCompletion;
private get useSmoothStreaming();
handleTextUpdate(event: CustomEvent<{
text: string;
id: number;
bielId: string;
}>): void;
private startRevealLoop;
private revealTick;
private finishRevealNow;
private applyCompletion;
handlePartialMessageComplete(event: CustomEvent<{
partialId: number;
bielId: string;
msg: {
text: string;
sender: 'user' | 'ai';
messageId?: string;
feedback?: 0 | 1;
sources?: {
title: string;
url: string;
}[];
isPartial: boolean;
partialId?: number;
};
}>): void;
/**
* Replace the streamed draft with the server's completed text. The final
* payload may differ from the deltas and is also the safest point to remount
* custom elements that were updated repeatedly while Markdown was partial.
*/
replaceContent(text?: string): void;
componentWillLoad(): void;
disconnectedCallback(): void;
private get isComplete();
private toggleSources;
private hostnameFrom;
private handleReaction;
private copyAnswer;
private execCommandCopy;
componentDidLoad(): void;
/**
* Replace each inline ```` tag with an anchor styled as a
* chip, resolving the name against the project's actions. Unknown/unresolved
* tags are removed so no raw markup leaks. Runs before Markdown parsing so
* the anchor survives marked + DOMPurify (which both keep plain elements).
*/
renderInlineActions(text: string): string;
processMarkdown(fragment: string, replaceAll?: boolean): void;
processTable(element: HTMLElement): void;
convertToElement(content: string): HTMLElement;
deepCompareAndReplace(element1: HTMLElement, element2: HTMLElement): void;
private cloneMessageNode;
areNodesEqual(node1: Node, node2: Node): boolean;
synchronizeAttributes(element1: HTMLElement, element2: HTMLElement): void;
private renderFooter;
render(): any;
}