diff --git a/src/commands/init.ts b/src/commands/init.ts index 9c1a61d..b5c39ac 100644 --- a/src/commands/init.ts +++ b/src/commands/init.ts @@ -6,7 +6,7 @@ import ora from 'ora' import { homedir } from 'node:os' import { join } from 'pathe' import { i18n } from '../i18n' -import { createDefaultConfig, ensureCcgDir, getCcgDir, writeCcgConfig } from '../utils/config' +import { createDefaultConfig, ensureCcgDir, getCcgDir, readCcgConfig, writeCcgConfig } from '../utils/config' import { getAllCommandIds, installAceTool, installWorkflows } from '../utils/installer' import { migrateToV1_4_0, needsMigration } from '../utils/migration' @@ -32,8 +32,14 @@ export async function init(options: InitOptions = {}): Promise { let aceToolToken = '' // Skip MCP configuration if --skip-mcp is passed (used during update) + // Also preserve existing liteMode setting from config if (options.skipMcp) { mcpProvider = 'skip' + // Read existing config to preserve liteMode setting + const existingConfig = await readCcgConfig() + if (existingConfig?.performance?.liteMode !== undefined) { + liteMode = existingConfig.performance.liteMode + } } else if (!options.skipPrompt) { console.log() diff --git a/src/commands/update.ts b/src/commands/update.ts index a5d6670..94ed5d2 100644 --- a/src/commands/update.ts +++ b/src/commands/update.ts @@ -323,7 +323,7 @@ async function performUpdate(fromVersion: string, toVersion: string, isNewVersio try { // Use npx to run the latest version's init command with --force flag // This ensures the new version's PACKAGE_ROOT is used for binary installation - await execAsync(`npx --yes ccg-workflow@latest init --force --skip-mcp`, { + await execAsync(`npx --yes ccg-workflow@latest init --force --skip-mcp --skip-prompt`, { timeout: 120000, env: { ...process.env,