@@ -34,7 +34,6 @@ import {
3434} from '@/lib/oauth'
3535import { EditConnectorModal } from '@/app/workspace/[workspaceId]/knowledge/[id]/components/edit-connector-modal/edit-connector-modal'
3636import { OAuthRequiredModal } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/credential-selector/components/oauth-required-modal'
37- import { CONNECTOR_META } from '@/connectors/icons'
3837import { CONNECTOR_REGISTRY } from '@/connectors/registry'
3938import type { ConnectorData , SyncLogData } from '@/hooks/queries/kb/connectors'
4039import {
@@ -265,15 +264,14 @@ function ConnectorCard({
265264 const [ expanded , setExpanded ] = useState ( false )
266265 const [ showOAuthModal , setShowOAuthModal ] = useState ( false )
267266
268- const meta = CONNECTOR_META [ connector . connectorType ]
269- const Icon = meta ?. icon
267+ const connectorDef = CONNECTOR_REGISTRY [ connector . connectorType ]
268+ const Icon = connectorDef ?. icon
270269 const statusConfig =
271270 STATUS_CONFIG [ connector . status as keyof typeof STATUS_CONFIG ] || STATUS_CONFIG . active
272271
273- const connectorConfig = CONNECTOR_REGISTRY [ connector . connectorType ]
274- const serviceId = connectorConfig ?. oauth . provider
272+ const serviceId = connectorDef ?. oauth . provider
275273 const providerId = serviceId ? getProviderIdFromServiceId ( serviceId ) : undefined
276- const requiredScopes = connectorConfig ?. oauth . requiredScopes ?? [ ]
274+ const requiredScopes = connectorDef ?. oauth . requiredScopes ?? [ ]
277275
278276 const { data : credentials } = useOAuthCredentials ( providerId )
279277
@@ -297,7 +295,7 @@ function ConnectorCard({
297295 < div className = 'flex flex-col gap-[2px]' >
298296 < div className = 'flex items-center gap-[8px]' >
299297 < span className = 'font-medium text-[13px] text-[var(--text-primary)]' >
300- { meta ?. name || connector . connectorType }
298+ { connectorDef ?. name || connector . connectorType }
301299 </ span >
302300 < Badge variant = { statusConfig . variant } className = 'text-[10px]' >
303301 { connector . status === 'syncing' && (
@@ -444,7 +442,7 @@ function ConnectorCard({
444442 isOpen = { showOAuthModal }
445443 onClose = { ( ) => setShowOAuthModal ( false ) }
446444 provider = { providerId as OAuthProvider }
447- toolName = { connectorConfig ?. name ?? connector . connectorType }
445+ toolName = { connectorDef ?. name ?? connector . connectorType }
448446 requiredScopes = { getCanonicalScopesForProvider ( providerId ) }
449447 newScopes = { missingScopes }
450448 serviceId = { serviceId }
0 commit comments