mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 04:18:05 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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) */
|
||||
|
||||
Reference in New Issue
Block a user