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.

feat: Enable AI for everyone (#2518)

Oleg Isonen6d8dc531a6c8
diff --git a/apps/builder/app/builder/builder.tsx b/apps/builder/app/builder/builder.tsx
index a99e4891f6..7e3553249f 100644
--- a/apps/builder/app/builder/builder.tsx
+++ b/apps/builder/app/builder/builder.tsx
@@ -45,7 +45,6 @@ import { useSyncPageUrl } from "~/shared/pages";
import { useMount } from "~/shared/hook-utils/use-mount";
import { subscribeCommands } from "~/builder/shared/commands";
import { AiCommandBar } from "./features/ai/ai-command-bar";
-import { isFeatureEnabled } from "@webstudio-is/feature-flags";
registerContainers();
@@ -316,9 +315,7 @@ export const Builder = ({
}}
/>
</Workspace>
- {isFeatureEnabled("ai") && (
- <AiCommandBar isPreviewMode={isPreviewMode} />
- )}
+ <AiCommandBar isPreviewMode={isPreviewMode} />
</Main>
<SidePanel gridArea="sidebar" isPreviewMode={isPreviewMode}>
<SidebarLeft publish={publish} />
diff --git a/apps/builder/app/builder/features/sidebar-left/sidebar-left.tsx b/apps/builder/app/builder/features/sidebar-left/sidebar-left.tsx
index 0b32535414..9852387344 100644
--- a/apps/builder/app/builder/features/sidebar-left/sidebar-left.tsx
+++ b/apps/builder/app/builder/features/sidebar-left/sidebar-left.tsx
@@ -17,7 +17,6 @@ import { theme } from "@webstudio-is/design-system";
import { AiIcon, BugIcon, HelpIcon } from "@webstudio-is/icons";
import { HelpPopover } from "./help-popover";
import { useStore } from "@nanostores/react";
-import { isFeatureEnabled } from "@webstudio-is/feature-flags";
import { $activeSidebarPanel } from "~/builder/shared/nano-states";
const none = { TabContent: () => null };
@@ -65,22 +64,20 @@ export const SidebarLeft = ({ publish }: SidebarLeftProps) => {
{tabName === "none" ? null : panels[tabName].icon}
</SidebarTabsTrigger>
))}
- {isFeatureEnabled("ai") && (
- <SidebarTabsTrigger
- aria-label="ai"
- value={
- "anyValueNotInTabName" /* !!! This button does not have active state, use impossible tab value !!! */
- }
- onClick={() => {
- setClientSetting(
- "isAiCommandBarVisible",
- clientSettings.isAiCommandBarVisible === true ? false : true
- );
- }}
- >
- <AiIcon />
- </SidebarTabsTrigger>
- )}
+ <SidebarTabsTrigger
+ aria-label="ai"
+ value={
+ "anyValueNotInTabName" /* !!! This button does not have active state, use impossible tab value !!! */
+ }
+ onClick={() => {
+ setClientSetting(
+ "isAiCommandBarVisible",
+ clientSettings.isAiCommandBarVisible === true ? false : true
+ );
+ }}
+ >
+ <AiIcon />
+ </SidebarTabsTrigger>
</SidebarTabsList>
<Box css={{ borderRight: `1px solid ${theme.colors.borderMain}` }}>
<HelpPopover onOpenChange={setHelpIsOpen}>
diff --git a/packages/feature-flags/src/flags.ts b/packages/feature-flags/src/flags.ts
index d2d960851a..16696844e2 100644
--- a/packages/feature-flags/src/flags.ts
+++ b/packages/feature-flags/src/flags.ts
@@ -1,8 +1,7 @@
-export const example = false;
export const dark = false;
export const unsupportedBrowsers = false;
export const displayContents = false;
// @todo this should be pro users check
export const adminRole = false;
-export const ai = false;
+export const ai = true;
export const aiRadixComponents = false;