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.
This commit is contained in:
kaitranntt
2026-01-25 21:21:02 -05:00
parent 588b757d21
commit 85e41a56e9
2 changed files with 8 additions and 0 deletions
+6
View File
@@ -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<void> {
}
// Save config
config.setup_completed = true;
saveUnifiedConfig(config);
// Final summary
+2
View File
@@ -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) */