diff --git a/CHANGELOG.md b/CHANGELOG.md index 2186237a..d5c0f5cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,10 +26,12 @@ and this project adheres to ## Added - ✨(frontend) synchronize language-choice #401 +- ✨(frontend) add Beautify action to AI transform #478 ## Changed - Use sentry tags instead of extra scope +- ♻️(frontend) Improve AI translations #478 ## Fixed @@ -56,7 +58,6 @@ and this project adheres to - 📝(doc) minor README.md formatting and wording enhancements - ♻️Stop setting a default title on doc creation #634 - ♻️(frontend) misc ui improvements #644 -- ♻️(frontend) Improve AI translations #478 ## Fixed diff --git a/src/backend/core/services/ai_services.py b/src/backend/core/services/ai_services.py index 819cec0d..eee0b7ef 100644 --- a/src/backend/core/services/ai_services.py +++ b/src/backend/core/services/ai_services.py @@ -31,6 +31,11 @@ AI_ACTIONS = { "Do not provide any other information. " "Preserve the language." ), + "beautify": ( + "Add formatting to the text to make it more readable. " + "Do not provide any other information." + "Preserve the language." + ), } AI_TRANSLATE = ( 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 f38e1176..dd8b04f3 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 @@ -6,7 +6,8 @@ export type AITransformActions = | 'correct' | 'prompt' | 'rephrase' - | 'summarize'; + | 'summarize' + | 'beautify'; 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 91a158fb..ad2241ad 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 @@ -165,6 +165,17 @@ export function AIGroupButton() { > {t('Correct')} + + draw + + } + > + {t('Beautify')} + )} {canAITranslate && (