"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
    return function (target, key) { decorator(target, key, paramIndex); }
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ApplicationStateController = void 0;
const common_1 = require("@nestjs/common");
const swagger_1 = require("@nestjs/swagger");
const application_state_service_1 = require("./application-state.service");
const set_websocket_enabled_dto_1 = require("./dto/set-websocket-enabled.dto");
const set_theme_dto_1 = require("./dto/set-theme.dto");
const set_auto_context_fetch_enabled_dto_1 = require("./dto/set-auto-context-fetch-enabled.dto");
const set_context_token_limit_dto_1 = require("./dto/set-context-token-limit.dto");
const set_execution_strategy_dto_1 = require("./dto/set-execution-strategy.dto");
const set_yolo_mode_dto_1 = require("./dto/set-yolo-mode.dto");
const set_openrouter_config_dto_1 = require("./dto/set-openrouter-config.dto");
const set_zai_config_dto_1 = require("./dto/set-zai-config.dto");
const set_alibaba_config_dto_1 = require("./dto/set-alibaba-config.dto");
const set_ollama_config_dto_1 = require("./dto/set-ollama-config.dto");
const set_openai_config_dto_1 = require("./dto/set-openai-config.dto");
const set_streaming_enabled_dto_1 = require("./dto/set-streaming-enabled.dto");
const set_tools_enabled_dto_1 = require("./dto/set-tools-enabled.dto");
const set_yolo_mode_message_dto_1 = require("./dto/set-yolo-mode-message.dto");
const set_syntax_validation_enabled_dto_1 = require("./dto/set-syntax-validation-enabled.dto");
const set_followup_token_limit_dto_1 = require("./dto/set-followup-token-limit.dto");
const set_history_compression_enabled_dto_1 = require("./dto/set-history-compression-enabled.dto");
const set_llm_retry_enabled_dto_1 = require("./dto/set-llm-retry-enabled.dto");
const set_llm_retry_max_attempts_dto_1 = require("./dto/set-llm-retry-max-attempts.dto");
const set_notifications_enabled_dto_1 = require("./dto/set-notifications-enabled.dto");
let ApplicationStateController = class ApplicationStateController {
    constructor(applicationStateService) {
        this.applicationStateService = applicationStateService;
    }
    async getEffectiveSettings() {
        return this.applicationStateService.getEffectiveSettings();
    }
    async getProjectOverrides() {
        const overrides = await this.applicationStateService.getProjectOverrides();
        return { overrides };
    }
    async clearOverride(key) {
        await this.applicationStateService.clearOverride(key);
    }
    async getWebsocketEnabled() {
        const result = await this.applicationStateService.getWebsocketEnabledWithSource();
        return { enabled: result.value, source: result.source };
    }
    async setWebsocketEnabled(dto) {
        await this.applicationStateService.setWebsocketEnabled(dto.enabled);
    }
    async getAutoContextFetchEnabled() {
        const result = await this.applicationStateService.getAutoContextFetchEnabledWithSource();
        return { enabled: result.value, source: result.source };
    }
    async setAutoContextFetchEnabled(dto) {
        await this.applicationStateService.setAutoContextFetchEnabled(dto.enabled);
    }
    async getYoloModeEnabled() {
        const result = await this.applicationStateService.getYoloModeEnabledWithSource();
        return { enabled: result.value, source: result.source };
    }
    async setYoloModeEnabled(dto) {
        await this.applicationStateService.setYoloModeEnabled(dto.enabled);
    }
    async getExecutionStrategy() {
        const result = await this.applicationStateService.getExecutionStrategyWithSource();
        return { strategy: result.value, source: result.source };
    }
    async setExecutionStrategy(dto) {
        await this.applicationStateService.setExecutionStrategy(dto.strategy);
    }
    async getTheme() {
        const theme = await this.applicationStateService.getTheme();
        return { theme };
    }
    async setTheme(dto) {
        await this.applicationStateService.setTheme(dto.theme);
    }
    async getContextTokenLimit() {
        const result = await this.applicationStateService.getContextTokenLimitWithSource();
        return { limit: result.value, source: result.source };
    }
    async setContextTokenLimit(dto) {
        await this.applicationStateService.setContextTokenLimit(dto.limit);
    }
    async getOpenrouterConfig() {
        const result = await this.applicationStateService.getOpenrouterApiKeyWithSource();
        return { apiKey: result.value, source: result.source };
    }
    async setOpenrouterConfig(dto) {
        await this.applicationStateService.setOpenrouterApiKey(dto.apiKey);
    }
    async getZaiConfig() {
        const result = await this.applicationStateService.getZaiApiKeyWithSource();
        return { apiKey: result.value, source: result.source };
    }
    async setZaiConfig(dto) {
        await this.applicationStateService.setZaiApiKey(dto.apiKey);
    }
    async getAlibabaConfig() {
        const result = await this.applicationStateService.getAlibabaApiKeyWithSource();
        return { apiKey: result.value, source: result.source };
    }
    async setAlibabaConfig(dto) {
        await this.applicationStateService.setAlibabaApiKey(dto.apiKey);
    }
    async getOllamaConfig() {
        const result = await this.applicationStateService.getOllamaApiKeyWithSource();
        return { apiKey: result.value, source: result.source };
    }
    async setOllamaConfig(dto) {
        await this.applicationStateService.setOllamaApiKey(dto.apiKey);
    }
    async getOpenaiConfig() {
        const [apiKeyResult, baseUrlResult] = await Promise.all([
            this.applicationStateService.getOpenaiApiKeyWithSource(),
            this.applicationStateService.getOpenaiBaseUrlWithSource(),
        ]);
        return {
            apiKey: apiKeyResult.value,
            apiKeySource: apiKeyResult.source,
            baseUrl: baseUrlResult.value,
            baseUrlSource: baseUrlResult.source,
        };
    }
    async setOpenaiConfig(dto) {
        if (dto.apiKey !== undefined) {
            await this.applicationStateService.setOpenaiApiKey(dto.apiKey);
        }
        if (dto.baseUrl !== undefined) {
            await this.applicationStateService.setOpenaiBaseUrl(dto.baseUrl);
        }
    }
    async getRecentModels() {
        const models = await this.applicationStateService.getRecentModels();
        return { models };
    }
    async getStreamingEnabled() {
        const result = await this.applicationStateService.getStreamingEnabledWithSource();
        return { enabled: result.value, source: result.source };
    }
    async setStreamingEnabled(dto) {
        await this.applicationStateService.setStreamingEnabled(dto.enabled);
    }
    async getToolsEnabled() {
        const result = await this.applicationStateService.getToolsEnabledWithSource();
        return { enabled: result.value, source: result.source };
    }
    async setToolsEnabled(dto) {
        await this.applicationStateService.setToolsEnabled(dto.enabled);
    }
    async getYoloModeMessage() {
        const result = await this.applicationStateService.getYoloModeMessageWithSource();
        return { message: result.value, source: result.source };
    }
    async setYoloModeMessage(dto) {
        await this.applicationStateService.setYoloModeMessage(dto.message);
    }
    async getSyntaxValidationEnabled() {
        const result = await this.applicationStateService.getSyntaxValidationEnabledWithSource();
        return { enabled: result.value, source: result.source };
    }
    async setSyntaxValidationEnabled(dto) {
        await this.applicationStateService.setSyntaxValidationEnabled(dto.enabled);
    }
    async getFollowupTokenLimit() {
        const result = await this.applicationStateService.getFollowupTokenLimitWithSource();
        return { limit: result.value, source: result.source };
    }
    async setFollowupTokenLimit(dto) {
        await this.applicationStateService.setFollowupTokenLimit(dto.limit);
    }
    async getHistoryCompressionEnabled() {
        const result = await this.applicationStateService.getHistoryCompressionEnabledWithSource();
        return { enabled: result.value, source: result.source };
    }
    async setHistoryCompressionEnabled(dto) {
        await this.applicationStateService.setHistoryCompressionEnabled(dto.enabled);
    }
    async getLlmRetryEnabled() {
        const result = await this.applicationStateService.getLlmRetryEnabledWithSource();
        return { enabled: result.value, source: result.source };
    }
    async setLlmRetryEnabled(dto) {
        await this.applicationStateService.setLlmRetryEnabled(dto.enabled);
    }
    async getLlmRetryMaxAttempts() {
        const result = await this.applicationStateService.getLlmRetryMaxAttemptsWithSource();
        return { attempts: result.value, source: result.source };
    }
    async setLlmRetryMaxAttempts(dto) {
        await this.applicationStateService.setLlmRetryMaxAttempts(dto.attempts);
    }
    async getNotificationsEnabled() {
        const result = await this.applicationStateService.getNotificationsEnabledWithSource();
        return { enabled: result.value, source: result.source };
    }
    async setNotificationsEnabled(dto) {
        await this.applicationStateService.setNotificationsEnabled(dto.enabled);
    }
};
exports.ApplicationStateController = ApplicationStateController;
__decorate([
    (0, common_1.Get)('effective'),
    (0, swagger_1.ApiOperation)({
        summary: 'Get all effective settings with their values merged from defaults and overrides',
    }),
    (0, swagger_1.ApiResponse)({ status: 200, description: 'Effective settings object' }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "getEffectiveSettings", null);
__decorate([
    (0, common_1.Get)('overrides'),
    (0, swagger_1.ApiOperation)({ summary: 'Get all project-level setting overrides' }),
    (0, swagger_1.ApiResponse)({
        status: 200,
        description: 'Object containing override key-value pairs',
    }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "getProjectOverrides", null);
__decorate([
    (0, common_1.Delete)('override/:key'),
    (0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
    (0, swagger_1.ApiOperation)({ summary: 'Clear a specific setting override' }),
    (0, swagger_1.ApiParam)({ name: 'key', description: 'The setting key to clear' }),
    (0, swagger_1.ApiResponse)({ status: 204, description: 'Override cleared successfully' }),
    __param(0, (0, common_1.Param)('key')),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [String]),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "clearOverride", null);
__decorate([
    (0, common_1.Get)('websocket-enabled'),
    (0, swagger_1.ApiOperation)({ summary: 'Get WebSocket enabled status' }),
    (0, swagger_1.ApiResponse)({
        status: 200,
        description: 'WebSocket enabled status with source',
    }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "getWebsocketEnabled", null);
__decorate([
    (0, common_1.Post)('websocket-enabled'),
    (0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
    (0, swagger_1.ApiOperation)({ summary: 'Set WebSocket enabled status' }),
    (0, swagger_1.ApiResponse)({ status: 204, description: 'WebSocket setting updated' }),
    __param(0, (0, common_1.Body)()),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [set_websocket_enabled_dto_1.SetWebsocketEnabledDto]),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "setWebsocketEnabled", null);
__decorate([
    (0, common_1.Get)('auto-context-fetch-enabled'),
    (0, swagger_1.ApiOperation)({ summary: 'Get auto context fetch enabled status' }),
    (0, swagger_1.ApiResponse)({
        status: 200,
        description: 'Auto context fetch status with source',
    }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "getAutoContextFetchEnabled", null);
__decorate([
    (0, common_1.Post)('auto-context-fetch-enabled'),
    (0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
    (0, swagger_1.ApiOperation)({ summary: 'Set auto context fetch enabled status' }),
    (0, swagger_1.ApiResponse)({
        status: 204,
        description: 'Auto context fetch setting updated',
    }),
    __param(0, (0, common_1.Body)()),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [set_auto_context_fetch_enabled_dto_1.SetAutoContextFetchEnabledDto]),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "setAutoContextFetchEnabled", null);
__decorate([
    (0, common_1.Get)('yolo-mode-enabled'),
    (0, swagger_1.ApiOperation)({
        summary: 'Get YOLO mode enabled status (auto-execute without review)',
    }),
    (0, swagger_1.ApiResponse)({ status: 200, description: 'YOLO mode status with source' }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "getYoloModeEnabled", null);
__decorate([
    (0, common_1.Post)('yolo-mode-enabled'),
    (0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
    (0, swagger_1.ApiOperation)({ summary: 'Set YOLO mode enabled status' }),
    (0, swagger_1.ApiResponse)({ status: 204, description: 'YOLO mode setting updated' }),
    __param(0, (0, common_1.Body)()),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [set_yolo_mode_dto_1.SetYoloModeDto]),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "setYoloModeEnabled", null);
__decorate([
    (0, common_1.Get)('execution-strategy'),
    (0, swagger_1.ApiOperation)({ summary: 'Get execution strategy for AI actions' }),
    (0, swagger_1.ApiResponse)({ status: 200, description: 'Execution strategy with source' }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "getExecutionStrategy", null);
__decorate([
    (0, common_1.Post)('execution-strategy'),
    (0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
    (0, swagger_1.ApiOperation)({ summary: 'Set execution strategy for AI actions' }),
    (0, swagger_1.ApiResponse)({ status: 204, description: 'Execution strategy updated' }),
    __param(0, (0, common_1.Body)()),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [set_execution_strategy_dto_1.SetExecutionStrategyDto]),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "setExecutionStrategy", null);
__decorate([
    (0, common_1.Get)('theme'),
    (0, swagger_1.ApiOperation)({ summary: 'Get UI theme setting' }),
    (0, swagger_1.ApiResponse)({ status: 200, description: 'Current theme' }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "getTheme", null);
__decorate([
    (0, common_1.Post)('theme'),
    (0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
    (0, swagger_1.ApiOperation)({ summary: 'Set UI theme' }),
    (0, swagger_1.ApiResponse)({ status: 204, description: 'Theme updated' }),
    __param(0, (0, common_1.Body)()),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [set_theme_dto_1.SetThemeDto]),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "setTheme", null);
__decorate([
    (0, common_1.Get)('context-token-limit'),
    (0, swagger_1.ApiOperation)({ summary: 'Get context token limit' }),
    (0, swagger_1.ApiResponse)({ status: 200, description: 'Context token limit with source' }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "getContextTokenLimit", null);
__decorate([
    (0, common_1.Post)('context-token-limit'),
    (0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
    (0, swagger_1.ApiOperation)({ summary: 'Set context token limit' }),
    (0, swagger_1.ApiResponse)({ status: 204, description: 'Context token limit updated' }),
    __param(0, (0, common_1.Body)()),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [set_context_token_limit_dto_1.SetContextTokenLimitDto]),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "setContextTokenLimit", null);
__decorate([
    (0, common_1.Get)('openrouter-config'),
    (0, swagger_1.ApiOperation)({ summary: 'Get OpenRouter API configuration' }),
    (0, swagger_1.ApiResponse)({ status: 200, description: 'OpenRouter API key with source' }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "getOpenrouterConfig", null);
__decorate([
    (0, common_1.Post)('openrouter-config'),
    (0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
    (0, swagger_1.ApiOperation)({ summary: 'Set OpenRouter API key' }),
    (0, swagger_1.ApiResponse)({ status: 204, description: 'OpenRouter config updated' }),
    __param(0, (0, common_1.Body)()),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [set_openrouter_config_dto_1.SetOpenrouterConfigDto]),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "setOpenrouterConfig", null);
__decorate([
    (0, common_1.Get)('zai-config'),
    (0, swagger_1.ApiOperation)({ summary: 'Get Z.ai API configuration' }),
    (0, swagger_1.ApiResponse)({ status: 200, description: 'Z.ai API key with source' }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "getZaiConfig", null);
__decorate([
    (0, common_1.Post)('zai-config'),
    (0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
    (0, swagger_1.ApiOperation)({ summary: 'Set Z.ai API key' }),
    (0, swagger_1.ApiResponse)({ status: 204, description: 'Z.ai config updated' }),
    __param(0, (0, common_1.Body)()),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [set_zai_config_dto_1.SetZaiConfigDto]),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "setZaiConfig", null);
__decorate([
    (0, common_1.Get)('alibaba-config'),
    (0, swagger_1.ApiOperation)({ summary: 'Get Alibaba (Qwen) API configuration' }),
    (0, swagger_1.ApiResponse)({ status: 200, description: 'Alibaba API key with source' }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "getAlibabaConfig", null);
__decorate([
    (0, common_1.Post)('alibaba-config'),
    (0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
    (0, swagger_1.ApiOperation)({ summary: 'Set Alibaba (Qwen) API key' }),
    (0, swagger_1.ApiResponse)({ status: 204, description: 'Alibaba config updated' }),
    __param(0, (0, common_1.Body)()),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [set_alibaba_config_dto_1.SetAlibabaConfigDto]),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "setAlibabaConfig", null);
__decorate([
    (0, common_1.Get)('ollama-config'),
    (0, swagger_1.ApiOperation)({ summary: 'Get Ollama Cloud API configuration' }),
    (0, swagger_1.ApiResponse)({ status: 200, description: 'Ollama API key with source' }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "getOllamaConfig", null);
__decorate([
    (0, common_1.Post)('ollama-config'),
    (0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
    (0, swagger_1.ApiOperation)({ summary: 'Set Ollama Cloud API key' }),
    (0, swagger_1.ApiResponse)({ status: 204, description: 'Ollama config updated' }),
    __param(0, (0, common_1.Body)()),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [set_ollama_config_dto_1.SetOllamaConfigDto]),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "setOllamaConfig", null);
__decorate([
    (0, common_1.Get)('openai-config'),
    (0, swagger_1.ApiOperation)({ summary: 'Get OpenAI Compatible API configuration' }),
    (0, swagger_1.ApiResponse)({ status: 200, description: 'OpenAI config with source' }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "getOpenaiConfig", null);
__decorate([
    (0, common_1.Post)('openai-config'),
    (0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
    (0, swagger_1.ApiOperation)({ summary: 'Set OpenAI Compatible API configuration' }),
    (0, swagger_1.ApiResponse)({ status: 204, description: 'OpenAI config updated' }),
    __param(0, (0, common_1.Body)()),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [set_openai_config_dto_1.SetOpenaiConfigDto]),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "setOpenaiConfig", null);
__decorate([
    (0, common_1.Get)('recent-models'),
    (0, swagger_1.ApiOperation)({ summary: 'Get list of recently used models' }),
    (0, swagger_1.ApiResponse)({ status: 200, description: 'List of recent model IDs' }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "getRecentModels", null);
__decorate([
    (0, common_1.Get)('streaming-enabled'),
    (0, swagger_1.ApiOperation)({ summary: 'Get streaming enabled status for LLM responses' }),
    (0, swagger_1.ApiResponse)({ status: 200, description: 'Streaming status with source' }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "getStreamingEnabled", null);
__decorate([
    (0, common_1.Post)('streaming-enabled'),
    (0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
    (0, swagger_1.ApiOperation)({ summary: 'Set streaming enabled status' }),
    (0, swagger_1.ApiResponse)({ status: 204, description: 'Streaming setting updated' }),
    __param(0, (0, common_1.Body)()),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [set_streaming_enabled_dto_1.SetStreamingEnabledDto]),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "setStreamingEnabled", null);
__decorate([
    (0, common_1.Get)('tools-enabled'),
    (0, swagger_1.ApiOperation)({ summary: 'Get tools (function calling) enabled status' }),
    (0, swagger_1.ApiResponse)({ status: 200, description: 'Tools status with source' }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "getToolsEnabled", null);
__decorate([
    (0, common_1.Post)('tools-enabled'),
    (0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
    (0, swagger_1.ApiOperation)({ summary: 'Set tools enabled status' }),
    (0, swagger_1.ApiResponse)({ status: 204, description: 'Tools setting updated' }),
    __param(0, (0, common_1.Body)()),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [set_tools_enabled_dto_1.SetToolsEnabledDto]),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "setToolsEnabled", null);
__decorate([
    (0, common_1.Get)('yolo-mode-message'),
    (0, swagger_1.ApiOperation)({ summary: 'Get YOLO mode auto-execute message' }),
    (0, swagger_1.ApiResponse)({ status: 200, description: 'YOLO mode message with source' }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "getYoloModeMessage", null);
__decorate([
    (0, common_1.Post)('yolo-mode-message'),
    (0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
    (0, swagger_1.ApiOperation)({ summary: 'Set YOLO mode auto-execute message' }),
    (0, swagger_1.ApiResponse)({ status: 204, description: 'YOLO mode message updated' }),
    __param(0, (0, common_1.Body)()),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [set_yolo_mode_message_dto_1.SetYoloModeMessageDto]),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "setYoloModeMessage", null);
__decorate([
    (0, common_1.Get)('syntax-validation-enabled'),
    (0, swagger_1.ApiOperation)({
        summary: 'Get syntax validation enabled status for generated code',
    }),
    (0, swagger_1.ApiResponse)({
        status: 200,
        description: 'Syntax validation status with source',
    }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "getSyntaxValidationEnabled", null);
__decorate([
    (0, common_1.Post)('syntax-validation-enabled'),
    (0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
    (0, swagger_1.ApiOperation)({ summary: 'Set syntax validation enabled status' }),
    (0, swagger_1.ApiResponse)({
        status: 204,
        description: 'Syntax validation setting updated',
    }),
    __param(0, (0, common_1.Body)()),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [set_syntax_validation_enabled_dto_1.SetSyntaxValidationEnabledDto]),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "setSyntaxValidationEnabled", null);
__decorate([
    (0, common_1.Get)('followup-token-limit'),
    (0, swagger_1.ApiOperation)({ summary: 'Get follow-up token limit' }),
    (0, swagger_1.ApiResponse)({
        status: 200,
        description: 'Follow-up token limit with source',
    }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "getFollowupTokenLimit", null);
__decorate([
    (0, common_1.Post)('followup-token-limit'),
    (0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
    (0, swagger_1.ApiOperation)({ summary: 'Set follow-up token limit' }),
    (0, swagger_1.ApiResponse)({ status: 204, description: 'Follow-up token limit updated' }),
    __param(0, (0, common_1.Body)()),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [set_followup_token_limit_dto_1.SetFollowupTokenLimitDto]),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "setFollowupTokenLimit", null);
__decorate([
    (0, common_1.Get)('history-compression-enabled'),
    (0, swagger_1.ApiOperation)({ summary: 'Get history compression enabled status' }),
    (0, swagger_1.ApiResponse)({
        status: 200,
        description: 'History compression status with source',
    }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "getHistoryCompressionEnabled", null);
__decorate([
    (0, common_1.Post)('history-compression-enabled'),
    (0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
    (0, swagger_1.ApiOperation)({ summary: 'Set history compression enabled status' }),
    (0, swagger_1.ApiResponse)({
        status: 204,
        description: 'History compression setting updated',
    }),
    __param(0, (0, common_1.Body)()),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [set_history_compression_enabled_dto_1.SetHistoryCompressionEnabledDto]),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "setHistoryCompressionEnabled", null);
__decorate([
    (0, common_1.Get)('llm-retry-enabled'),
    (0, swagger_1.ApiOperation)({ summary: 'Get LLM retry enabled status' }),
    (0, swagger_1.ApiResponse)({ status: 200, description: 'LLM retry status with source' }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "getLlmRetryEnabled", null);
__decorate([
    (0, common_1.Post)('llm-retry-enabled'),
    (0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
    (0, swagger_1.ApiOperation)({ summary: 'Set LLM retry enabled status' }),
    (0, swagger_1.ApiResponse)({ status: 204, description: 'LLM retry setting updated' }),
    __param(0, (0, common_1.Body)()),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [set_llm_retry_enabled_dto_1.SetLlmRetryEnabledDto]),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "setLlmRetryEnabled", null);
__decorate([
    (0, common_1.Get)('llm-retry-max-attempts'),
    (0, swagger_1.ApiOperation)({ summary: 'Get LLM retry max attempts' }),
    (0, swagger_1.ApiResponse)({
        status: 200,
        description: 'LLM retry max attempts with source',
    }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "getLlmRetryMaxAttempts", null);
__decorate([
    (0, common_1.Post)('llm-retry-max-attempts'),
    (0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
    (0, swagger_1.ApiOperation)({ summary: 'Set LLM retry max attempts' }),
    (0, swagger_1.ApiResponse)({ status: 204, description: 'LLM retry max attempts updated' }),
    __param(0, (0, common_1.Body)()),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [set_llm_retry_max_attempts_dto_1.SetLlmRetryMaxAttemptsDto]),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "setLlmRetryMaxAttempts", null);
__decorate([
    (0, common_1.Get)('notifications-enabled'),
    (0, swagger_1.ApiOperation)({ summary: 'Get notifications enabled status' }),
    (0, swagger_1.ApiResponse)({
        status: 200,
        description: 'Notifications status with source',
    }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "getNotificationsEnabled", null);
__decorate([
    (0, common_1.Post)('notifications-enabled'),
    (0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
    (0, swagger_1.ApiOperation)({ summary: 'Set notifications enabled status' }),
    (0, swagger_1.ApiResponse)({ status: 204, description: 'Notifications setting updated' }),
    __param(0, (0, common_1.Body)()),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [set_notifications_enabled_dto_1.SetNotificationsEnabledDto]),
    __metadata("design:returntype", Promise)
], ApplicationStateController.prototype, "setNotificationsEnabled", null);
exports.ApplicationStateController = ApplicationStateController = __decorate([
    (0, swagger_1.ApiTags)('application-state'),
    (0, common_1.Controller)('application-state'),
    __metadata("design:paramtypes", [application_state_service_1.ApplicationStateService])
], ApplicationStateController);
//# sourceMappingURL=application-state.controller.js.map