@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
30 lines • 1.28 kB
TypeScript
import type { ProjectTrustContext } from "../core/extensions/types.ts";
import type { AppMode } from "../core/project-trust.ts";
export interface StartupLoadingIndicatorOptions {
readonly writer: (chunk: string) => void;
readonly isTTY: boolean;
readonly label?: string;
readonly graceMs?: number;
readonly intervalMs?: number;
readonly frames?: readonly string[];
}
export interface StartupLoadingIndicator {
start(): void;
setPhase(phase: string | undefined): void;
pause(): void;
resume(): void;
stop(): void;
readonly running: boolean;
}
export declare function createStartupLoadingIndicator(options: StartupLoadingIndicatorOptions): StartupLoadingIndicator;
export declare function shouldShowStartupLoadingIndicator(input: {
readonly appMode: AppMode;
readonly stdoutIsTTY: boolean;
readonly helpRequested: boolean;
}): boolean;
/**
* Project-trust prompts open their own startup TUI mid-load; pausing the
* indicator around each prompt keeps the two from fighting over the terminal.
*/
export declare function pauseIndicatorDuringPrompts(context: ProjectTrustContext, indicator: Pick<StartupLoadingIndicator, "pause" | "resume">): ProjectTrustContext;
//# sourceMappingURL=startup-loading-indicator.d.ts.map