UNPKG

devibe

Version:

Intelligent repository cleanup with auto mode, AI learning, markdown consolidation, auto-consolidate workflow, context-aware classification, and cost optimization

90 lines 2.71 kB
/** * User Preferences Manager * * Stores user preferences and choices in ~/.devibe/preferences.json */ export interface UserPreferences { aiAnalysisPrompted?: boolean; aiAnalysisDeclineCount?: number; lastPromptDate?: string; apiKeyPromptDisabled?: boolean; apiKeyPromptDeclineCount?: number; version?: string; folderPreferences?: { docsFolderChoice?: 'docs' | 'documents' | 'ask'; scriptsFolderChoice?: 'script' | 'scripts' | 'ask'; }; } export declare class PreferencesManager { private preferencesPath; private preferences; constructor(); /** * Load preferences from disk */ load(): Promise<UserPreferences>; /** * Save preferences to disk */ save(): Promise<void>; /** * Get a preference value */ get<K extends keyof UserPreferences>(key: K): Promise<UserPreferences[K] | undefined>; /** * Set a preference value */ set<K extends keyof UserPreferences>(key: K, value: UserPreferences[K]): Promise<void>; /** * Check if user has been prompted for AI analysis */ hasBeenPromptedForAIAnalysis(): Promise<boolean>; /** * Check if we should ask about AI analysis * Returns true if we haven't asked twice yet */ shouldPromptForAIAnalysis(): Promise<boolean>; /** * Mark that user has been prompted and accepted */ markAIAnalysisAccepted(): Promise<void>; /** * Increment decline count */ incrementAIAnalysisDecline(): Promise<void>; /** * Reset AI analysis prompt state (for testing or user request) */ resetAIAnalysisPrompt(): Promise<void>; /** * Check if we should prompt for API key setup * Returns true if user hasn't disabled it and hasn't declined twice */ shouldPromptForAPIKey(): Promise<boolean>; /** * Increment API key prompt decline count */ incrementAPIKeyPromptDecline(): Promise<void>; /** * Disable API key prompts permanently */ disableAPIKeyPrompt(): Promise<void>; /** * Get user's folder preference */ getFolderPreference(type: 'docs' | 'scripts'): Promise<string | undefined>; /** * Set user's folder preference */ setFolderPreference(type: 'docs' | 'scripts', choice: 'docs' | 'documents' | 'script' | 'scripts' | 'ask'): Promise<void>; /** * Reset API key prompt state (for testing or user request) */ resetAPIKeyPrompt(): Promise<void>; /** * Get all preferences */ getAll(): Promise<UserPreferences>; } export declare function getPreferencesManager(): PreferencesManager; //# sourceMappingURL=user-preferences.d.ts.map