openai-cli-unofficial
Version:
A powerful OpenAI CLI Coding Agent built with TypeScript
95 lines • 1.93 kB
TypeScript
export interface ProgressOptions {
width?: number;
format?: string;
clear?: boolean;
}
/**
* 终端进度条工具
*/
export declare class ProgressBar {
private current;
private total;
private width;
private format;
private lastLine;
private clear;
constructor(total: number, options?: ProgressOptions);
/**
* 更新进度
*/
update(current: number, data?: {
phase?: string;
file?: string;
}): void;
/**
* 完成进度条
*/
complete(message?: string): void;
/**
* 显示错误
*/
error(message: string): void;
/**
* 清空当前行
*/
clearLine(): void;
}
/**
* 创建简单的步骤进度显示器
*/
export declare class StepProgress {
private steps;
private currentStep;
private startTime;
constructor(steps: string[]);
/**
* 开始下一步
*/
nextStep(): void;
/**
* 完成所有步骤
*/
complete(): void;
/**
* 显示错误
*/
error(message: string): void;
}
/**
* 多阶段进度管理器
*/
export declare class MultiPhaseProgress {
private phases;
private currentPhase;
private phaseProgress;
private progressBar;
constructor(phases: Array<{
name: string;
weight: number;
}>);
/**
* 更新当前阶段的进度
*/
updatePhase(progress: number, file?: string): void;
/**
* 进入下一阶段
*/
nextPhase(): void;
/**
* 完成所有阶段
*/
complete(message?: string): void;
/**
* 显示错误
*/
error(message: string): void;
/**
* 清空当前行
*/
clearLine(): void;
/**
* 直接设置总体进度(用于恢复状态)
*/
setOverallProgress(overallProgress: number, currentPhase: number, phaseName?: string): void;
}
//# sourceMappingURL=progress.d.ts.map