Skip to content

The open alternative to Salesforce, designed for AI.

Make Ask AI the default command menu fallback (#29023)

Thomas des Francsee865021ef41
diff --git a/packages/twenty-front/src/modules/command-menu-item/display/components/SidePanelCommandMenuItemDisplayPage.tsx b/packages/twenty-front/src/modules/command-menu-item/display/components/SidePanelCommandMenuItemDisplayPage.tsx
index 499b8df4eea..b09c84b6d1e 100644
--- a/packages/twenty-front/src/modules/command-menu-item/display/components/SidePanelCommandMenuItemDisplayPage.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/display/components/SidePanelCommandMenuItemDisplayPage.tsx
@@ -194,12 +194,12 @@ export const SidePanelCommandMenuItemDisplayPage = () => {
...commandMenuItemsBySection[section].map((item) => item.id),
...getSectionExtraItemIds(section),
]),
- ...(shouldDisplayFallbackItems
- ? fallbackCommandMenuItems.map((item) => item.id)
- : []),
...(shouldDisplayFallbackItems && shouldDisplayAskAiFallbackItem
? [COMMAND_MENU_ASK_AI_FALLBACK_ITEM_ID]
: []),
+ ...(shouldDisplayFallbackItems
+ ? fallbackCommandMenuItems.map((item) => item.id)
+ : []),
];
return (
@@ -263,12 +263,12 @@ export const SidePanelCommandMenuItemDisplayPage = () => {
}
Icon={IconLifebuoy}
>
- {fallbackCommandMenuItems.map((item) => (
- <CommandMenuItemRenderer item={item} key={item.id} />
- ))}
{shouldDisplayAskAiFallbackItem && (
<CommandMenuAskAiFallbackItem prompt={trimmedSidePanelSearch} />
)}
+ {fallbackCommandMenuItems.map((item) => (
+ <CommandMenuItemRenderer item={item} key={item.id} />
+ ))}
</CommandMenuItemSectionGroup>
)}
</SidePanelList>