openai-cli-unofficial
Version:
A powerful OpenAI CLI Coding Agent built with TypeScript
50 lines • 1.11 kB
TypeScript
/**
* 流式渲染器,用于处理流式输入并进行美观输出
*/
export declare class StreamRenderer {
private buffer;
private isInCodeBlock;
private codeBlockLanguage;
private codeBlockContent;
private currentLine;
private codeLineNumber;
private highlightTheme;
private supportedLanguages;
/**
* 检查语言是否被支持,如果不支持则返回默认配置
*/
private checkLanguageSupport;
/**
* 处理流式输入的文本块
*/
processChunk(chunk: string): string;
/**
* 处理单行文本
*/
private processLine;
/**
* 代码高亮(完整代码块)
*/
private highlightCode;
/**
* 单行代码高亮
*/
private highlightCodeLine;
/**
* 格式化普通文本行
*/
private formatRegularLine;
/**
* 获取MIME类型
*/
private getMimeType;
/**
* 完成处理,处理缓冲区中剩余的内容
*/
finalize(): string;
/**
* 重置渲染器状态
*/
reset(): void;
}
//# sourceMappingURL=stream-renderer.d.ts.map