From 9253adbbd85e95cdcfaeb895bbfed4d2f984af13 Mon Sep 17 00:00:00 2001 From: li Date: Wed, 14 Jan 2026 20:57:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E4=B8=AD=20Web=20UI=20=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=9A=84=E5=A4=B1=E8=B4=A5=20(v1.7.27)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/commands/init.ts | 8 +++++++- src/commands/update.ts | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) 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,