From 87960d3773cb674e1defff1ded1b0de428d0319b Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Thu, 13 Mar 2025 11:29:03 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8(AI)=20add=20emojify=20action=20to=20a?= =?UTF-8?q?i=20transform?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The emojify action add emojis to the important parts of the text. --- CHANGELOG.md | 1 + src/backend/core/services/ai_services.py | 7 ++++++- .../docs/doc-editor/api/useDocAITransform.tsx | 3 ++- .../components/BlockNoteToolBar/AIButton.tsx | 11 +++++++++++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5c0f5cc..37be2853 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ and this project adheres to - ✨(frontend) synchronize language-choice #401 - ✨(frontend) add Beautify action to AI transform #478 +- ✨(frontend) add Emojify action to AI transform #478 ## Changed diff --git a/src/backend/core/services/ai_services.py b/src/backend/core/services/ai_services.py index eee0b7ef..c1410551 100644 --- a/src/backend/core/services/ai_services.py +++ b/src/backend/core/services/ai_services.py @@ -33,7 +33,12 @@ AI_ACTIONS = { ), "beautify": ( "Add formatting to the text to make it more readable. " - "Do not provide any other information." + "Do not provide any other information. " + "Preserve the language." + ), + "emojify": ( + "Add emojis to the important parts of the text. " + "Do not provide any other information. " "Preserve the language." ), } diff --git a/src/frontend/apps/impress/src/features/docs/doc-editor/api/useDocAITransform.tsx b/src/frontend/apps/impress/src/features/docs/doc-editor/api/useDocAITransform.tsx index dd8b04f3..cd8dfbfc 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-editor/api/useDocAITransform.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-editor/api/useDocAITransform.tsx @@ -7,7 +7,8 @@ export type AITransformActions = | 'prompt' | 'rephrase' | 'summarize' - | 'beautify'; + | 'beautify' + | 'emojify'; export type DocAITransform = { docId: string; diff --git a/src/frontend/apps/impress/src/features/docs/doc-editor/components/BlockNoteToolBar/AIButton.tsx b/src/frontend/apps/impress/src/features/docs/doc-editor/components/BlockNoteToolBar/AIButton.tsx index ad2241ad..cd006736 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-editor/components/BlockNoteToolBar/AIButton.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-editor/components/BlockNoteToolBar/AIButton.tsx @@ -176,6 +176,17 @@ export function AIGroupButton() { > {t('Beautify')} + + emoji_emotions + + } + > + {t('Emojify')} + )} {canAITranslate && (