@@ -3,7 +3,6 @@ import { useDialog } from "@opencode-ai/ui/context/dialog"
33import { ProviderIcon } from "@opencode-ai/ui/provider-icon"
44import { Tag } from "@opencode-ai/ui/tag"
55import { showToast } from "@opencode-ai/ui/toast"
6- import { iconNames , type IconName } from "@opencode-ai/ui/icons/provider"
76import { popularProviders , useProviders } from "@/hooks/use-providers"
87import { createMemo , type Component , For , Show } from "solid-js"
98import { useLanguage } from "@/context/language"
@@ -33,11 +32,6 @@ export const SettingsProviders: Component = () => {
3332 const globalSync = useGlobalSync ( )
3433 const providers = useProviders ( )
3534
36- const icon = ( id : string ) : IconName => {
37- if ( iconNames . includes ( id as IconName ) ) return id as IconName
38- return "synthetic"
39- }
40-
4135 const connected = createMemo ( ( ) => {
4236 return providers
4337 . connected ( )
@@ -154,7 +148,7 @@ export const SettingsProviders: Component = () => {
154148 { ( item ) => (
155149 < div class = "group flex flex-wrap items-center justify-between gap-4 min-h-16 py-3 border-b border-border-weak-base last:border-none" >
156150 < div class = "flex items-center gap-3 min-w-0" >
157- < ProviderIcon id = { icon ( item . id ) } class = "size-5 shrink-0 icon-strong-base" />
151+ < ProviderIcon id = { item . id } class = "size-5 shrink-0 icon-strong-base" />
158152 < span class = "text-14-medium text-text-strong truncate" > { item . name } </ span >
159153 < Tag > { type ( item ) } </ Tag >
160154 </ div >
@@ -185,7 +179,7 @@ export const SettingsProviders: Component = () => {
185179 < div class = "flex flex-wrap items-center justify-between gap-4 min-h-16 py-3 border-b border-border-weak-base last:border-none" >
186180 < div class = "flex flex-col min-w-0" >
187181 < div class = "flex items-center gap-x-3" >
188- < ProviderIcon id = { icon ( item . id ) } class = "size-5 shrink-0 icon-strong-base" />
182+ < ProviderIcon id = { item . id } class = "size-5 shrink-0 icon-strong-base" />
189183 < span class = "text-14-medium text-text-strong" > { item . name } </ span >
190184 < Show when = { item . id === "opencode" } >
191185 < span class = "text-14-regular text-text-weak" >
@@ -228,7 +222,7 @@ export const SettingsProviders: Component = () => {
228222 >
229223 < div class = "flex flex-col min-w-0" >
230224 < div class = "flex flex-wrap items-center gap-x-3 gap-y-1" >
231- < ProviderIcon id = { icon ( "synthetic" ) } class = "size-5 shrink-0 icon-strong-base" />
225+ < ProviderIcon id = "synthetic" class = "size-5 shrink-0 icon-strong-base" />
232226 < span class = "text-14-medium text-text-strong" > { language . t ( "provider.custom.title" ) } </ span >
233227 < Tag > { language . t ( "settings.providers.tag.custom" ) } </ Tag >
234228 </ div >
0 commit comments