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.

chore: Hide AI bar by default initially (#2846)

Oleg Isonenc8554c35e23e
diff --git a/apps/builder/app/builder/features/ai/ai-command-bar.tsx b/apps/builder/app/builder/features/ai/ai-command-bar.tsx
index 16121cf935..4c40e42d7f 100644
--- a/apps/builder/app/builder/features/ai/ai-command-bar.tsx
+++ b/apps/builder/app/builder/features/ai/ai-command-bar.tsx
@@ -10,7 +10,6 @@ import {
CommandBarContentSection,
CommandBarContentSeparator,
CommandBarTrigger,
- Flex,
Grid,
ScrollArea,
Text,
@@ -456,38 +455,9 @@ const CommandBarContent = (props: {
return (
<>
<CommandBarContentSection>
- <Flex justify={"between"}>
- <Text
- variant={"labelsSentenceCase"}
- color={"subtle"}
- css={{ visibility: "hidden" }}
- >
- {/* shortcutText */}
- </Text>
- <Text variant={"labelsSentenceCase"} align={"center"}>
- Welcome to Webstudio AI alpha!
- </Text>
- <Text variant={"labelsSentenceCase"} color={"subtle"}>
- {/* shortcutText */}
- </Text>
- </Flex>
- <div />
- <Text variant={"labelsSentenceCase"}>
- Ask me to generate or edit sections, text, or images.
- <br />
- For example you can say: ”Make a new contact section”
- </Text>
-
- {/* @todo: change color on theme when available */}
- <Text variant={"labelsSentenceCase"} css={{ color: "#828486" }}>
- This is an experimental (alpha) feature so results may vary in
- quality. Consider sharing your feedback to help us improve.
+ <Text variant="labelsSentenceCase" align="center">
+ Welcome to Webstudio AI alpha!
</Text>
- <Text variant={"labelsSentenceCase"} css={{ color: "#828486" }}>
- By using Webstudio AI, you consent to OpenAI storing interactions
- without personal data.
- </Text>
- <div />
<Grid columns={2} gap={2}>
<Button
onClick={(event) => {
@@ -519,11 +489,6 @@ const CommandBarContent = (props: {
<CommandBarContentSeparator />
<CommandBarContentSection>
- <Text variant={"labelsSentenceCase"} align={"center"}>
- Previous prompts
- </Text>
- <div />
-
{/* negative then positive margin is used to preserve focus outline on command prompts */}
<ScrollArea
css={{
diff --git a/apps/builder/app/builder/shared/client-settings/settings.ts b/apps/builder/app/builder/shared/client-settings/settings.ts
index e5a6daf264..5e04920bf4 100644
--- a/apps/builder/app/builder/shared/client-settings/settings.ts
+++ b/apps/builder/app/builder/shared/client-settings/settings.ts
@@ -8,7 +8,7 @@ import { z } from "zod";
const Settings = z.object({
navigatorLayout: z.enum(["docked", "undocked"]).default("undocked"),
isAiMenuOpen: z.boolean().default(true),
- isAiCommandBarVisible: z.boolean().default(true),
+ isAiCommandBarVisible: z.boolean().default(false),
});
export type Settings = z.infer<typeof Settings>;
diff --git a/packages/design-system/src/components/ai-command-bar/command-bar.stories.tsx b/packages/design-system/src/components/ai-command-bar/command-bar.stories.tsx
index 2700be7b06..8f6d3d7b92 100644
--- a/packages/design-system/src/components/ai-command-bar/command-bar.stories.tsx
+++ b/packages/design-system/src/components/ai-command-bar/command-bar.stories.tsx
@@ -5,16 +5,10 @@ import {
CommandBarButton,
CommandBarContentPrompt,
CommandBarContentSection,
- CommandBarContentSeparator,
CommandBarTrigger,
} from "./index";
-import { Button, Flex, ScrollArea, Box, Grid, Text, theme } from "../..";
-import {
- AiIcon,
- MicIcon,
- ChevronUpIcon,
- ExternalLinkIcon,
-} from "@webstudio-is/icons";
+import { ScrollArea, Box, Grid, Text, theme } from "../..";
+import { AiIcon, MicIcon, ChevronUpIcon } from "@webstudio-is/icons";
export default {
title: "Library/AI Command Bar",
@@ -23,38 +17,6 @@ export default {
const CommandBarContent = () => {
return (
<>
- <CommandBarContentSection>
- <Text variant={"labelsSentenceCase"} align={"center"}>
- Welcome to Webstudio AI alpha!
- </Text>
- <div />
- <Text variant={"labelsSentenceCase"}>
- Ask me to generate or edit sections, text, or images.
- <br /> For example you can say: ”Make a new contact section”
- </Text>
- <Flex align={"end"}>
- <Button
- color="dark"
- css={{
- width: theme.spacing[30],
- }}
- suffix={<ExternalLinkIcon />}
- >
- Learn more
- </Button>
- <Text
- variant={"labelsSentenceCase"}
- color={"subtle"}
- css={{ flex: 1 }}
- align={"center"}
- >
- shortcut ⌘⇧Q
- </Text>
- </Flex>
- </CommandBarContentSection>
-
- <CommandBarContentSeparator />
-
<CommandBarContentSection>
<Text variant={"labelsSentenceCase"} align={"center"}>
Previous propmts