diff --git a/frontend/components/ui/button.tsx b/frontend/components/ui/button.tsx index 5d8b3287..b9a83922 100644 --- a/frontend/components/ui/button.tsx +++ b/frontend/components/ui/button.tsx @@ -3,7 +3,7 @@ import { cva, type VariantProps } from "class-variance-authority"; import * as React from "react"; const buttonVariants = cva( - "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-70 disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", + "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", { variants: { variant: { @@ -11,7 +11,7 @@ const buttonVariants = cva( destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90", outline: - "border border-input hover:bg-muted hover:text-accent-foreground", + "border border-input hover:bg-muted hover:text-accent-foreground disabled:bg-muted disabled:!border-none", primary: "border bg-background text-secondary-foreground hover:bg-muted hover:shadow-sm", warning: diff --git a/frontend/src/app/globals.css b/frontend/src/app/globals.css index 5dec1636..4b7072c1 100644 --- a/frontend/src/app/globals.css +++ b/frontend/src/app/globals.css @@ -34,6 +34,7 @@ --accent-emerald-foreground: 161.4 93.5% 30.4%; --accent-pink-foreground: 333.3 71.4% 50.6%; + --accent-amber-foreground: 26 90.5% 37.1%; /* Status Colors */ --status-red: #ef4444; @@ -90,6 +91,7 @@ --accent-emerald-foreground: 158.1 64.4% 51.6%; --accent-pink-foreground: 328.6 85.5% 70.2%; + --accent-amber-foreground: 45.9 96.7% 64.5%; /* Dark mode data type colors */ --datatype-blue: 211.7 96.4% 78.4%; diff --git a/frontend/src/app/onboarding/components/ibm-onboarding.tsx b/frontend/src/app/onboarding/components/ibm-onboarding.tsx index ddf964c6..bd08be67 100644 --- a/frontend/src/app/onboarding/components/ibm-onboarding.tsx +++ b/frontend/src/app/onboarding/components/ibm-onboarding.tsx @@ -1,11 +1,11 @@ import { useState } from "react"; import { LabelInput } from "@/components/label-input"; import IBMLogo from "@/components/logo/ibm-logo"; +import { useDebouncedValue } from "@/lib/debounce"; import type { OnboardingVariables } from "../../api/mutations/useOnboardingMutation"; import { useGetIBMModelsQuery } from "../../api/queries/useGetModelsQuery"; import { useModelSelection } from "../hooks/useModelSelection"; import { useUpdateSettings } from "../hooks/useUpdateSettings"; -import { useDebouncedValue } from "@/lib/debounce"; import { AdvancedOnboarding } from "./advanced"; export function IBMOnboarding({ @@ -96,19 +96,21 @@ export function IBMOnboarding({ onChange={(e) => setProjectId(e.target.value)} /> {isLoadingModels && ( -

+

Validating configuration...

)} {modelsError && ( -

+

Invalid configuration or connection failed

)} {modelsData && (modelsData.language_models?.length > 0 || modelsData.embedding_models?.length > 0) && ( -

Configuration is valid

+

+ Configuration is valid +

)} -
- setEndpoint(e.target.value)} - /> - {isConnecting && ( -

- Connecting to Ollama server... -

- )} - {hasConnectionError && ( -

- Cannot connect to Ollama server. Please check the endpoint. -

- )} - {hasNoModels && ( -

- No models found. Please install some models on your Ollama server. -

- )} - {isValidConnection && ( -

Connected successfully

- )} +
+
+ setEndpoint(e.target.value)} + /> + {isConnecting && ( +

+ Connecting to Ollama server... +

+ )} + {hasConnectionError && ( +

+ Can’t reach Ollama at {debouncedEndpoint}. Update the endpoint or + start the server. +

+ )} + {hasNoModels && ( +

+ No models found. Please install some models on your Ollama server. +

+ )} + {isValidConnection && ( +

+ Connected successfully +

+ )} +
+ + } + value={embeddingModel} + onValueChange={setEmbeddingModel} + /> + + + } + value={languageModel} + onValueChange={setLanguageModel} + /> +
- - } - value={embeddingModel} - onValueChange={setEmbeddingModel} - /> - - - } - value={languageModel} - onValueChange={setLanguageModel} - /> - - setApiKey(e.target.value)} /> {isLoadingModels && ( -

Validating API key...

+

+ Validating API key... +

)} {modelsError && ( -

- Invalid API key or configuration +

+ Invalid API key

)} {modelsData && (modelsData.language_models?.length > 0 || modelsData.embedding_models?.length > 0) && ( -

Configuration is valid

+

+ API Key is valid +

)}