(AI) add beautify action to ai transform

The beautify action add emojis to the important
parts of the text and add formatting to the text
to make it more readable.
This commit is contained in:
Anthony LC
2025-03-12 11:44:58 +01:00
committed by Anthony LC
parent cbf9091d1c
commit e0af6d36e1
4 changed files with 20 additions and 2 deletions

View File

@@ -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

View File

@@ -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 = (

View File

@@ -6,7 +6,8 @@ export type AITransformActions =
| 'correct'
| 'prompt'
| 'rephrase'
| 'summarize';
| 'summarize'
| 'beautify';
export type DocAITransform = {
docId: string;

View File

@@ -165,6 +165,17 @@ export function AIGroupButton() {
>
{t('Correct')}
</AIMenuItemTransform>
<AIMenuItemTransform
action="beautify"
docId={currentDoc.id}
icon={
<Text $isMaterialIcon $size="s">
draw
</Text>
}
>
{t('Beautify')}
</AIMenuItemTransform>
</>
)}
{canAITranslate && (