History

Seed add form identity from the catalog preset name

Rhys Sullivan committed 4 months ago

Commit c2f60581 parent 70b6b761 file · +2 −1Browse files

Unified · Split

packages/plugins/openapi/src/react/AddOpenApiSource.tsx+2−1
@@ -111,7 +111,8 @@ export default function AddOpenApiSource(props: { · 110 unmodified lines
111111 // Agent-visible description: prefilled from the spec's `info.description`
112112 // until the user types (null = untouched, keep deriving from the preview).
113113 const [descriptionDraft, setDescriptionDraft] = useState<string | null>(null);
114− const identityFallbackName = preview ? Option.getOrElse(preview.title, () => "") : "";
114+ const identityFallbackName =
115+ initialPreset?.name ?? (preview ? Option.getOrElse(preview.title, () => "") : "");
115116 const identity = useIntegrationIdentity({
116117 fallbackName: identityFallbackName,
117118 fallbackNamespace: props.initialNamespace,