Commit Graph

5099 Commits

Author SHA1 Message Date
icarus
2db55a1304 Merge branch 'v2' of github.com:CherryHQ/cherry-studio into refactor/i18n 2025-10-28 19:28:33 +08:00
MyPrototypeWhat
b9a947d2fd refactor: restructure UI components and remove deprecated files
- Added new components including CodeEditor, CollapsibleSearchBar, and DraggableList.
- Removed obsolete components such as Button, CustomCollapse, and StatusTag.
- Updated migration status documentation and adjusted component exports.
- Enhanced package.json dependencies for better compatibility.
2025-10-28 14:27:05 +08:00
fullex
57b9ca111a fix: format 2025-10-28 09:12:51 +08:00
fullex
709f264ac9 Merge branch 'main' of github.com:CherryHQ/cherry-studio into v2 2025-10-28 09:02:09 +08:00
Phantom
9776b4e46c
fix(sidebar): replace 'agents' with 'store' in sidebar (#10989)
refactor(sidebar): replace 'agents' with 'store' in sidebar icons and labels

Update sidebar icon mapping and translation keys to use 'store' instead of 'agents' for consistency with the application's terminology. The change includes both the label definitions and the icon component mapping.
2025-10-27 20:35:12 +08:00
SuYao
250f59234b
feat: add isClaude45ReasoningModel function and update getTopP logic (#10988)
* feat: add isClaude45ReasoningModel function and update getTopP logic

* fix: update getTopP logic to correctly handle Claude45 model support

* fix: update getTemperature and getTopP logic to handle Claude45 model conditions

* fix: update getTemperature logic to correctly handle Claude45 model conditions
fix: refine isClaude45ReasoningModel regex pattern for better matching
2025-10-27 20:34:11 +08:00
SuYao
82132d479a
feat: add huggingface provider (#10966)
* Refactor code structure for improved readability and maintainability

* fix(i18n): Auto update translations for PR #10966

* fix: add empty array for huggingface models in SYSTEM_MODELS

* feat: integrate HuggingFace provider and enhance reasoning options

* fix: remove debug console logs from provider options functions

---------

Co-authored-by: GitHub Action <action@github.com>
2025-10-27 13:30:23 +08:00
fullex
44e01e5ad4
chore: add CODEOWNERS for databases directories 2025-10-27 09:35:08 +08:00
Xin Rui
c5ce0b763b
fix: up-down button does not hide properly in some cases (#10693)
* fix: simplify navigation button auto-hide logic

Remove complex state management (isNearButtons, resetHideTimer) and rely directly
on isInTriggerArea to control button visibility. This fixes the issue where buttons
don't properly auto-hide by using mouse position detection instead of fragile state tracking.

- Simplify showNavigation to just show and clear timers
- Remove resetHideTimer function and use showNavigation directly
- Simplify handleNavigationMouseLeave to always schedule hide after 500ms
- Update all button handlers to call showNavigation() instead of resetHideTimer()
- Rely on mouse enter/leave events to control visibility state

* refactor(ChatNavigation): replace native setTimeout with custom useTimer hook

Use custom useTimer hook for better timer management and cleanup

---------

Co-authored-by: icarus <eurfelux@gmail.com>
2025-10-26 23:09:46 +08:00
Phantom
f5a1d3f8d0
fix(hooks): prevent save on composing enter key in useInPlaceEdit (#10972) 2025-10-26 17:45:31 +08:00
Phantom
d8f1a68e87
ci(i18n): update translation config to use TRANSLATION_BASE_LOCALE (#10965)
Change BASE_LOCALE to TRANSLATION_BASE_LOCALE across scripts and workflows for consistency
Add console log for base locale in auto-translate script
2025-10-26 15:58:54 +08:00
Phantom
8054ed7ad8
fix: disappeared MCP button (#10956)
* refactor(types): add InputBarToolType and update related types

- Define InputBarToolType union type in chat types
- Update ToolOrder and InputToolsState to use InputBarToolType
- Modify InputbarTools component to use new type for tool keys

* refactor(assistants): use DEFAULT_ASSISTANT_SETTINGS constant for default settings

* fix(assistants): ensure default settings for presets in migration

Add default settings for assistant presets during migration if they are missing, including toolUseMode
2025-10-26 11:58:38 +08:00
Phantom
487b5c4d8a
fix(aiCore): support minimax-m2 (#10962)
* fix(aiCore): add minimax-m2 to reasoning model check and correct comment

* feat(models): add minimax-m2 to function calling models list

* feat(models): add isMiniMaxReasoningModel helper function

Add helper function to check for MiniMax reasoning models and update isReasoningModel to use it
2025-10-26 02:29:52 +08:00
Phantom
dedfc79406
ci(auto-i18n): disable package manager cache for node setup (#10957)
* ci(github): disable package manager cache for node setup

* refactor(i18n): translate sync script comments to english

Update all Chinese comments and log messages in sync-i18n.ts to English for better international collaboration

* style(scripts): format error message string in sync-i18n.ts
2025-10-26 00:15:25 +08:00
Phantom
1f0fd8215a
docs: update PR template and README with feature PR restrictions (#10955)
* docs: update PR template and README with feature PR restrictions

Add temporary hold notice for Redux/IndexedDB feature PRs in both pull request template and README
Fix whitespace and formatting inconsistencies in README

* docs: update contributing guidelines with temporary PR restrictions

Add important notice about temporary restrictions on data-changing feature PRs
Clarify acceptable contribution types during v2.0.0 development phase

* docs: remove warning about feature PR restrictions

The warning about temporary restrictions on feature PRs involving Redux or IndexedDB changes has been removed as it is no longer relevant

* docs: remove core developer membership section from contributing guides
2025-10-26 00:14:27 +08:00
defi-failure
e69fd7f22b
fix: create assistant causing blank screen (#10853)
* fix: create or update assistant causing blank screen

* fix: remove redundant type annotation

* fix: improve logging

* fix: remove redundant check

* fix(migration): move presets initialization to migration 166

The initialization of assistants.presets was incorrectly placed in migration 164. Move it to a new migration 166 to ensure proper state initialization after versions 1.6.5 and 1.7.0-beta.2.

---------

Co-authored-by: icarus <eurfelux@gmail.com>
2025-10-25 21:10:37 +08:00
SuYao
ac4aa33e79
fix: azure gpt-image-1 and openrouter gemini-image (#10797)
* fix: azure gpt-image-1 and openroute gemini-image

* feat: update encoding format handling for embeddings based on model type

* fix: normalize model ID check for Azure OpenAI GPT-Image-1-Mini

* feat: enhance regex for gemini-2.5-flash-image in image enhancement models

* feat: 支持处理 base64 格式的图片 URL 在消息转换中

* feat: 更新消息转换函数以支持图像增强模型的特殊处理

* fix: update model handling in AzureOpenAI and Embeddings classes

* fix: update OpenAI package version to 6.5.0

* fix: remove outdated OpenAI package patch for version 6.4.0

* fix: remove outdated OpenAI package entry from yarn.lock
2025-10-25 16:18:18 +08:00
Jake Jia
6795a044fa
feat(miniapp): add HuggingChat mini app (#10923)
* feat(miniapp): add HuggingChat mini app

- Add HuggingChat to default mini apps list
- Update HuggingChat SVG icon with official design

* chore(migration): add migration for HuggingChat mini app

- Add migration version 165 to add HuggingChat to existing users
- Update store version from 163 to 165

* fix(migrate): log error during mini app migration
2025-10-25 10:24:37 +08:00
SuYao
13093bb821
fix: optimize excluded websites handling in xai provider configuration (#10894) 2025-10-24 15:10:59 +08:00
Phantom
c7c9e1ee44
fix: use system prompt variables in quick assistant (#10925)
* feat: replace prompt variables in assistant before chat completion

* refactor(home-window): reorder prompt variable replacement for clarity

Move prompt variable replacement before message preparation to improve logical flow
2025-10-24 13:58:37 +08:00
beyondkmp
369b367562
feat(AppMenuService): enhance application menu with help section and others (#10934)
* feat(AppMenuService): enhance application menu with help section and others

* format

* fix german
2025-10-24 13:57:52 +08:00
Phantom
0081a0740f
fix(InputbarTools): allow url context for gemini endpoint type model (#10926)
fix(InputbarTools): allow url context for gemini endpoint type

Add condition to check for gemini endpoint type when determining URL context support
2025-10-24 13:55:10 +08:00
Phantom
4dfb73c982
fix: silicon reasoning (#10932)
* refactor(aiCore): reorganize reasoning effort logic for different providers

Restructure the reasoning effort calculation logic to handle different model providers more clearly. Move OpenRouter and SiliconFlow specific logic to dedicated sections and remove duplicate checks. Improve maintainability by grouping related provider logic together.

* refactor(sdk): update thinking config type and property names

- Replace inline thinking config type with imported ThinkingConfig type
- Update property names from snake_case to camelCase for consistency
- Add null checks for token limit calculations
- Clarify hard-coded maximum for silicon provider in comments

* refactor(openai): standardize property names to camelCase in thinking_config

Update property names in thinking_config object from snake_case to camelCase for consistency with codebase conventions
2025-10-24 13:01:00 +08:00
Phantom
691656a397
feat(i18n): enhance translation script with concurrency and validation (#10916)
* feat(i18n): enhance translation script with concurrency and validation

- Add concurrent translation support with configurable limits
- Implement input validation for script configuration
- Improve error handling and progress tracking
- Add detailed usage instructions and performance recommendations

* fix(i18n): update translations for multiple languages

- Translate previously untranslated strings in zh-tw, ja-jp, pt-pt, es-es, ru-ru, el-gr, fr-fr
- Fix array to object structure in zh-cn accessibility description
- Add missing translations and fix structure in de-de locale

* chore: update i18n auto-translation script command

Update the yarn command from 'i18n:auto' to 'auto:i18n' for consistency with other script naming conventions

* ci: rename i18n workflow env vars for clarity

Use more descriptive names for translation-related environment variables to improve readability and maintainability

* Revert "fix(i18n): update translations for multiple languages"

This reverts commit 01dac1552e.

* fix(i18n): Auto update translations for PR #10916

* ci: run sync-i18n script before auto-translate in workflow

* fix(i18n): Auto update translations for PR #10916

---------

Co-authored-by: GitHub Action <action@github.com>
2025-10-24 02:12:10 +08:00
Jake Jia
d184f7a24b
fix: align S3 backup manager action buttons horizontally (#10922) 2025-10-23 23:58:03 +08:00
Pleasure1234
1ac746a40e
fix: use nullish coalescing for advanced property updates (#10921)
Replaces logical OR with nullish coalescing when updating advanced server properties to allow empty string values, enabling users to clear fields instead of preserving previous values.
2025-10-23 23:49:25 +08:00
icarus
b18c00e38b docs: handle language preference change cleanup comment
Add comment explaining why cleanup is not needed for language preference subscription
2025-10-23 23:35:21 +08:00
icarus
9b1ccb60aa feat(i18n): add language preference change subscription
Add subscription to language preference changes to dynamically update i18n language. Also change warning to error log when no language preference is found
2025-10-23 23:31:17 +08:00
icarus
7e5e3786cf feat(i18n): add language preference handling and improve initialization
Initialize i18n with user's preferred language from preferences or fallback to default
Standardize locale file imports naming convention and improve i18n initialization flow
2025-10-23 23:08:47 +08:00
icarus
57206dd3b1 refactor(i18n): restructure translation resources and update logger context
Move translation files to new location and update resource structure to include translation namespace
Update logger context to include module prefix for better debugging
2025-10-23 22:46:24 +08:00
icarus
b02678a714 refactor(i18n): simplify i18n implementation and cleanup unused locales
- Rename i18next import to i18n for consistency
- Standardize locale keys to lowercase format
- Remove commented out locale imports and unused translations
- Replace getI18n with direct t function usage in services
- Clean up VS Code settings and commented i18n config
2025-10-23 22:39:40 +08:00
icarus
5b4f15d355 refactor(sort): remove unused lexicalSort function 2025-10-23 22:24:16 +08:00
icarus
262b0aeeb6 refactor(i18n): simplify language resources and integrate i18next
Remove unused language resources and rename locales to resources for clarity
Add i18next initialization with missing key logging
2025-10-23 22:19:40 +08:00
icarus
b181902183 refactor(i18n): restore main to avoid conflict before merge 2025-10-23 21:51:12 +08:00
icarus
bfbd934fdc feat(i18n): add progress tracking and post-processing to translation
- Add postProcess callback to translateConcurrent and translateRecursively
- Implement progress bar for individual file translation counts
- Improve console output formatting with carriage returns
- Move progress bar initialization inside file processing loop
2025-10-23 21:51:12 +08:00
icarus
75041ce952 feat(i18n): enhance translation script with concurrency and config
- Add concurrent translation with configurable max requests
- Implement automatic retry and rate limiting
- Improve error handling and progress tracking
- Add detailed configuration options and usage instructions
2025-10-23 21:51:12 +08:00
icarus
dc469b6112 chore: remove i18next-scanner and related dependencies
Remove i18next-scanner package and its configuration file along with unused dependencies that were only required by it.
2025-10-23 21:51:12 +08:00
icarus
5efce861a9 feat(i18n): add new supported locales and clean up translation script
- Add 8 new locales (de-de, el-gr, es-es, fr-fr, ja-jp, pt-pt, ru-ru)
- Remove unused translate directory references from auto-translate script
2025-10-23 21:50:53 +08:00
icarus
112d735659 refactor(i18n): reorganize translation files and update paths
Move machine-translated files from translate/ to locales/ directory
Update README location and clarify translation maintenance status
2025-10-23 21:50:53 +08:00
icarus
8f2b3f0bdc feat(i18n): update translation files and add missing plural forms
- Update README to clarify translation maintenance status
- Add missing plural forms in en-us, zh-cn, and zh-tw locales
- Complete machine translations for de-de, ja-jp, ru-ru, pt-pt, es-es, fr-fr, and el-gr
- Convert array to object format for accessibility description in de-de and zh-cn
2025-10-23 21:50:21 +08:00
icarus
91704f2ee9 refactor(translation): simplify translation prompt and function parameters
Remove redundant <translate_input> tags and pass text directly to translate function
Improve logging by showing both original and translated text
2025-10-23 21:50:21 +08:00
icarus
e1aa223e5d feat(i18n): add Simplified Chinese and German language support
Add 'zh-cn' and 'de-de' to language map and log system prompt for debugging
2025-10-23 21:50:21 +08:00
icarus
74eb3141cd feat(i18n): add missing pluralization strings for citations and search results 2025-10-23 21:50:21 +08:00
icarus
9dcaf84da6 refactor(i18n): simplify default translation placeholder
Remove language parameter from default value function since it's unused and simplify the placeholder text
2025-10-23 21:50:21 +08:00
icarus
66e48dbba9 chore: update i18n sync command and vscode settings
- Replace custom i18n sync script with i18next-cli sync command
- Update json sorting setting to use biome formatter
- Format i18n-ally config arrays for better readability
2025-10-23 21:50:21 +08:00
icarus
534459dd13 refactor(sort): replace lexicalSort with naturalSort for better string comparison
Use localeCompare with numeric sensitivity for more natural string sorting behavior
2025-10-23 21:50:21 +08:00
icarus
b2e2acebb1 feat(i18n): add pluralization support for translation strings
- Add singular/plural forms for count-based translation strings
- Update VS Code settings to enable JSON sorting
- Remove unused i18n-ally sortKeys setting
2025-10-23 21:50:21 +08:00
icarus
6b3828f189 fix: correct translation keys and remove unused code
- Fix incorrect translation key paths in MessageVideo component
- Remove commented-out code for unused OCR options in PreprocessProviderSettings
- Simplify success toast message in NotesSidebar by removing count parameter
2025-10-23 21:50:21 +08:00
icarus
5f02822ef2 fix(i18n): remove count interpolation from tool labels
The count values were moved outside the translated strings to simplify localization and improve consistency across languages. The counts are now displayed separately after the translated labels in the UI.
2025-10-23 21:50:21 +08:00
icarus
c0fe0a7774 fix(i18n): improve default translation value handling
Use a function to generate more informative default values for missing translations, showing target language and original value
2025-10-23 21:50:21 +08:00