From 739611afa8c3e6160fd210ba81775e3576400c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Bosi?= <71827178+bosiraphael@users.noreply.github.com> Date: Mon, 13 Jan 2025 17:12:31 +0100 Subject: [PATCH] Migrate copilot to command menu (#9522) Open copilot chat inside command menu https://github.com/user-attachments/assets/60d83a77-6e96-4daa-98b0-33b7c1157d9a --- .../src/modules/command-menu/components/CommandMenuPages.ts | 1 + .../modules/command-menu/constants/CommandMenuPagesConfig.tsx | 2 ++ .../right-drawer/utils/mapRightDrawerPageToCommandMenuPage.ts | 2 ++ 3 files changed, 5 insertions(+) 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 b06286450..7959680de 100644 --- a/packages/twenty-front/src/modules/command-menu/components/CommandMenuPages.ts +++ b/packages/twenty-front/src/modules/command-menu/components/CommandMenuPages.ts @@ -3,6 +3,7 @@ export enum CommandMenuPages { ViewRecord = 'view-record', ViewEmailThread = 'view-email-thread', ViewCalendarEvent = 'view-calendar-event', + Copilot = 'copilot', WorkflowStepSelectTriggerType = 'workflow-step-select-trigger-type', WorkflowStepSelectAction = 'workflow-step-select-action', WorkflowStepView = 'workflow-step-view', 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 dc1ac1f4f..dbb14d854 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'; @@ -16,6 +17,7 @@ export const COMMAND_MENU_PAGES_CONFIG = new Map< [CommandMenuPages.ViewRecord, ], [CommandMenuPages.ViewEmailThread, ], [CommandMenuPages.ViewCalendarEvent, ], + [CommandMenuPages.Copilot, ], [ CommandMenuPages.WorkflowStepSelectTriggerType, , 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 76532961c..c5e56420c 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; case RightDrawerPages.WorkflowStepSelectTriggerType: return CommandMenuPages.WorkflowStepSelectTriggerType; case RightDrawerPages.WorkflowStepSelectAction: