@plteam/chat-ui
Version:
CUI Kit is a free and open-source library for creating AI assistant chat interfaces, built with React, Material UI, and TypeScript
30 lines (29 loc) • 1.25 kB
TypeScript
import { ObservableReactValue } from '../utils/observers';
type ManagmentValues = ('headers' | 'time' | 'viewType');
export declare enum ReasoningViewType {
STREAM = "stream",
SHORT_BLOCKS = "shortBlocks",
HEADERS_STREAM = "headersStream"
}
export declare class MessageReasoningModel {
private _reasoningTimeStart;
readonly title: ObservableReactValue<string>;
readonly text: ObservableReactValue<string>;
readonly timeSec: ObservableReactValue<number>;
readonly viewType: ObservableReactValue<ReasoningViewType>;
/**
* True while reasoning is actively streaming (between the first reasoning chunk
* and the first text chunk / finish). Drives the reasoning title shimmer.
*/
readonly isStreaming: ObservableReactValue<boolean>;
lockedOptions: ManagmentValues[];
setUserHeader: (value: string) => void;
setUserTimeSec: (value: number) => void;
setUserViewType: (value: 'stream' | 'headlines' | 'headersStream') => void;
unlockAutoManagment: (values?: ManagmentValues[]) => void;
setHeader: (value: string) => void;
pushChunk: (chunk: string) => void;
setText: (reasoning: string) => void;
updateTimeSec: () => void;
}
export {};