MCPcopy
hub / github.com/continuedev/continue / initializeWithOnboarding

Function initializeWithOnboarding

extensions/cli/src/onboarding.ts:122–151  ·  view source on GitHub ↗
(
  authConfig: AuthConfig,
  configPath: string | undefined,
)

Source from the content-addressed store, hash-verified

120}
121
122export async function initializeWithOnboarding(
123 authConfig: AuthConfig,
124 configPath: string | undefined,
125) {
126 const firstTime = await isFirstTime();
127
128 if (configPath !== undefined) {
129 // throw an early error is configPath is invalid or has errors
130 try {
131 await loadConfiguration(
132 authConfig,
133 configPath,
134 getApiClient(undefined),
135 [],
136 false,
137 );
138 } catch (errorMessage) {
139 throw new Error(
140 `Failed to load config from "${configPath}": ${errorMessage}`,
141 );
142 }
143 }
144
145 if (!firstTime) return;
146
147 const wasOnboarded = await runOnboardingFlow(configPath);
148 if (wasOnboarded) {
149 await markOnboardingComplete();
150 }
151}

Callers 2

onboarding.test.tsFile · 0.85
initializeServicesFunction · 0.85

Calls 5

isFirstTimeFunction · 0.85
loadConfigurationFunction · 0.85
getApiClientFunction · 0.85
runOnboardingFlowFunction · 0.85
markOnboardingCompleteFunction · 0.85

Tested by

no test coverage detected