Skip to content

Commit ad1b8bf

Browse files
committed
You can now dismiss the onboarding properly
1 parent 4df58d5 commit ad1b8bf

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

archon-ui-main/src/components/onboarding/ProviderStep.tsx

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ export const ProviderStep = ({ onSaved, onSkip }: ProviderStepProps) => {
4242
});
4343

4444
showToast('API key saved successfully!', 'success');
45+
// Mark onboarding as dismissed when API key is saved
46+
localStorage.setItem('onboardingDismissed', 'true');
4547
onSaved();
4648
} catch (error) {
4749
// Detailed error handling for critical configuration per alpha principles
@@ -87,6 +89,8 @@ export const ProviderStep = ({ onSaved, onSkip }: ProviderStepProps) => {
8789

8890
const handleSkip = () => {
8991
showToast('You can configure your provider in Settings', 'info');
92+
// Mark onboarding as dismissed when skipping
93+
localStorage.setItem('onboardingDismissed', 'true');
9094
onSkip();
9195
};
9296

@@ -180,10 +184,27 @@ export const ProviderStep = ({ onSaved, onSkip }: ProviderStepProps) => {
180184
<Button
181185
variant="primary"
182186
size="lg"
183-
onClick={handleSkip}
187+
onClick={async () => {
188+
// Save the provider selection for non-OpenAI providers
189+
try {
190+
await credentialsService.updateCredential({
191+
key: 'LLM_PROVIDER',
192+
value: provider,
193+
is_encrypted: false,
194+
category: 'rag_strategy'
195+
});
196+
showToast(`${provider === 'google' ? 'Google Gemini' : 'Ollama'} selected as provider`, 'success');
197+
// Mark onboarding as dismissed
198+
localStorage.setItem('onboardingDismissed', 'true');
199+
onSaved();
200+
} catch (error) {
201+
console.error('Failed to save provider selection:', error);
202+
showToast('Failed to save provider selection', 'error');
203+
}
204+
}}
184205
className="flex-1"
185206
>
186-
Continue to Settings
207+
Continue with {provider === 'google' ? 'Gemini' : 'Ollama'}
187208
</Button>
188209
</div>
189210
</div>

0 commit comments

Comments
 (0)