taskflow-ai
Version:
TaskFlow AI - 智能PRD文档解析与任务管理助手,支持多模型AI协同、MCP编辑器集成,专为开发团队设计的CLI工具
64 lines (63 loc) • 1.75 kB
TypeScript
import { Ora } from 'ora';
/**
* 确认操作
* @param message 提示消息
* @param defaultValue 默认值
*/
export declare function confirmAction(message: string, defaultValue?: boolean): Promise<boolean>;
/**
* 选择选项
* @param message 提示消息
* @param choices 选项列表
* @param defaultValue 默认值
*/
export declare function selectOption<T extends string>(message: string, choices: {
name: string;
value: T;
}[], defaultValue?: T): Promise<T>;
/**
* 输入文本
* @param message 提示消息
* @param defaultValue 默认值
* @param validate 验证函数
*/
export declare function inputText(message: string, defaultValue?: string, validate?: (input: string) => boolean | string | Promise<boolean | string>): Promise<string>;
/**
* 显示加载状态
* @param initialText 初始文本
*/
export declare function showSpinner(initialText: string): Ora;
/**
* 显示成功消息
* @param message 消息内容
*/
export declare function showSuccess(message: string): void;
/**
* 显示错误消息
* @param message 消息内容
*/
export declare function showError(message: string): void;
/**
* 显示警告消息
* @param message 消息内容
*/
export declare function showWarning(message: string): void;
/**
* 显示信息消息
* @param message 消息内容
*/
export declare function showInfo(message: string): void;
/**
* 显示下一步操作提示
* @param steps 步骤列表
*/
export declare function showNextSteps(steps: string[]): void;
/**
* 创建进度条
* @param total 总数
* @param initialText 初始文本
*/
export declare function createProgressBar(total: number, initialText: string): {
update: (current: number, text?: string) => void;
stop: () => void;
};