diff --git a/packages/frontend/core/src/blocksuite/ai/_common/config.ts b/packages/frontend/core/src/blocksuite/ai/_common/config.ts index 51f53c94e..b17593a2f 100644 --- a/packages/frontend/core/src/blocksuite/ai/_common/config.ts +++ b/packages/frontend/core/src/blocksuite/ai/_common/config.ts @@ -295,19 +295,6 @@ const ReviewTextAIGroup: AIItemGroupConfig = { ], }; -const TouchUpImageAIGroup: AIItemGroupConfig = { - name: 'touch up image', - items: [ - { - name: 'Generate an image', - testId: 'action-generate-image', - icon: ImageIcon(), - showWhen: textBlockShowWhen, - handler: actionToHandler('createImage', AIImageIconWithAnimation), - }, - ], -}; - const GenerateFromTextAIGroup: AIItemGroupConfig = { name: 'generate from text', items: [ @@ -347,6 +334,13 @@ const GenerateFromTextAIGroup: AIItemGroupConfig = { showWhen: textBlockShowWhen, handler: actionToHandler('writeOutline', AIPenIconWithAnimation), }, + { + name: 'Generate an image', + testId: 'action-generate-image', + icon: ImageIcon(), + showWhen: textBlockShowWhen, + handler: actionToHandler('createImage', AIImageIconWithAnimation), + }, { name: 'Brainstorm ideas with mind map', testId: 'action-brainstorm-mindmap', @@ -405,7 +399,6 @@ export const pageAIGroups: AIItemGroupConfig[] = [ ReviewCodeAIGroup, ReviewImageAIGroup, EditTextAIGroup, - TouchUpImageAIGroup, GenerateFromTextAIGroup, DraftFromTextAIGroup, OthersAIGroup, @@ -431,7 +424,7 @@ export function buildAIImageItemGroups(): AIItemGroupConfig[] { ], }, { - name: 'touch up image', + name: 'generate from text', items: [ { name: 'Generate an image', @@ -445,6 +438,11 @@ export function buildAIImageItemGroups(): AIItemGroupConfig[] { blockActionTrackerOptions ), }, + ], + }, + { + name: 'touch up image', + items: [ { name: 'Image processing', testId: 'action-image-processing', diff --git a/packages/frontend/core/src/blocksuite/ai/entries/edgeless/actions-config.ts b/packages/frontend/core/src/blocksuite/ai/entries/edgeless/actions-config.ts index d0bda2341..8c33071f8 100644 --- a/packages/frontend/core/src/blocksuite/ai/entries/edgeless/actions-config.ts +++ b/packages/frontend/core/src/blocksuite/ai/entries/edgeless/actions-config.ts @@ -281,9 +281,31 @@ const reviewTextGroup: AIItemGroupConfig = { ], }; -const touchUpImageGroup: AIItemGroupConfig = { - name: 'touch up image', +const generateFromTextGroup: AIItemGroupConfig = { + name: 'generate from text', items: [ + { + name: 'Summarize', + icon: PenIcon(), + testId: 'action-summarize', + showWhen: noteBlockOrTextShowWhen, + handler: actionToHandler('summary', AIPenIconWithAnimation), + }, + { + name: 'Generate headings', + icon: PenIcon(), + testId: 'action-generate-headings', + showWhen: noteBlockOrTextShowWhen, + handler: actionToHandler('createHeadings', AIPenIconWithAnimation), + beta: true, + }, + { + name: 'Generate outline', + icon: PenIcon(), + testId: 'action-generate-outline', + showWhen: noteBlockOrTextShowWhen, + handler: actionToHandler('writeOutline', AIPenIconWithAnimation), + }, { name: 'Generate an image', icon: ImageIcon(), @@ -359,35 +381,6 @@ const touchUpImageGroup: AIItemGroupConfig = { } ), }, - ], -}; - -const generateFromTextGroup: AIItemGroupConfig = { - name: 'generate from text', - items: [ - { - name: 'Summarize', - icon: PenIcon(), - testId: 'action-summarize', - showWhen: noteBlockOrTextShowWhen, - handler: actionToHandler('summary', AIPenIconWithAnimation), - }, - { - name: 'Generate headings', - icon: PenIcon(), - testId: 'action-generate-headings', - showWhen: noteBlockOrTextShowWhen, - handler: actionToHandler('createHeadings', AIPenIconWithAnimation), - beta: true, - }, - - { - name: 'Generate outline', - icon: PenIcon(), - testId: 'action-generate-outline', - showWhen: noteBlockOrTextShowWhen, - handler: actionToHandler('writeOutline', AIPenIconWithAnimation), - }, { name: 'Expand from this mind map node', icon: MindmapNodeIcon(), @@ -571,7 +564,6 @@ export const edgelessAIGroups: AIItemGroupConfig[] = [ reviewCodeGroup, reviewImageGroup, editTextGroup, - touchUpImageGroup, generateFromTextGroup, draftFromTextGroup, othersGroup,