From 85e41a56e94e17ab7aeb729f50404eb6c0708df9 Mon Sep 17 00:00:00 2001 From: kaitranntt Date: Sun, 25 Jan 2026 21:21:02 -0500 Subject: [PATCH] fix(setup): persist setup_completed flag to prevent repeated first-time notice After running ccs setup with local proxy mode, the CLI was still showing the first-time install notice because isFirstTimeInstall() only checked for user-created content (profiles, accounts, variants, etc.). When user chose "Local" mode and skipped API profiles, config had empty objects, causing all checks to return false. Added setup_completed flag to UnifiedConfig interface and set it to true when setup wizard completes. isFirstTimeInstall() now checks this flag first. --- src/commands/setup-command.ts | 6 ++++++ src/config/unified-config-types.ts | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/commands/setup-command.ts b/src/commands/setup-command.ts index 5b7acf5a..2f826fba 100644 --- a/src/commands/setup-command.ts +++ b/src/commands/setup-command.ts @@ -132,6 +132,11 @@ export function isFirstTimeInstall(): boolean { return false; } + // If setup wizard was completed, NOT first-time install + if (loaded.setup_completed) { + return false; + } + // Check for any meaningful configuration in unified config const hasProfiles = Object.keys(loaded.profiles || {}).length > 0; const hasAccounts = Object.keys(loaded.accounts || {}).length > 0; @@ -370,6 +375,7 @@ async function runSetupWizard(force: boolean = false): Promise { } // Save config + config.setup_completed = true; saveUnifiedConfig(config); // Final summary diff --git a/src/config/unified-config-types.ts b/src/config/unified-config-types.ts index 2315f67d..f2d3618e 100644 --- a/src/config/unified-config-types.ts +++ b/src/config/unified-config-types.ts @@ -521,6 +521,8 @@ export const DEFAULT_DASHBOARD_AUTH_CONFIG: DashboardAuthConfig = { export interface UnifiedConfig { /** Config version (7 for quota management) */ version: number; + /** Flag indicating setup wizard has been completed */ + setup_completed?: boolean; /** Default profile name to use when none specified */ default?: string; /** Account-based profiles (isolated Claude instances) */