chore: move ai chat from help to bottom bar (#40175)
## Description Add changes to remove the ai chat from the help menu and move it to the bottom bar also remove report a bug from help when feature flag is on <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added a new AI Chat icon, expanding the available visual elements. - Introduced an AI Agent Support trigger in the bottom bar for enhanced support interactions. - Refined the navigation and help menus by adjusting support and bug reporting options for a more streamlined user experience. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
parent
c0cdea49b9
commit
49e5e4bb67
|
|
@ -1209,6 +1209,10 @@ const SparklingFilledIcon = importSvg(
|
|||
async () => import("../__assets__/icons/ads/sparkling-filled.svg"),
|
||||
);
|
||||
|
||||
const AIChatIcon = importSvg(
|
||||
async () => import("../__assets__/icons/ads/ai-chat.svg"),
|
||||
);
|
||||
|
||||
import PlayIconPNG from "../__assets__/icons/control/play-icon.png";
|
||||
|
||||
function PlayIconPNGWrapper() {
|
||||
|
|
@ -1229,6 +1233,7 @@ const ICON_LOOKUP = {
|
|||
"add-line": AddLineIcon,
|
||||
"add-more": AddMoreIcon,
|
||||
"add-more-fill": AddMoreFillIcon,
|
||||
"ai-chat": AIChatIcon,
|
||||
"arrow-go-forward": ArrowGoForwardLineIcon,
|
||||
"alert-fill": AlertFillIcon,
|
||||
"alert-line": AlertLineIcon,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M18.7134 7.12811L18.4668 7.69379C18.2864 8.10792 17.7136 8.10792 17.5331 7.69379L17.2866 7.12811C16.8471 6.11947 16.0555 5.31641 15.0677 4.87708L14.308 4.53922C13.8973 4.35653 13.8973 3.75881 14.308 3.57612L15.0252 3.25714C16.0384 2.80651 16.8442 1.97373 17.2761 0.930831L17.5293 0.319531C17.7058 -0.10651 18.2942 -0.10651 18.4706 0.319531L18.7238 0.930831C19.1558 1.97373 19.9616 2.80651 20.9748 3.25714L21.6919 3.57612C22.1027 3.75881 22.1027 4.35653 21.6919 4.53922L20.9323 4.87708C19.9445 5.31641 19.1529 6.11947 18.7134 7.12811ZM8 2H12V4H8C4.68629 4 2 6.68629 2 10C2 13.61 4.46208 15.9656 10 18.4798V16H12C15.3137 16 18 13.3137 18 10H20C20 14.4183 16.4183 18 12 18V21.5C7 19.5 0 16.5 0 10C0 5.58172 3.58172 2 8 2Z" fill="currentColor"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 858 B |
|
|
@ -0,0 +1,3 @@
|
|||
export function AIAgentSupportTrigger() {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -18,6 +18,7 @@ import PackageUpgradeStatus from "ee/components/BottomBar/PackageUpgradeStatus";
|
|||
import OldGitQuickActions from "pages/Editor/gitSync/QuickGitActions";
|
||||
import { GitQuickActions } from "git";
|
||||
import { useGitModEnabled } from "pages/Editor/gitSync/hooks/modHooks";
|
||||
import { AIAgentSupportTrigger } from "ee/components/BottomBar/AIAgentSupportTrigger";
|
||||
|
||||
function GitActions() {
|
||||
const isGitModEnabled = useGitModEnabled();
|
||||
|
|
@ -65,6 +66,7 @@ export default function BottomBar() {
|
|||
startIcon="upgrade"
|
||||
/>
|
||||
</ManualUpgrades>
|
||||
<AIAgentSupportTrigger />
|
||||
<DebuggerTrigger />
|
||||
<HelpButton />
|
||||
</Wrapper>
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
export * from "ce/components/BottomBar/AIAgentSupportTrigger";
|
||||
|
|
@ -24,7 +24,6 @@ import { toast } from "@appsmith/ads";
|
|||
import { DOCS_BASE_URL } from "constants/ThirdPartyConstants";
|
||||
import { getAppsmithConfigs } from "ee/configs";
|
||||
import { getCurrentUser } from "selectors/usersSelectors";
|
||||
import { toggleAISupportModal } from "ee/actions/aiAgentActions";
|
||||
import { getIsAiAgentFlowEnabled } from "ee/selectors/aiAgentSelectors";
|
||||
|
||||
const { cloudHosting, intercomAppID } = getAppsmithConfigs();
|
||||
|
|
@ -164,7 +163,7 @@ export const useNavigationMenuData = ({
|
|||
"https://github.com/appsmithorg/appsmith/issues/new/choose",
|
||||
),
|
||||
type: MenuTypes.MENU,
|
||||
isVisible: true,
|
||||
isVisible: !isAiAgentFlowEnabled,
|
||||
startIcon: "bug-line",
|
||||
},
|
||||
{
|
||||
|
|
@ -178,15 +177,6 @@ export const useNavigationMenuData = ({
|
|||
type: MenuTypes.MENU,
|
||||
isVisible: intercomAppID && window.Intercom,
|
||||
},
|
||||
{
|
||||
startIcon: "chat-help",
|
||||
text: "Chat with us",
|
||||
onClick: () => {
|
||||
dispatch(toggleAISupportModal());
|
||||
},
|
||||
type: MenuTypes.MENU,
|
||||
isVisible: isAiAgentFlowEnabled,
|
||||
},
|
||||
],
|
||||
},
|
||||
].filter(Boolean) as MenuItemData[],
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ import { getInstanceId } from "ee/selectors/organizationSelectors";
|
|||
import { updateIntercomConsent, updateUserDetails } from "actions/userActions";
|
||||
import { getIsAiAgentFlowEnabled } from "ee/selectors/aiAgentSelectors";
|
||||
import { DOCS_AI_BASE_URL } from "constants/ThirdPartyConstants";
|
||||
import { toggleAISupportModal } from "ee/actions/aiAgentActions";
|
||||
|
||||
const { appVersion, cloudHosting, intercomAppID } = getAppsmithConfigs();
|
||||
|
||||
|
|
@ -202,17 +201,10 @@ function HelpButton() {
|
|||
docItem.link = DOCS_AI_BASE_URL;
|
||||
}
|
||||
|
||||
const chatItem = HELP_MENU_ITEMS.find(
|
||||
(item) => item.id === "ai-support-trigger",
|
||||
HELP_MENU_ITEMS.splice(
|
||||
HELP_MENU_ITEMS.findIndex((item) => item.label === "Report a bug"),
|
||||
1,
|
||||
);
|
||||
|
||||
if (!chatItem) {
|
||||
HELP_MENU_ITEMS.push({
|
||||
icon: "chat-help",
|
||||
label: "Chat with us",
|
||||
id: "ai-support-trigger",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -301,10 +293,6 @@ function HelpButton() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (item.id === "ai-support-trigger") {
|
||||
dispatch(toggleAISupportModal());
|
||||
}
|
||||
}}
|
||||
startIcon={item.icon}
|
||||
>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user