research-cli
Version:
AI-powered research assistant with web search capabilities and beautiful terminal UI
141 lines • 3.91 kB
TypeScript
/**
* Professional progress bars for research-cli using cli-progress
*/
import type { Options as ProgressOptions } from "cli-progress";
export interface ProgressBarOptions {
/** Progress bar format string */
format?: string;
/** Custom bar characters */
barCompleteChar?: string;
barIncompleteChar?: string;
/** Hide cursor during progress */
hideCursor?: boolean | undefined;
/** Clear bars when complete */
clearOnComplete?: boolean;
/** Bar size in characters */
barSize?: number;
/** Enable graceful exit handling */
gracefulExit?: boolean;
}
export interface ProgressPayload {
/** Current operation description */
operation?: string;
/** Processing speed/rate */
speed?: string;
/** Current stage/phase */
stage?: string;
/** Provider name */
provider?: string;
/** Model name */
model?: string;
}
/**
* Research CLI themed progress bar configuration
*/
export declare const RESEARCH_CLI_THEME: ProgressOptions;
/**
* Compact theme for tool operations
*/
export declare const TOOL_THEME: ProgressOptions;
/**
* Multi-operation theme for concurrent tasks
*/
export declare const MULTI_THEME: ProgressOptions;
/**
* Single progress bar wrapper with research-cli branding
*/
export declare class ResearchProgressBar {
private bar;
private isActive;
constructor(options?: ProgressBarOptions);
/**
* Start the progress bar
*/
start(total: number, startValue?: number, payload?: ProgressPayload): void;
/**
* Update progress value and/or payload
*/
update(value?: number | null, payload?: ProgressPayload): void;
/**
* Increment progress by specified amount
*/
increment(delta?: number, payload?: ProgressPayload): void;
/**
* Update the operation description
*/
setOperation(operation: string): void;
/**
* Update the current stage
*/
setStage(stage: string): void;
/**
* Set the total value while active
*/
setTotal(total: number): void;
/**
* Complete the progress bar with final stage
*/
complete(finalStage?: string): void;
/**
* Stop the progress bar
*/
stop(): void;
/**
* Check if progress bar is currently active
*/
get active(): boolean;
}
/**
* Multi-progress bar manager for concurrent operations
*/
export declare class ResearchMultiProgress {
private multibar;
private bars;
private isActive;
constructor(options?: ProgressBarOptions);
/**
* Create a new progress bar
*/
createBar(id: string, total: number, startValue?: number, payload?: ProgressPayload, barOptions?: ProgressBarOptions): void;
/**
* Update a specific progress bar
*/
updateBar(id: string, value?: number | null, payload?: ProgressPayload): void;
/**
* Increment a specific progress bar
*/
incrementBar(id: string, delta?: number, payload?: ProgressPayload): void;
/**
* Complete a specific progress bar
*/
completeBar(id: string, finalStage?: string): void;
/**
* Remove a specific progress bar
*/
removeBar(id: string): void;
/**
* Log a message above the progress bars
*/
log(message: string): void;
/**
* Stop all progress bars
*/
stop(): void;
/**
* Get list of active bar IDs
*/
getActiveBars(): string[];
/**
* Check if multibar is currently active
*/
get active(): boolean;
}
/**
* Utility function to create a themed progress bar
*/
export declare function createProgressBar(theme?: "research" | "tool" | "custom", options?: ProgressBarOptions): ResearchProgressBar;
/**
* Utility function to create a multi-progress manager
*/
export declare function createMultiProgress(options?: ProgressBarOptions): ResearchMultiProgress;
//# sourceMappingURL=progress.d.ts.map