115 Commits
Author SHA1 Message Date
Dat H. Pham 354576f6b6 Translate vi, ru, fr, mn 2026-11-17 10:55:30 +07:00
Dat H. Pham f27de2ced0 TF-5025 Scribe: add Mongolian, German, Spanish and Italian to the translate menu (#5139) 2026-11-13 11:34:26 +07:00
Dat Vu 54fee9ffb5 Chore: upgrade Flutter to 3.47.9 (#5083) 2026-11-11 17:21:45 +07:00
Fernando da Silva Sousa 57034dfa2f feat: add Brazilian Portuguese localization (#4812) 2026-09-10 10:54:38 +07:00
Benoit TELLIER a36696105e Rename AiScribeConstants to AiCapabilities and move it to the model package (#4695)
The com:linagora:params:jmap:aibot capability is no longer specific to
AI Scribe: Needs Action and auto-labeling rely on it too. Keeping the
constant in the scribe package under a Scribe-flavored name coupled
unrelated AI features to the Scribe feature module.

Closes #4682
2026-07-13 09:25:19 +07:00
Benoit TELLIER 22e4916bf9 Add languageMongolian to source catalog and enable mn in Scribe localizations 2026-06-29 12:00:26 +07:00
Benoit TELLIER 2b1c6bf3a9 Add Mongolian (mn) language support
Wire up Mongolian as a selectable language and provide full translation
coverage across the three localization modules:

- LanguageCodeConstants: add mongolian = 'mn'
- LocalizationService: add mn to supportedLanguageCodes and Locale('mn','MN')
  to supportedLocales
- app_localizations.dart: add languageMongolian getter
- locale_extension.dart: add localized and native (Монгол) display names
- lib/l10n/intl_mn.arb: full translation (521 keys)
- scribe/lib/scribe/ai/l10n/intl_mn.arb: full translation
- workplace/lib/l10n/app_mn.arb: full translation
- Add languageMongolian string to the other activated language arb files
2026-06-29 12:00:26 +07:00
Johann Bournazel a86ac55bc0 TW-3055(fix): gives text fields focus on right click (#4625)
* chore: update linagora_design_flutter to v0.2.0

* TW-3055(fix): gives text fields focus on right click

* TW-3055(test): add RightClickFocus e2e test
2026-06-25 11:42:32 +01:00
dab246 78f9133144 Migrate sub-packages to workspace resolution 2026-05-21 13:25:43 +07:00
Dat Vu 6cfdef0fcf TF-4524 Fix blank plain-text email caused by backslash-hex false-positive in HTML sanitizer (#4527) 2026-05-18 16:35:54 +07:00
Dat Dang 77e2381ca9 Upgrade Flutter to 3.38.9 (#4455) 2026-04-17 17:39:29 +07:00
Dat H. Pham c17782bfd4 Translate Scribe for vi, ru 2026-03-26 12:02:32 +07:00
Dat H. Pham a8dca322d4 TF-4378 Add unit test to cover the replace of placeholder 2026-03-25 11:52:35 +07:00
dab246 28d5036667 TF-4378 Migrate scribe-mobile branch to master branch 2026-03-25 11:52:35 +07:00
Théo Poizat d0cc14beb4 Fix Scribe mobile in landscape mode
- Decided to use mobile UI in mobile landscape
- Make mobile bottom sheet content scrollable except header and bottombar: bottom sheet will render correctly even if keyboard is opened and there is not a lot of space. It will be less usable than in portrait but all actions available.
2026-03-25 11:52:35 +07:00
Théo Poizat 0c2fa84f93 fixup! Update Scribe mobile custom prompt bar UI
Fix Scribe Bar hint color in mobile
Fix Scribe Bar spacing allocation in mobile
USe borderRadius instead of ClipRRect
2026-03-25 11:52:35 +07:00
Théo Poizat c35534a12b Add toast when copying Scribe suggestion 2026-03-25 11:52:35 +07:00
Théo Poizat 9be2e9820a Update Scribe success button actions 2026-03-25 11:52:35 +07:00
Théo Poizat b36b89cd04 Update Scribe mobile custom prompt bar UI 2026-03-25 11:52:35 +07:00
Théo Poizat 1e43ac510b Increase Scribe mobile inline button size 2026-03-25 11:52:35 +07:00
Théo Poizat ee546ef744 Fix Scribe mobile inline never showing modal
- The context.mounted check was placed after onTapFallback?.call()
- The onTapFallback function calls controller.saveAndUnfocusForModal() which unfocuses the editor
- This caused the context to become unmounted so the context.mounted check would return early
- As a result the modal would never be show
2026-03-25 11:52:35 +07:00
Théo Poizat 83452277b7 Use own Dio instance for prompt service 2026-03-25 11:52:35 +07:00
Théo Poizat 1982f199ac Rework PromptService
- Use dependency injection and Get.find instead of manual singleton pattern
- Move from domain to data layer
- Prevents multiple API calls if the previous request hasn't finished
2026-03-25 11:52:35 +07:00
Théo Poizat 71901b2640 Create and use an enum for AIRole in Scribe 2026-03-25 11:52:35 +07:00
Théo Poizat b84b2ce703 Fetch prompts from scribePromptUrl
First, we try to fetch prompts from scribePromptUrl. At fallback, we
use local prompts.
2026-03-25 11:52:35 +07:00
Théo Poizat 04696eecd7 Get and build prompt from local JSON file
Here we map our AI actions to the prompt from the JSON file
to be able to use them.
2026-03-25 11:52:35 +07:00
Théo Poizat 11fd808080 Add prompts.json in Scribe package
This is a default prompts.json used when no other will be available.
2026-03-25 11:52:35 +07:00
Théo Poizat fabf3ec54f Manage prompts as a "messages" object during prompt lifecycle
Before, our prompts were just a string like "Translate this text:
user text" and just before being sent to the backend, it was
converted to an "messages" object compatible with OpenAI API like [{
"role": "user", "content": "Translate this text: user text"}].

Now, we use "messages" object directly when building the prompt
because in the near future we will create more complex prompts with
system content and user content so we will need "messages" object
dirrectly.
2026-03-25 11:52:35 +07:00
Théo Poizat 2ab6e0df02 [Scribe] Add Improve button (#4335) 2026-03-25 11:52:35 +07:00
Théo Poizat c8253551b1 Add a toolbar to execute quick actions to Scribe suggestion
Actions :
 - copy
- regenerate
2026-03-25 11:52:35 +07:00
Théo Poizat 4ba6184a69 Rename bottomsheetIcon to secondaryIcon
To be able to reuse this color without loosing a correct semantic name.
2026-03-25 11:52:35 +07:00
dab246 b64aa4e4c7 feat(scribe-mobile):Fix sometimes the top part is cut off 2026-03-25 11:52:35 +07:00
dab246 5937055789 feat(scribe-mobile): Display the result prompt modal in the correct position relative to the inline scribe button on tablet 2026-03-25 11:52:35 +07:00
Théo Poizat 170bdd28c9 Autofocus Scribe input bar
Help user use the Scribe input bar. Also solves issues where Scribe bar is not well positioned when focused is removed from "To" field.
2026-03-25 11:52:35 +07:00
Théo Poizat d035e40853 fixup! Display Scribe modals correctly when a keyboard is opened
Manage multiline content in scribe bar and spacing between keyboard and scribe bar
2026-03-25 11:52:35 +07:00
Théo Poizat 269ca7116c Display Scribe modals correctly when a keyboard is opened 2026-03-25 11:52:35 +07:00
Théo Poizat ed53929323 fixup! Display Scribe mobile (bottomsheet) only when responsive mobile 2026-03-25 11:52:35 +07:00
Théo Poizat 03a03b9088 Fix Scribe on responsive mobile
- Button was not added in MobileResponsiveAppBar
- Mobile behavior related scripts were not correctly added for web composer
- Mobile behavior related scripts return value was not properly handled for web composer
- In responsive web, bottomsheet modal clicks were intercepted by iframe behind
2026-03-25 11:52:35 +07:00
Théo Poizat 17b9d97284 Adjust Scribe context menu to support tablet screens
- Support tap in addition to hover for context menu
- Improve clamping for greater screen sizes to avoid Scribe getting off screen
- Set a padding to 0 to avoid random padding depending on screen sizes
2026-03-25 11:52:35 +07:00
Théo Poizat 7a6a49fc7b Display Scribe mobile (bottomsheet) only when responsive mobile
Previosuly, we display Scribe mobile (bottomsheet) if platform was mobile, so also Android or iOS tablet.

Now we choose to display Scribe mobile relatively to display screens instead of platform to display the desktop Scribe (context menu) for tablets.
2026-03-25 11:52:35 +07:00
Théo Poizat 6540ed29d1 Add current text in a card in Scribe mobile
Because the Scribe mobile is a full screen modal, we do not see the
current content (so either the selected text or entire composer text)
when selecting our AI actions.

That's why we add here a scrollable card that displays the current
content.
2026-03-25 11:52:35 +07:00
Théo Poizat abd2453511 Do not display Scribe actions if no content in composer in mobile 2026-03-25 11:52:35 +07:00
Théo Poizat 84176cb113 Hide keyboard and selection icons when Scribe mobile modal opened
When opening Scribe mobile modal, we now unfocus the composer to hide the keyboard and the selection start and end icons from the OS.

Add new methods to save, restore, and clear text selection in HTML editor. These methods allow preserving and restoring user selection state when opening the Scribe mobile modal so that the "replace" action still works.
2026-03-25 11:52:35 +07:00
Théo Poizat 09fe002d3c Use proper icons and styles for bottomsheet icons in Scribe 2026-03-25 11:52:35 +07:00
Théo Poizat 14f2e557fa Add Scribe mobile
Same features than Scribe desktop but as a full screen modal instead of  a context menu.

Reuse menu and submenu components.
Reuse suggestion components.
Reuse 99% of Scribe desktop style.
2026-03-25 11:52:35 +07:00
Théo Poizat 089eb7b75f Fix correct grammar icon not present in submenu getIcon 2026-03-25 11:52:35 +07:00
Théo Poizat 0f4ed4537e Remove unused localizations arguments in Scribe suggestion 2026-03-25 11:52:35 +07:00
Théo Poizat 5abce414d4 Guard Scribe suggestion loading if interactor is null 2026-03-25 11:52:35 +07:00
Théo Poizat 5bdcff5aba Extract Scribe menu item text and icons in components 2026-03-25 11:52:35 +07:00
Théo Poizat d5a3400bb4 Allow boxShadow to be changed in AIScribeBar
We will need a custom boxShadow for mobile version.
2026-03-25 11:52:35 +07:00