Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

fix: Disable Radix components in AI (#2478)

Giuseppebcbef77d858c
diff --git a/apps/builder/app/builder/features/ai/ai-fetch-result.ts b/apps/builder/app/builder/features/ai/ai-fetch-result.ts
index 7f4291d1a9..a4ace21f86 100644
--- a/apps/builder/app/builder/features/ai/ai-fetch-result.ts
+++ b/apps/builder/app/builder/features/ai/ai-fetch-result.ts
@@ -191,10 +191,15 @@ export const fetchResult = async (
const $availableComponentsNames = computed(
[registeredComponentMetasStore],
(metas) => {
- const exclude = ["Body", "Slot"];
+ const exclude = [
+ "Body",
+ "Slot",
+ // @todo Remove Radix exclusion when the model has been fine-tuned to understand them.
+ "@webstudio-is/sdk-components-react-radix:",
+ ];
return [...metas.keys()]
- .filter((name) => !exclude.includes(name))
+ .filter((name) => !exclude.some((excluded) => name.startsWith(excluded)))
.map(parseComponentName);
}
);