diff --git a/packages/twenty-front/src/modules/command-menu/components/CommandMenuContainer.tsx b/packages/twenty-front/src/modules/command-menu/components/CommandMenuContainer.tsx index 3fa14a772cc7..54a3a5457e68 100644 --- a/packages/twenty-front/src/modules/command-menu/components/CommandMenuContainer.tsx +++ b/packages/twenty-front/src/modules/command-menu/components/CommandMenuContainer.tsx @@ -29,6 +29,9 @@ const StyledCommandMenu = styled.div` top: 0%; width: ${() => (useIsMobile() ? '100%' : '500px')}; z-index: 30; + + display: flex; + flex-direction: column; `; export const CommandMenuContainer = ({ diff --git a/packages/twenty-front/src/modules/command-menu/components/CommandMenuPages.ts b/packages/twenty-front/src/modules/command-menu/components/CommandMenuPages.ts index 378585df6e60..92159ceacb0a 100644 --- a/packages/twenty-front/src/modules/command-menu/components/CommandMenuPages.ts +++ b/packages/twenty-front/src/modules/command-menu/components/CommandMenuPages.ts @@ -3,4 +3,5 @@ export enum CommandMenuPages { ViewRecord = 'view-record', ViewEmailThread = 'view-email-thread', ViewCalendarEvent = 'view-calendar-event', + Copilot = 'copilot', } diff --git a/packages/twenty-front/src/modules/command-menu/components/CommandMenuRouter.tsx b/packages/twenty-front/src/modules/command-menu/components/CommandMenuRouter.tsx index 9c90f6e471fc..1356025b2572 100644 --- a/packages/twenty-front/src/modules/command-menu/components/CommandMenuRouter.tsx +++ b/packages/twenty-front/src/modules/command-menu/components/CommandMenuRouter.tsx @@ -2,9 +2,14 @@ import { CommandMenuContainer } from '@/command-menu/components/CommandMenuConta import { CommandMenuTopBar } from '@/command-menu/components/CommandMenuTopBar'; import { COMMAND_MENU_PAGES_CONFIG } from '@/command-menu/constants/CommandMenuPagesConfig'; import { commandMenuPageState } from '@/command-menu/states/commandMenuPageState'; +import styled from '@emotion/styled'; import { useRecoilValue } from 'recoil'; import { isDefined } from 'twenty-ui'; +const StyledCommandMenuContent = styled.div` + flex: 1; +`; + export const CommandMenuRouter = () => { const commandMenuPage = useRecoilValue(commandMenuPageState); @@ -17,7 +22,9 @@ export const CommandMenuRouter = () => { return ( - {commandMenuPageComponent} + + {commandMenuPageComponent} + ); }; diff --git a/packages/twenty-front/src/modules/command-menu/constants/CommandMenuPagesConfig.tsx b/packages/twenty-front/src/modules/command-menu/constants/CommandMenuPagesConfig.tsx index ff03078743ae..fae7e3e173f7 100644 --- a/packages/twenty-front/src/modules/command-menu/constants/CommandMenuPagesConfig.tsx +++ b/packages/twenty-front/src/modules/command-menu/constants/CommandMenuPagesConfig.tsx @@ -1,4 +1,5 @@ import { RightDrawerCalendarEvent } from '@/activities/calendar/right-drawer/components/RightDrawerCalendarEvent'; +import { RightDrawerAIChat } from '@/activities/copilot/right-drawer/components/RightDrawerAIChat'; import { RightDrawerEmailThread } from '@/activities/emails/right-drawer/components/RightDrawerEmailThread'; import { CommandMenu } from '@/command-menu/components/CommandMenu'; import { CommandMenuPages } from '@/command-menu/components/CommandMenuPages'; @@ -12,4 +13,5 @@ export const COMMAND_MENU_PAGES_CONFIG = new Map< [CommandMenuPages.ViewRecord, ], [CommandMenuPages.ViewEmailThread, ], [CommandMenuPages.ViewCalendarEvent, ], + [CommandMenuPages.Copilot, ], ]); diff --git a/packages/twenty-front/src/modules/ui/layout/right-drawer/utils/mapRightDrawerPageToCommandMenuPage.ts b/packages/twenty-front/src/modules/ui/layout/right-drawer/utils/mapRightDrawerPageToCommandMenuPage.ts index 6a90ea080154..633689db33b7 100644 --- a/packages/twenty-front/src/modules/ui/layout/right-drawer/utils/mapRightDrawerPageToCommandMenuPage.ts +++ b/packages/twenty-front/src/modules/ui/layout/right-drawer/utils/mapRightDrawerPageToCommandMenuPage.ts @@ -11,6 +11,8 @@ export const mapRightDrawerPageToCommandMenuPage = ( return CommandMenuPages.ViewEmailThread; case RightDrawerPages.ViewCalendarEvent: return CommandMenuPages.ViewCalendarEvent; + case RightDrawerPages.Copilot: + return CommandMenuPages.Copilot; default: return CommandMenuPages.Root; }