cherry-studio/src/main
beyondkmp bbe380cc9e
feat(ContextMenu): add spell check and dictionary suggestions to context menu (#7067)
* feat(ContextMenu): add spell check and dictionary suggestions to context menu

- Implemented spell check functionality in the context menu with options to learn spelling and view dictionary suggestions.
- Updated WindowService to enable spellcheck in the webview.
- Enabled spell check in Inputbar and MessageEditor components.

* feat(SpellCheck): implement spell check language settings and initialization

- Added support for configuring spell check languages based on user-selected language.
- Introduced IPC channel for setting spell check languages.
- Updated settings to manage spell check enablement and languages.
- Enhanced UI to allow users to toggle spell check functionality and select languages.
- Default spell check languages are set based on the current UI language if none are specified.

* refactor(SpellCheck): enhance spell check language mapping and UI settings

- Updated spell check language mapping to default to English for unsupported languages.
- Improved UI logic to only update spell check languages when enabled and no manual selections are made.
- Added a new selection component for users to choose from commonly supported spell check languages.

* feat(SpellCheck): integrate spell check functionality into Inputbar and MessageEditor

- Added enableSpellCheck setting to control spell check functionality in both Inputbar and MessageEditor components.
- Updated spellCheck prop to utilize the new setting, enhancing user experience by allowing customization of spell check behavior.

* refactor(SpellCheck): move spell check initialization to WindowService

- Removed spell check language initialization from index.ts and integrated it into WindowService.
- Added setupSpellCheck method to configure spell check languages based on user settings.
- Enhanced error handling for spell check language setup.

* feat(SpellCheck): add enable spell check functionality and IPC channel

- Introduced a new IPC channel for enabling/disabling spell check functionality.
- Updated the preload API to include a method for setting spell check enablement.
- Modified the main IPC handler to manage spell check settings based on user input.
- Simplified spell check language handling in the settings component by directly invoking the new API method.

* refactor(SpellCheck): remove spellcheck option from WindowService configuration

- Removed the spellcheck property from the WindowService configuration object.
- This change streamlines the configuration setup as spell check functionality is now managed through IPC channels.

* feat(i18n): add spell check translations for Japanese, Russian, and Traditional Chinese

- Added new translations for spell check functionality in ja-jp, ru-ru, and zh-tw locale files.
- Included descriptions and language selection options for spell check settings to enhance user experience.

* feat(migrate): add spell check configuration migration

- Implemented migration for spell check settings, disabling spell check and clearing selected languages in the new configuration.
- Enhanced error handling to ensure state consistency during migration process.

* fix(migrate): ensure spell check settings are updated safely

- Added a check to ensure state.settings exists before modifying spell check settings during migration.
- Removed redundant error handling that returned the state unmodified in case of an error.

* fix(WindowService): set default values for spell check configuration and update related UI texts

* refactor(Inputbar, MessageEditor): remove contextMenu attribute and add context menu handling in MessageEditor

---------

Co-authored-by: beyondkmp <beyondkmkp@gmail.com>
2025-06-23 21:19:21 +08:00
..
configs fix(SelectionAssistant): add explorer.exe to filterlist 2025-06-06 17:32:16 +08:00
embeddings Feat: Allows setting the vector dimension of the knowledge base embedding model (#7025) 2025-06-11 11:52:15 +08:00
integration/nutstore/sso/lib build: remove sentry integration 2025-04-24 11:48:53 +08:00
loader feat(FileStorage): add support for .doc files using word-extractor (#7374) 2025-06-23 08:55:03 +08:00
mcpServers feat(mcpServers): Add a thought field to sequential thinking mcp server (#7465) 2025-06-23 15:27:20 +08:00
reranker fix: support tei (#7239) 2025-06-16 23:52:29 +08:00
services feat(ContextMenu): add spell check and dictionary suggestions to context menu (#7067) 2025-06-23 21:19:21 +08:00
utils feat(FileStorage): add support for .doc files using word-extractor (#7374) 2025-06-23 08:55:03 +08:00
bootstrap.ts fix: 修复数据目录迁移的bug (#7386) 2025-06-22 10:32:23 +08:00
config.ts feat: Add app data path selection and relaunch functionality (#6096) 2025-06-18 17:39:26 +08:00
constant.ts feat: support portable config dir (#5039) 2025-04-24 17:23:56 +08:00
electron.d.ts feat: add the ability to display the application in tray #297 2024-11-09 08:42:09 +08:00
env.d.ts feat: added vite_main_bundle_id config and improved code cleanliness 2024-09-15 10:35:02 +08:00
index.ts fix: 修复数据目录迁移的bug (#7386) 2025-06-22 10:32:23 +08:00
ipc.ts feat(ContextMenu): add spell check and dictionary suggestions to context menu (#7067) 2025-06-23 21:19:21 +08:00