File tree Expand file tree Collapse file tree 4 files changed +25
-8
lines changed
browser/components/Settings Expand file tree Collapse file tree 4 files changed +25
-8
lines changed Original file line number Diff line number Diff line change @@ -68,9 +68,9 @@ export function SettingsModal() {
6868 { /* Sidebar */ }
6969 < div className = "border-border-medium flex w-48 shrink-0 flex-col border-r" >
7070 < div className = "border-border-medium flex h-12 items-center border-b px-4" >
71- < h2 id = "settings-title" className = "text-foreground text-sm font-semibold" >
71+ < span id = "settings-title" className = "text-foreground text-sm font-semibold" >
7272 Settings
73- </ h2 >
73+ </ span >
7474 </ div >
7575 < nav className = "flex-1 overflow-y-auto p-2" >
7676 { SECTIONS . map ( ( section ) => (
@@ -94,7 +94,7 @@ export function SettingsModal() {
9494 { /* Content */ }
9595 < div className = "flex flex-1 flex-col overflow-hidden" >
9696 < div className = "border-border-medium flex h-12 items-center justify-between border-b px-6" >
97- < h3 className = "text-foreground text-sm font-medium" > { currentSection . label } </ h3 >
97+ < span className = "text-foreground text-sm font-medium" > { currentSection . label } </ span >
9898 < button
9999 type = "button"
100100 onClick = { handleClose }
Original file line number Diff line number Diff line change 11import React , { useState , useEffect , useCallback } from "react" ;
22import { Plus , Trash2 } from "lucide-react" ;
33import type { ProvidersConfigMap } from "../types" ;
4- import { SUPPORTED_PROVIDERS } from "@/common/constants/providers" ;
4+ import { SUPPORTED_PROVIDERS , PROVIDER_DISPLAY_NAMES } from "@/common/constants/providers" ;
55
66interface NewModelForm {
77 provider : string ;
@@ -98,7 +98,7 @@ export function ModelsSection() {
9898 < option value = "" > Select provider</ option >
9999 { SUPPORTED_PROVIDERS . map ( ( p ) => (
100100 < option key = { p } value = { p } >
101- { p }
101+ { PROVIDER_DISPLAY_NAMES [ p ] }
102102 </ option >
103103 ) ) }
104104 </ select >
@@ -136,7 +136,10 @@ export function ModelsSection() {
136136 className = "border-border-medium bg-background-secondary flex items-center justify-between rounded-md border px-4 py-2"
137137 >
138138 < div className = "flex items-center gap-3" >
139- < span className = "text-muted text-xs capitalize" > { provider } </ span >
139+ < span className = "text-muted text-xs" >
140+ { PROVIDER_DISPLAY_NAMES [ provider as keyof typeof PROVIDER_DISPLAY_NAMES ] ??
141+ provider }
142+ </ span >
140143 < span className = "text-foreground font-mono text-sm" > { modelId } </ span >
141144 </ div >
142145 < button
Original file line number Diff line number Diff line change 11import React , { useState , useEffect , useCallback } from "react" ;
22import { ChevronDown , ChevronRight , Check , X } from "lucide-react" ;
33import type { ProvidersConfigMap } from "../types" ;
4- import { SUPPORTED_PROVIDERS } from "@/common/constants/providers" ;
4+ import { SUPPORTED_PROVIDERS , PROVIDER_DISPLAY_NAMES } from "@/common/constants/providers" ;
55
66export function ProvidersSection ( ) {
77 const [ config , setConfig ] = useState < ProvidersConfigMap > ( { } ) ;
@@ -90,7 +90,9 @@ export function ProvidersSection() {
9090 ) : (
9191 < ChevronRight className = "text-muted h-4 w-4" />
9292 ) }
93- < span className = "text-foreground text-sm font-medium capitalize" > { provider } </ span >
93+ < span className = "text-foreground text-sm font-medium" >
94+ { PROVIDER_DISPLAY_NAMES [ provider ] }
95+ </ span >
9496 </ div >
9597 < div
9698 className = { `h-2 w-2 rounded-full ${ configured ? "bg-green-500" : "bg-border-medium" } ` }
Original file line number Diff line number Diff line change @@ -80,6 +80,18 @@ export type ProviderName = keyof typeof PROVIDER_REGISTRY;
8080 */
8181export const SUPPORTED_PROVIDERS = Object . keys ( PROVIDER_REGISTRY ) as ProviderName [ ] ;
8282
83+ /**
84+ * Display names for providers (proper casing for UI)
85+ */
86+ export const PROVIDER_DISPLAY_NAMES : Record < ProviderName , string > = {
87+ anthropic : "Anthropic" ,
88+ openai : "OpenAI" ,
89+ google : "Google" ,
90+ xai : "xAI" ,
91+ ollama : "Ollama" ,
92+ openrouter : "OpenRouter" ,
93+ } ;
94+
8395/**
8496 * Type guard to check if a string is a valid provider name
8597 */
You can’t perform that action at this time.
0 commit comments