import { readFile, writeFile } from 'node:fs/promises';
import { join } from 'node:path';
import { updatePlanuConfigWorkMode } from '../engine/planu-config-writer.js';
const MODE_DESCRIPTIONS = {
    guided: 'step-by-step hints and onboarding prompts enabled',
    standard: 'normal SDD workflow (default)',
    expert: 'concise output — no onboarding hints',
};
export async function handleSetWorkMode(params) {
    const { projectPath, workMode } = params;
    const planuConfigPath = join(projectPath, 'planu.json');
    await updatePlanuConfigWorkMode(planuConfigPath, workMode, readFile, writeFile);
    const effect = workMode === 'guided'
        ? '  • Specs will include Getting Started tips for SDD newcomers\n  • Next-step suggestions appear after list_specs and validate'
        : workMode === 'expert'
            ? '  • Specs and responses will be concise — explanations omitted\n  • No onboarding prompts or guidance sections'
            : '  • Normal SDD workflow — balanced output';
    const lines = [
        `✅ Work mode set to **${workMode}** — ${MODE_DESCRIPTIONS[workMode]}`,
        '',
        effect,
        '',
        'Stored in `planu.json`. Change anytime with `set_work_mode`.',
    ];
    return {
        content: [{ type: 'text', text: lines.join('\n') }],
        structuredContent: { workMode, projectPath },
    };
}
//# sourceMappingURL=set-work-mode-handler.js.map