- 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
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.
- 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
- 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
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.
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.
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.
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.
Scribe is always composed of menu (aka category) and submenu (aka action) :
- submenu item UI was already in an UI only component. I moved it to items folder.
- menu item UI was mixed in a component with desktop related UX. So I extract the UI to create an UI only component. I moved it also to items folder.
In Scribe desktop, the suggestion is displayed in a popup.
In Scribe mobile, it will be displayed in a full screen modal.
But it share the same logic about loading, success and error.
So here I extract this logic and use it in the AI Scribe desktop to be able to use it later in AI Scribe mobile.
Even if all keys were translated, Scribe UI was always in default
language.
In short, it is not possible to load multiple localization delegates
with different .arb files. But we need these translations to be
located in a separate file because in the future we will move Scribe
in a separate module.
See
https://github.com/Innim/flutter_multiple_localization for more
explanation.
feat(ai-scribe): Fix async function declared without proper return type annotation.
feat(ai-scribe): Fix Async operations not properly awaited.
feat(ai-scribe): Fix inconsistent capitalization between button labels.
feat(ai-scribe): Fix GenerateAITextFailure check will never match.
feat(ai-scribe): Fix consider validating text input for predefined actions.
feat(ai-scribe): Using a subshell for directory isolation.
feat(ai-scribe): Fix verify the mock usage or document intent.
feat(ai-scribe): Using a more conventional import for Offset.
feat(ai-scribe): Adding error handling for consistency
feat(ai-scribe): Remove `fromJson` and `toJson` of AIResponse
feat(ai-scribe): Using constants for role values.
feat(ai-scribe): Using a more specific import.
feat(ai-scribe): Using Timer for cleaner lifecycle management
feat(ai-scribe): Adding error handling to fromMap() for consistency.
feat(ai-scribe): Disposing the ValueNotifier
feat(ai-scribe): Redundant null check after assignment
feat(ai-scribe): Fix calling `registerSelectionChangeListener` multiple times may be inefficient.
feat(ai-scribe): Safer type handling for JavaScript callback args
feat(ai-scribe): Fix async callbacks not awaited in switch statement.
feat(ai-scribe): Fix binding lifecycle mismatch for GetAIScribeConfigInteractor
feat(ai-scribe): Fix ai prompts
feat(ai-scribe): Fix unawaited async call to `_setupSelectionListener`
feat(ai-scribe): Fix switch cases use top-origin coordinates while `PositionedDirectional(bottom:)`` expects bottom-origin coordinates.
feat(ai-scribe): Adding error handling for selection listener setup.