diff --git a/services/platform/app/components/ui/data-display/collapsible-guide.tsx b/services/platform/app/components/ui/data-display/collapsible-guide.tsx index 5789fc86a..30a584268 100644 --- a/services/platform/app/components/ui/data-display/collapsible-guide.tsx +++ b/services/platform/app/components/ui/data-display/collapsible-guide.tsx @@ -34,7 +34,7 @@ export function CollapsibleGuide({
), + pre: ({ node: _node, className, children, ...rest }) => ( +
+                {children}
+              
+ ), }} > {content} diff --git a/services/platform/app/components/ui/layout/card.tsx b/services/platform/app/components/ui/layout/card.tsx index 3b8dbbe63..1d67f018a 100644 --- a/services/platform/app/components/ui/layout/card.tsx +++ b/services/platform/app/components/ui/layout/card.tsx @@ -29,7 +29,7 @@ export function Card({ return (
diff --git a/services/platform/app/components/ui/navigation/tabs.tsx b/services/platform/app/components/ui/navigation/tabs.tsx index ebd7db946..8f4fbe2a6 100644 --- a/services/platform/app/components/ui/navigation/tabs.tsx +++ b/services/platform/app/components/ui/navigation/tabs.tsx @@ -30,7 +30,7 @@ interface TabsProps { } const listVariants = cva( - 'scrollbar-hide inline-flex items-center overflow-x-auto text-muted-foreground', + 'scrollbar-hide inline-flex items-center overflow-x-auto text-muted-foreground min-w-full justify-around', { variants: { variant: { diff --git a/services/platform/app/features/settings/providers/components/provider-add-panel.tsx b/services/platform/app/features/settings/providers/components/provider-add-panel.tsx index 070cdacb4..ab8cea503 100644 --- a/services/platform/app/features/settings/providers/components/provider-add-panel.tsx +++ b/services/platform/app/features/settings/providers/components/provider-add-panel.tsx @@ -616,14 +616,14 @@ export function ProviderAddPanel({ {/* ── Models section ─────────────────────────────── */} - + {t('providers.models')} - + {canFetch && ( - - ); -} - function GeneralSection({ providerName, organizationId, @@ -346,13 +350,17 @@ function GeneralSection({ const [panelOpen, setPanelOpen] = useState(false); return ( - <> + + + + {t('providers.general')} + + + - setPanelOpen(true)} - editLabel={t('providers.editGeneral')} - /> {config.displayName} @@ -370,7 +378,7 @@ function GeneralSection({ providerName={providerName} organizationId={organizationId} /> - + ); } @@ -397,29 +405,39 @@ function DefaultModelsSection({ return ( <> - - setPanelOpen(true)} - editLabel={t('providers.editDefaults')} - /> - - {modelDisplayName(config.defaults?.chat)} - - - {modelDisplayName(config.defaults?.vision)} - - - {modelDisplayName(config.defaults?.embedding)} - - - {modelDisplayName(config.defaults?.['image-generation'])} - - - {modelDisplayName(config.defaults?.transcription)} - - + + + + + {t('providers.defaultModels')} + + + {t('providers.defaultModelsDescription')} + + + + + + + {modelDisplayName(config.defaults?.chat)} + + + {modelDisplayName(config.defaults?.vision)} + + + {modelDisplayName(config.defaults?.embedding)} + + + {modelDisplayName(config.defaults?.['image-generation'])} + + + {modelDisplayName(config.defaults?.transcription)} + + + - - setDialogOpen(true)} - editLabel={hasSecret ? t('providers.editKey') : t('providers.addKey')} - > - - - {hasSecret ? ( - - - {t('providers.apiKeyConfigured')} - - - {maskedKey} - - - ) : ( - - - {t('providers.apiKeyNotConfigured')} - + + + + {t('providers.apiKey')} + + + + - )} - + + + {hasSecret ? ( + + + {t('providers.apiKeyConfigured')} + + + {maskedKey} + + + ) : ( + + + {t('providers.apiKeyNotConfigured')} + + + )} + + {t('providers.models')} - +
) : (
-
+
setSearchQuery(e.target.value)} @@ -1515,6 +1545,7 @@ function ModelsSection({ description: t( 'providers.providerOptions.modelLevelDescription', ), + guideLabel: t('providers.providerOptions.guideLabel'), helpText: t('providers.providerOptions.modelLevelHelp'), }} /> diff --git a/services/platform/app/features/settings/providers/components/provider-options-editor.tsx b/services/platform/app/features/settings/providers/components/provider-options-editor.tsx index 728d2d29d..df37e5a7b 100644 --- a/services/platform/app/features/settings/providers/components/provider-options-editor.tsx +++ b/services/platform/app/features/settings/providers/components/provider-options-editor.tsx @@ -6,6 +6,7 @@ import { Pencil, X } from 'lucide-react'; import { useEffect, useRef, useState } from 'react'; import { z } from 'zod'; +import { CollapsibleGuide } from '@/app/components/ui/data-display/collapsible-guide'; import { ConfirmDialog } from '@/app/components/ui/dialog/confirm-dialog'; import { JsonInput } from '@/app/components/ui/forms/json-input'; import { Textarea } from '@/app/components/ui/forms/textarea'; @@ -106,6 +107,7 @@ interface Props { copy: { title: string; description: string; + guideLabel: string; notConfigured: string; editLabel: string; saveLabel: string; @@ -232,25 +234,20 @@ export function ProviderOptionsEditor({ return ( <> - - - - {copy.title} - - {copy.description} - - - + -
+ + + {isEmpty ? ( {copy.notConfigured} @@ -265,13 +262,13 @@ export function ProviderOptionsEditor({
               {initialJson}
             
)} -
-
+ + void; onClose: () => void; @@ -337,6 +336,7 @@ interface SheetBodyProps { function ProviderOptionsEditorSheet({ title, description, + guideLabel, draft, onDraftChange, onClose, @@ -373,9 +373,7 @@ function ProviderOptionsEditorSheet({
- - {description} - +