openai-cli-unofficial
Version:
A powerful OpenAI CLI Coding Agent built with TypeScript
22 lines • 767 B
TypeScript
export declare class StringUtils {
/**
* 掩码化 API Key,只显示前4位和后4位字符
*/
static maskApiKey(apiKey: string): string;
/**
* 计算字符串在终端中的显示宽度
* 考虑中文字符、emoji等宽字符,正确处理ANSI颜色代码
*/
static getDisplayWidth(str: string): number;
/**
* 处理粘贴的文本,移除换行符并清理内容
* 用于一般的输入场景
*/
static processPastedText(text: string): string;
/**
* 处理文件内容粘贴,保留换行符但清理其他格式
* 用于文件输入场景,如@文件引用时的内容粘贴
*/
static processFileContentPaste(text: string): string;
}
//# sourceMappingURL=string.d.ts.map