UNPKG

research-cli

Version:

AI-powered research assistant with web search capabilities and beautiful terminal UI

77 lines 2.31 kB
/** * Interactive UI components using terminal-kit * Provides beautiful, user-friendly prompts for CLI interactions */ import type { SupportedProvider } from "../auth/keyring-manager.js"; export interface ProviderChoice { name: SupportedProvider; displayName: string; description: string; url: string; } export interface SetupProgress { provider?: SupportedProvider; apiKey?: string; testResult?: boolean; } export declare class InteractiveUI { /** * Display a welcome banner for easymode setup */ static showWelcomeBanner(): void; /** * Show provider selection menu with descriptions */ static selectProvider(): Promise<SupportedProvider | null>; /** * Interactive API key input with validation hints */ static getApiKey(provider: SupportedProvider, providerUrl: string): Promise<string | null>; /** * Ask if user wants to save the key securely */ static confirmSaveKey(): Promise<boolean>; /** * Show loading spinner while testing API key */ static testApiKeyWithSpinner(testFunction: () => Promise<{ valid: boolean; error?: string; }>): Promise<{ valid: boolean; error?: string; }>; /** * Show success message with next steps */ static showSuccessMessage(provider: SupportedProvider): void; /** * Show error message with helpful suggestions */ static showErrorMessage(error: string, provider?: SupportedProvider): void; /** * Simple yes/no prompt with custom message */ static confirmAction(message: string, defaultYes?: boolean): Promise<boolean>; /** * Enhanced text input with history and autocomplete */ static textInput(prompt: string, options?: { history?: string[]; placeholder?: string; autoComplete?: string[]; }): Promise<string | null>; /** * Show a progress indicator for multi-step processes */ static showProgress(currentStep: number, totalSteps: number, stepDescription: string): Promise<void>; /** * Handle Ctrl+C gracefully with cleanup */ static setupGracefulExit(): void; /** * Cleanup terminal state */ static cleanup(): void; } //# sourceMappingURL=interactive.d.ts.map