From 10b50a37432c1e16c5d163f1f3f4af83b480b404 Mon Sep 17 00:00:00 2001 From: Nate Date: Sat, 19 Jul 2025 17:20:48 -0700 Subject: [PATCH 1/2] fix: don't skip onboarding when there is a config.yaml --- spec/onboarding.md | 9 ++++++--- src/commands/logout.ts | 11 ++++++++++- src/onboarding.ts | 17 +++++------------ 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/spec/onboarding.md b/spec/onboarding.md index a34afca14..7bc9dc39d 100644 --- a/spec/onboarding.md +++ b/spec/onboarding.md @@ -4,9 +4,10 @@ When a user first runs `cn` in interactive mode, they will be taken through "onb ## Onboarding flow +**The onboarding flow runs when the user hasn't completed onboarding before, regardless of whether they have a valid config.yaml file.** + 1. If the --config flag is provided, load this config -2. If the user has a ~/.continue/config.yaml with an acceptable model, load this config automatically -3. Otherwise, we will present the user with two options: +2. Otherwise, we will present the user with two options: - Log in with Continue: log them in, which will automatically create their assistant and then we can load the first assistant from the first org - Enter your Anthropic API key: let them enter the key, and then either create a ~/.continue/config.yaml with the following contents OR update the existing config.yaml to add the model @@ -26,8 +27,10 @@ When something in the onboarding flow is done automatically, we should tell the ## Normal flow +**The normal flow runs when the user has already completed onboarding.** + 1. If the --config flag is provided, load this config 2. If the user is logged in, look for the first assistant in the selected org 3. If there are no assistants in that org, then look for a local ~/.continue/config.yaml 4. If there is no config.yaml, look for an ANTHROPIC_API_KEY in the environment and manually construct the config object to include just the claude-4-sonnet model with that API key -5. If none of the above, then bring the user to step 3 of the onboarding flow +5. If none of the above, then bring the user to step 3 of the onboarding flow \ No newline at end of file diff --git a/src/commands/logout.ts b/src/commands/logout.ts index bd520191a..aa7d68128 100644 --- a/src/commands/logout.ts +++ b/src/commands/logout.ts @@ -1,5 +1,14 @@ +import * as fs from "fs"; +import * as os from "os"; +import * as path from "path"; import { logout as workosLogout } from "../auth/workos.js"; export async function logout() { workosLogout(); -} + + // Remove onboarding completion flag so user will go through onboarding again + const onboardingFlagPath = path.join(os.homedir(), ".continue", ".onboarding_complete"); + if (fs.existsSync(onboardingFlagPath)) { + fs.unlinkSync(onboardingFlagPath); + } +} \ No newline at end of file diff --git a/src/onboarding.ts b/src/onboarding.ts index 7bd54ad60..70d9bc2e2 100644 --- a/src/onboarding.ts +++ b/src/onboarding.ts @@ -111,14 +111,7 @@ export async function runOnboardingFlow( return { ...result, wasOnboarded: false }; } - // Step 2: Check if user has ~/.continue/config.yaml with acceptable model - if (await checkHasAcceptableModel(CONFIG_PATH)) { - console.log(chalk.blue(`✓ Using existing ${CONFIG_PATH}`)); - const result = await initialize(authConfig, CONFIG_PATH); - return { ...result, wasOnboarded: true }; - } - - // Step 3: Present user with two options + // Step 2: Present user with two options (no longer auto-load config.yaml) console.log(chalk.yellow("Choose how you'd like to set up your agent:")); console.log(chalk.white("1. Log in with Continue")); console.log(chalk.white("2. Enter your Anthropic API key")); @@ -181,7 +174,7 @@ export async function runNormalFlow( if (isAuthenticated()) { try { const result = await initialize(authConfig, undefined); - return { ...result, wasOnboarded: true }; + return { ...result, wasOnboarded: false }; } catch (error) {} } @@ -189,7 +182,7 @@ export async function runNormalFlow( if (fs.existsSync(CONFIG_PATH)) { try { const result = await initialize(authConfig, CONFIG_PATH); - return { ...result, wasOnboarded: true }; + return { ...result, wasOnboarded: false }; } catch (error) { console.log(chalk.yellow("⚠ Invalid config file found")); } @@ -201,7 +194,7 @@ export async function runNormalFlow( await createOrUpdateConfig(process.env.ANTHROPIC_API_KEY); console.log(chalk.gray(` Config saved to: ${CONFIG_PATH}`)); const result = await initialize(authConfig, CONFIG_PATH); - return { ...result, wasOnboarded: true }; + return { ...result, wasOnboarded: false }; } // Step 5: Fall back to onboarding flow @@ -243,4 +236,4 @@ export async function initializeWithOnboarding( } return result; -} +} \ No newline at end of file From 04b1bdfcab6e69cf85a99be68a2a461ecbc5dcaf Mon Sep 17 00:00:00 2001 From: Nate Date: Sat, 19 Jul 2025 17:21:38 -0700 Subject: [PATCH 2/2] ci: skip git push in release --- .releaserc.json | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.releaserc.json b/.releaserc.json index 07c42f41c..88c10e3c2 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -16,13 +16,6 @@ "pkgRoot": "." } ], - [ - "@semantic-release/git", - { - "assets": ["package.json", "CHANGELOG.md"], - "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" - } - ], "@semantic-release/github" ] }