{#each Array(totalSteps) as _, i}
{/each}
{#if step === 0}

{$t('onboarding.welcomeTitle')}

{$t('onboarding.welcomeDesc')}

{:else if step === 1}

{$t('onboarding.openFolder')}

{$t('onboarding.openFolderDesc')}

{#if selectedPath}

{selectedPath}

{/if}
{:else if step === 2}
{ if (e.key === 'Enter' && apiKey.trim()) connectAi(); }} >

{$t('onboarding.connectAi')}

{$t('onboarding.connectAiDesc')}

{#if aiConnected}

{$t('onboarding.connected', { name: config.name })}

{:else}

{$t('onboarding.provider')}

{#if provider === 'openai'}

{$t('onboarding.apiType')}

{/if}

{$t('connections.baseUrl')}

{$t('connections.apiKey')}

{$t('onboarding.keyStaysLocal')}

{/if}
{:else if step === 3}

{$t('onboarding.ready')}

{$t('onboarding.readyDesc')}

{$t('onboarding.tipSearch', { shortcut: searchShortcut })}

{$t('onboarding.tipTerminal')}

{$t('onboarding.tipMobile')}

{/if}
{#if showPicker} { showPicker = false; const params = new URLSearchParams(window.location.search); const wsPath = params.get('workspace'); if (wsPath) { selectedPath = wsPath; const url = new URL(window.location.href); url.searchParams.delete('workspace'); window.history.replaceState({}, '', url.toString()); next(); } }} /> {/if}