@@ -147,7 +147,58 @@ export function IntegrationSelector({
147147 ) ;
148148 }
149149
150- // Show radio-style selection list
150+ // Single integration - show as outlined field (not radio-style)
151+ if ( integrations . length === 1 ) {
152+ const integration = integrations [ 0 ] ;
153+ const displayName = integration . name || `${ integrationLabel } API Key` ;
154+ const isSelected = value === integration . id ;
155+
156+ // Auto-select if not already selected
157+ if ( ! isSelected && ! disabled ) {
158+ onChange ( integration . id ) ;
159+ }
160+
161+ return (
162+ < >
163+ < div
164+ className = { cn (
165+ "flex h-9 w-full items-center gap-2 rounded-md border px-3 text-sm" ,
166+ disabled && "cursor-not-allowed opacity-50"
167+ ) }
168+ >
169+ < Check className = "size-4 shrink-0 text-green-600" />
170+ < span className = "flex-1 truncate" > { displayName } </ span >
171+ < Button
172+ className = "size-6 shrink-0"
173+ disabled = { disabled }
174+ onClick = { ( ) => setEditingIntegration ( integration ) }
175+ size = "icon"
176+ variant = "ghost"
177+ >
178+ < Pencil className = "size-3" />
179+ </ Button >
180+ </ div >
181+
182+ { editingIntegration && (
183+ < IntegrationFormDialog
184+ integration = { editingIntegration }
185+ mode = "edit"
186+ onClose = { ( ) => setEditingIntegration ( null ) }
187+ onDelete = { async ( ) => {
188+ await loadIntegrations ( true ) ;
189+ setEditingIntegration ( null ) ;
190+ integrationsVersion . current += 1 ;
191+ setIntegrationsVersion ( ( v ) => v + 1 ) ;
192+ } }
193+ onSuccess = { handleEditSuccess }
194+ open
195+ />
196+ ) }
197+ </ >
198+ ) ;
199+ }
200+
201+ // Multiple integrations - show radio-style selection list
151202 return (
152203 < >
153204 < div className = "flex flex-col gap-1" >
@@ -158,7 +209,7 @@ export function IntegrationSelector({
158209 return (
159210 < div
160211 className = { cn (
161- "flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors" ,
212+ "flex w-full items-center gap-2 rounded-md px-[13px] py-1.5 text-sm transition-colors" ,
162213 isSelected
163214 ? "bg-primary/10 text-primary"
164215 : "hover:bg-muted/50" ,
0 commit comments