Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/client/src/ce/constants/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
Expand Down
2 changes: 2 additions & 0 deletions app/client/src/ce/entities/FeatureFlag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand Down
80 changes: 44 additions & 36 deletions app/client/src/ce/pages/Applications/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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";
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -896,42 +899,47 @@ export function ApplicationsSection(props: any) {
<ResourceListLoader isMobile={isMobile} resources={applications} />
) : (
<>
<ApplicationCardList
applications={nonAnvilApplications}
canInviteToWorkspace={canInviteToWorkspace}
deleteApplication={deleteApplication}
enableImportExport={enableImportExport}
hasCreateNewApplicationPermission={
hasCreateNewApplicationPermission
}
hasManageWorkspacePermissions={hasManageWorkspacePermissions}
isMobile={isMobile}
onClickAddNewButton={onClickAddNewAppButton}
title={createMessage(APPLICATIONS)}
updateApplicationDispatch={updateApplicationDispatch}
workspaceId={activeWorkspace.id}
/>
{isAnvilEnabled &&
anvilApplications.length > 0 && ( // AI Agents list
<ApplicationCardList
applications={anvilApplications}
canInviteToWorkspace={canInviteToWorkspace}
deleteApplication={deleteApplication}
enableImportExport={enableImportExport}
hasCreateNewApplicationPermission={
hasCreateNewApplicationPermission
}
hasManageWorkspacePermissions={
hasManageWorkspacePermissions
}
isMobile={isMobile}
onClickAddNewButton={onClickAddNewAppButton}
title={createMessage(AI_AGENTS_APPLICATIONS)}
titleTag={BetaTag}
updateApplicationDispatch={updateApplicationDispatch}
workspaceId={activeWorkspace.id}
/>
)}
{!isAiAgentFlowEnabled && (
<ApplicationCardList
applications={nonAnvilApplications}
canInviteToWorkspace={canInviteToWorkspace}
deleteApplication={deleteApplication}
enableImportExport={enableImportExport}
hasCreateNewApplicationPermission={
hasCreateNewApplicationPermission
}
hasManageWorkspacePermissions={hasManageWorkspacePermissions}
isMobile={isMobile}
onClickAddNewButton={onClickAddNewAppButton}
title={createMessage(APPLICATIONS)}
updateApplicationDispatch={updateApplicationDispatch}
workspaceId={activeWorkspace.id}
/>
)}
{((isAnvilEnabled && anvilApplications.length > 0) ||
isAiAgentFlowEnabled) && (
<ApplicationCardList
applications={anvilApplications}
canInviteToWorkspace={canInviteToWorkspace}
deleteApplication={deleteApplication}
emptyStateMessage={
isAiAgentFlowEnabled
? createMessage(AI_APPLICATION_CARD_LIST_ZERO_STATE)
: undefined
}
enableImportExport={enableImportExport}
hasCreateNewApplicationPermission={
hasCreateNewApplicationPermission
}
hasManageWorkspacePermissions={hasManageWorkspacePermissions}
isMobile={isMobile}
onClickAddNewButton={onClickAddNewAppButton}
title={createMessage(AI_AGENTS_APPLICATIONS)}
titleTag={BetaTag}
updateApplicationDispatch={updateApplicationDispatch}
workspaceId={activeWorkspace.id}
/>
)}
<PackageCardList
isMobile={isMobile}
packages={packages}
Expand Down
8 changes: 8 additions & 0 deletions app/client/src/ce/selectors/aiAgentSelectors.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
import { FEATURE_FLAG } from "ee/entities/FeatureFlag";
import type { AppState } from "ee/reducers";
import { selectFeatureFlagCheck } from "ee/selectors/featureFlagsSelectors";

export const getAgentChatQuery = () => {
return undefined;
};

export const getIsAiAgentFlowEnabled = (state: AppState) => {
return selectFeatureFlagCheck(state, FEATURE_FLAG.license_ai_agent_enabled);
};
2 changes: 1 addition & 1 deletion app/client/src/pages/UserAuth/Container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function Container(props: ContainerProps) {
{title}
</h1>
{subtitle && (
<p className="text-[14px] text-center text-[color:var(--ads-v2\-color-fg)]">
<p className="text-[14px] text-center text-[color:var(--ads-v2\-color-fg)] whitespace-pre-line">
{subtitle}
</p>
)}
Expand Down
18 changes: 15 additions & 3 deletions app/client/src/pages/UserAuth/SignUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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({
Expand Down Expand Up @@ -226,7 +230,7 @@ export function SignUp(props: SignUpFormProps) {
</Link>
</div>
)}
{cloudHosting && (
{cloudHosting && !isAiAgentFlowEnabled && (
<>
<OrWithLines>or</OrWithLines>
<div className="px-2 text-center text-[color:var(--ads-v2\-color-fg)] text-[14px]">
Expand All @@ -247,7 +251,15 @@ export function SignUp(props: SignUpFormProps) {
);

return (
<Container footer={footerSection} title={createMessage(SIGNUP_PAGE_TITLE)}>
<Container
footer={footerSection}
subtitle={
isAiAgentFlowEnabled ? createMessage(AI_AGENT_AUTH_SUBTITLE) : ""
}
title={createMessage(
isAiAgentFlowEnabled ? SIGNUP_PAGE_TITLE : LOGIN_PAGE_TITLE,
)}
>
<Helmet>
<title>{htmlPageTitle}</title>
</Helmet>
Expand Down
1 change: 1 addition & 0 deletions app/client/src/utils/hooks/useFeatureFlagOverride.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
export const AvailableFeaturesToOverride: FeatureFlag[] = [
"release_anvil_enabled",
"release_layout_conversion_enabled",
"license_ai_agent_enabled",
];
export type OverriddenFeatureFlags = Partial<Record<FeatureFlag, boolean>>;

Expand Down
Loading