/**
 * User Settings Extensions
 *
 * Extends the settings system with customizable spinner verbs, accessibility,
 * tool deny-lists, plan directories, temperature overrides, and themes.
 */
import { logger } from '../utils/logger.js';
const DEFAULT_SPINNER_VERBS = [
    'Thinking',
    'Analyzing',
    'Processing',
    'Generating',
    'Computing',
];
const DEFAULT_PLANS_DIRECTORY = '.codebuddy/plans';
// ============================================================================
// UserSettingsManager
// ============================================================================
export class UserSettingsManager {
    static instance = null;
    settings;
    constructor(initial) {
        this.settings = { ...initial };
        logger.debug('UserSettingsManager initialized');
    }
    static getInstance(initial) {
        if (!UserSettingsManager.instance) {
            UserSettingsManager.instance = new UserSettingsManager(initial);
        }
        return UserSettingsManager.instance;
    }
    static resetInstance() {
        UserSettingsManager.instance = null;
    }
    get(key) {
        return this.settings[key];
    }
    set(key, value) {
        this.settings[key] = value;
        logger.debug(`Setting updated: ${key}`);
    }
    isToolDisallowed(toolName) {
        const list = this.settings.disallowedTools;
        if (!list || list.length === 0)
            return false;
        return list.includes(toolName);
    }
    getSpinnerVerbs() {
        return this.settings.spinnerVerbs && this.settings.spinnerVerbs.length > 0
            ? this.settings.spinnerVerbs
            : DEFAULT_SPINNER_VERBS;
    }
    getTemperature() {
        return this.settings.temperatureOverride;
    }
    shouldReduceMotion() {
        return this.settings.reduceMotion === true;
    }
    shouldShowTurnDuration() {
        return this.settings.showTurnDuration !== false;
    }
    getPlansDirectory() {
        return this.settings.plansDirectory || DEFAULT_PLANS_DIRECTORY;
    }
}
//# sourceMappingURL=user-settings.js.map