diff --git a/app/client/src/ce/constants/messages.ts b/app/client/src/ce/constants/messages.ts index b416a317a299..a39290d43c74 100644 --- a/app/client/src/ce/constants/messages.ts +++ b/app/client/src/ce/constants/messages.ts @@ -214,6 +214,10 @@ export const NEW_APPLICATION = () => `New application`; export const APPLICATIONS = () => `Applications`; export const FIXED_APPLICATIONS = () => `Classic Applications`; export const AI_AGENTS_APPLICATIONS = () => `AI Agents`; +export const AI_APPLICATION_CARD_LIST_ZERO_STATE = () => + `There are no AI Agents in this workspace.`; +export const AI_AGENT_AUTH_SUBTITLE = () => + `Sign up with any Google account.\n Support for email will be available soon.`; export const USER_PROFILE_PICTURE_UPLOAD_FAILED = () => "Unable to upload display picture."; diff --git a/app/client/src/ce/entities/FeatureFlag.ts b/app/client/src/ce/entities/FeatureFlag.ts index b178e02dd480..a07fb4ea25ed 100644 --- a/app/client/src/ce/entities/FeatureFlag.ts +++ b/app/client/src/ce/entities/FeatureFlag.ts @@ -17,6 +17,7 @@ export const FEATURE_FLAG = { "release_show_publish_app_to_community_enabled", license_gac_enabled: "license_gac_enabled", release_anvil_enabled: "release_anvil_enabled", + license_ai_agent_enabled: "license_ai_agent_enabled", license_git_branch_protection_enabled: "license_git_branch_protection_enabled", license_git_continuous_delivery_enabled: @@ -75,6 +76,7 @@ export const DEFAULT_FEATURE_FLAG_VALUE: FeatureFlags = { release_show_publish_app_to_community_enabled: false, license_gac_enabled: false, release_anvil_enabled: false, + license_ai_agent_enabled: false, release_drag_drop_building_blocks_enabled: false, license_git_branch_protection_enabled: false, license_git_continuous_delivery_enabled: false, diff --git a/app/client/src/ce/pages/Applications/index.tsx b/app/client/src/ce/pages/Applications/index.tsx index 9604a0b79ecf..c4903e24175b 100644 --- a/app/client/src/ce/pages/Applications/index.tsx +++ b/app/client/src/ce/pages/Applications/index.tsx @@ -9,6 +9,7 @@ import { import type { UpdateApplicationPayload } from "ee/api/ApplicationApi"; import { AI_AGENTS_APPLICATIONS, + AI_APPLICATION_CARD_LIST_ZERO_STATE, APPLICATIONS, CREATE_A_NEW_WORKSPACE, createMessage, @@ -17,6 +18,7 @@ import { NO_WORKSPACE_HEADING, WORKSPACES_HEADING, } from "ee/constants/messages"; +import { getIsAiAgentFlowEnabled } from "ee/selectors/aiAgentSelectors"; import type { ApplicationPayload } from "entities/Application"; import { ReduxActionTypes } from "ee/constants/ReduxActionConstants"; import { createWorkspaceSubmitHandler } from "ee/pages/workspace/helpers"; @@ -552,6 +554,7 @@ export function ApplicationsSection(props: any) { // This checks if the Anvil feature flag is enabled and shows different sections in the workspace // for Anvil and Classic applications const isAnvilEnabled = useSelector(getIsAnvilLayoutEnabled); + const isAiAgentFlowEnabled = useSelector(getIsAiAgentFlowEnabled); const currentUser = useSelector(getCurrentUser); const isMobile = useIsMobileDevice(); const urlParams = new URLSearchParams(location.search); @@ -896,42 +899,47 @@ export function ApplicationsSection(props: any) { ) : ( <> - - {isAnvilEnabled && - anvilApplications.length > 0 && ( // AI Agents list - - )} + {!isAiAgentFlowEnabled && ( + + )} + {((isAnvilEnabled && anvilApplications.length > 0) || + isAiAgentFlowEnabled) && ( + + )} { return undefined; }; + +export const getIsAiAgentFlowEnabled = (state: AppState) => { + return selectFeatureFlagCheck(state, FEATURE_FLAG.license_ai_agent_enabled); +}; diff --git a/app/client/src/pages/UserAuth/Container.tsx b/app/client/src/pages/UserAuth/Container.tsx index 936e4b90ddb0..f96dce7338fe 100644 --- a/app/client/src/pages/UserAuth/Container.tsx +++ b/app/client/src/pages/UserAuth/Container.tsx @@ -68,7 +68,7 @@ function Container(props: ContainerProps) { {title} {subtitle && ( -

+

{subtitle}

)} diff --git a/app/client/src/pages/UserAuth/SignUp.tsx b/app/client/src/pages/UserAuth/SignUp.tsx index 255b05e7404b..172740754da1 100644 --- a/app/client/src/pages/UserAuth/SignUp.tsx +++ b/app/client/src/pages/UserAuth/SignUp.tsx @@ -28,6 +28,8 @@ import { VISIT_OUR_DOCS, ALREADY_USING_APPSMITH, SIGN_IN_TO_AN_EXISTING_ORGANISATION, + AI_AGENT_AUTH_SUBTITLE, + LOGIN_PAGE_TITLE, } from "ee/constants/messages"; import FormTextField from "components/utils/ReduxFormTextField"; import ThirdPartyAuth from "pages/UserAuth/ThirdPartyAuth"; @@ -63,6 +65,7 @@ import * as Sentry from "@sentry/react"; import CsrfTokenInput from "pages/UserAuth/CsrfTokenInput"; import { useIsCloudBillingEnabled } from "hooks"; import { isLoginHostname } from "utils/cloudBillingUtils"; +import { getIsAiAgentFlowEnabled } from "ee/selectors/aiAgentSelectors"; declare global { interface Window { @@ -100,9 +103,10 @@ type SignUpFormProps = InjectedFormProps< export function SignUp(props: SignUpFormProps) { const history = useHistory(); const isFormLoginEnabled = useSelector(getIsFormLoginEnabled); + const isAiAgentFlowEnabled = useSelector(getIsAiAgentFlowEnabled); useEffect(() => { - if (!isFormLoginEnabled) { + if (!isFormLoginEnabled && !isAiAgentFlowEnabled) { const search = new URL(window.location.href)?.searchParams?.toString(); history.replace({ @@ -226,7 +230,7 @@ export function SignUp(props: SignUpFormProps) { )} - {cloudHosting && ( + {cloudHosting && !isAiAgentFlowEnabled && ( <> or
@@ -247,7 +251,15 @@ export function SignUp(props: SignUpFormProps) { ); return ( - + {htmlPageTitle} diff --git a/app/client/src/utils/hooks/useFeatureFlagOverride.ts b/app/client/src/utils/hooks/useFeatureFlagOverride.ts index 31d53b646bb4..ab30f18f426a 100644 --- a/app/client/src/utils/hooks/useFeatureFlagOverride.ts +++ b/app/client/src/utils/hooks/useFeatureFlagOverride.ts @@ -15,6 +15,7 @@ import { export const AvailableFeaturesToOverride: FeatureFlag[] = [ "release_anvil_enabled", "release_layout_conversion_enabled", + "license_ai_agent_enabled", ]; export type OverriddenFeatureFlags = Partial>;