forked from CherryHQ/cherry-studio
-
Notifications
You must be signed in to change notification settings - Fork 0
[pull] main from CherryHQ:main #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pull
wants to merge
3,739
commits into
hallfay0:main
Choose a base branch
from
CherryHQ:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1188f09 to
85bf449
Compare
b97bcce to
25c166c
Compare
a31a178 to
3bb294e
Compare
adc659e to
96df9f6
Compare
34a78a8 to
6e66721
Compare
The normalizeProvider() calls inside useAppSelector callbacks were creating new object references on every render, causing infinite re-render loops in components that depend on provider objects. This fix uses createSelector from Redux Toolkit to properly memoize the normalized providers, preventing unnecessary re-renders in: - GithubCopilotSettings (useEffect depends on provider) - Painting pages (useAllProviders returns new array each render) Fixes the "Maximum update depth exceeded" error introduced in 8186d4f. Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
#12503) When clicking the tray icon on Linux with another window on top, the main window would not properly come to the front. This was due to Linux window managers' focus stealing prevention. The fix uses a hide/show sequence to simulate the "close to tray and reopen" behavior which works correctly. This approach resets the window state and makes the window manager treat it as a new window activation request. Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
* feat: add Linux system title bar setting option Add a setting in Display Settings that allows Linux users to switch between custom title bar (frameless window with WindowControls) and native system title bar. The setting requires app restart to take effect since Electron's frame option cannot be changed at runtime. - Add useSystemTitleBar config key and getter/setter in ConfigManager - Add IPC channel and handler for setting persistence - Add Redux state and action for useSystemTitleBar - Add UI toggle in DisplaySettings (Linux only) - Hide WindowControls when system title bar is enabled on Linux - Modify WindowService to check setting when creating window on Linux - Add translations for all supported locales 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: improve window controls positioning in left navbar layout Move WindowControls inside NavbarContainer as a flex item instead of using fixed positioning. This ensures the window controls are properly positioned adjacent to the navbar content when using the left navbar layout. - Remove position: fixed from WindowControlsContainer styling - Include WindowControls as last child of NavbarContainer - Remove extra padding-right from NavbarRight since controls are now in the flex layout 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: remove padding-right from TabsBar to align window controls to edge Remove the 8px padding-right for Windows/Linux in TabsBar that was causing window controls to not be flush against the window edge. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: add right padding for settings button when Linux uses system title bar * fix: restore NavbarRight paddingRight to 15px for consistent spacing Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
…12549) * fix(header): merge user-agent add header gracefully * fix(test): mock os release * fix(test): again
- Fix Wayland window icon not showing in alt-tab and titlebar - Fix fcitx5 input method cannot switch after sending message - Fix deb installation failure due to spaces in executable name - Add pacman build target for Arch Linux - Rename Linux executable from "Cherry Studio" to "CherryStudio" - Use nativeImage for proper icon loading on Linux Fixes #12295, Fixes #12494 Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: roberto <roberto@baichuan-inc.com>
) * feat(error): add clickable error detail modal for model detection - Add onErrorClick callback to HealthStatusIndicator component - Make error icon clickable to show detailed error modal - Export ErrorDetailModal for reuse across components - Use SerializedError type for better error information display - Fix tooltip i18n keys and flex layout for consistent spacing * fix(error): only show clickable error indicator when failed results exist - Only pass onErrorClick callback when there are failed results - Conditionally render ErrorDetailModal only when needed - Improve performance by avoiding unnecessary state for success cases * refactor(error): extract serializeHealthCheckError utility function - Extract duplicated error serialization logic into serializeHealthCheckError() utility function in error.ts - Update HealthCheckService.ts, hook.ts, and ProviderSetting.tsx to use the new utility function - Fix invalid CSS values: align-items: left -> center, align: left -> flex-start - Use HealthStatus.FAILED constant instead of hardcoded 'failed' string * fix(settings): update tooltip message key for API check Change the tooltip fallback translation key from the provider API check to the models check. This ensures the displayed message matches the new i18n key and avoids showing an incorrect/provider-specific string when the API key connectivity error message is absent. * refactor(error): extract ErrorDetailModal as independent component * refactor(error): extract ErrorDetailModal as independent component * refactor(error): update ErrorDetailModal with full features from ErrorBlock * refactor(error): fix export duplication and add React performance optimizations * refactor(error): add React performance optimizations - Memoize ErrorDetailModal child components (BuiltinError, AiSdkErrorBase, TruncatedCodeViewer, AiSdkError) - Add useCallback for handleErrorClick in HealthStatusIndicator - Add useCallback for copyErrorDetails in ErrorDetailModal - Optimize ModelListItem button inline functions with useCallback * refactor(health): move HealthStatusIndicatorProps back to indicator.tsx - HealthStatusIndicatorProps was only used in indicator.tsx, no need to export - Keep HealthResult in types.ts as it's used by useHealthStatus hook * fix(health): import HealthResult from types instead of redefining - useHealthStatus depends on HealthResult from ./types - Only HealthStatusIndicatorProps belongs to indicator.tsx * refactor(health): move click handler to outer wrapper * fix(lint): resolve react-hooks/exhaustive-deps warnings in ModelListItem - wrap healthResults in useMemo to avoid unnecessary re-renders - remove redundant ErrorDetailModal export from ErrorBlock * refactor(error): optimize ErrorDetailModal and replace duplicate code - Use parseDataUrl from @shared/utils instead of manual base64 detection - Replace duplicate ErrorDetailModal in ErrorBlock with the shared component - Optimize onErrorClick with useMemo for better performance
- Added support for Day.js locale settings in i18n, allowing for dynamic language changes. - Updated translations for multiple languages including German, Greek, Spanish, French, Japanese, Portuguese, Romanian, and Russian. - Improved UI elements in the MemorySettings and ChatNavbar components for better layout and user experience. - Implemented infinite scroll functionality in MemorySettings for improved memory display management.
* fix(embeddings): truncate query content for temp doc query * fix: use tokenService
* feat(i18n): clean hardcoded ui string add ci * fix(i18n): update snap * fix: test * fix(i18n): update plurals * chore: revert other branch change * refactor: use ast detect hardcoded string * chore: typo error * feat(i18n): add webview app * chore(i18n): update i18n * fix: pr comment * chore: distinguish label and labelKey * refactor: align v2 desgin
* feat(i18n): update i18n name immediately * feat(minapps): hide Chinese apps for non-Chinese locale users - Add `locales` field to MinAppType for locale-based visibility - Add locale filtering in useMinapps hook - Mark 23 Chinese domestic apps with locales: ['zh-CN', 'zh-TW'] Apps hidden for non-Chinese users include: Wanzhi, ChatGLM, Kimi, Baichuan, Qwen, Stepfun, Doubao, Hailuo, Wenxin, Baidu AI Search, Tencent Yuanbao, Sensechat, SparkDesk, Metaso, Tiangong AI, Nami AI, Xiaoyi, WPS AI, Zhihu, Dangbei AI, Ant Ling, LongCat, QwenChat Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: minapp logic * fix: review comments * fix: update MinimalToolbar to use allMinApps Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
#12343) * feat: enhance ActionTranslate component with language detection and settings dropdown - Added state management for detected and actual target languages. - Implemented a settings dropdown for selecting preferred and alternate languages. - Updated UI to display detected language and integrated new settings for language selection. - Refactored language change handling to improve user experience and maintain state consistency. * refactor(ActionTranslate): reorganize layout and improve component structure - Introduced LeftGroup for better alignment of detected language, target language selector, and settings dropdown. - Removed unnecessary Spacer component to streamline the layout. - Enhanced styling for improved visual consistency and user experience. * fix(ActionTranslate): simplify loading state display for detected language - Removed loading spinner and adjusted the display for the detected language during the detection process to enhance clarity and reduce visual clutter.
- Updated ChatNavbar to remove unnecessary padding for a cleaner look. - Added min-height to AddButton for consistent button sizing. - Introduced hover state management in AgentItem and AssistantItem for improved user experience. - Refactored dropdown menu handling in AgentItem and AssistantItem to enhance interaction. - Adjusted margin in HeaderRow for better spacing. - Modified SessionWorkspaceMeta to display folder names more clearly with tooltips. These changes aim to improve the overall UI responsiveness and clarity in component interactions.
Co-Authored-By: Claude <noreply@anthropic.com>
…matrix based on input - Introduced a new input parameter 'platform' to specify the build platform (all, windows, mac, linux). - Updated the job strategy matrix to dynamically select OS based on the provided platform input, enhancing flexibility in the release process.
* feat: Add PaddleOCR as a new Preprocess provider * Fix validateFile * fix use i18n to translate and fix tip * Fix code * Fix code * Fix migrate.ts/index.ts * Fix code * Fix update index.ts version * fix(store): reorder migration versions and improve error logging Move migration 190 to 191 and vice versa for better version ordering Add success logging for migration 191 and improve error message specificity * Fix fix code * Fix fix code * Fix fix validateFile * Fix remove migrate duplicated and add enum FileType * Fix no specific number * Fix index.ts and tailwindcss * Fix type and final file not exit condition * Fix add jsdoc * Fix lint --fix * Fix: use zod schema * Fix: fix zod schema * Fix: looseObject * Fix use formatZodError * Fix fix code * Fix migrate.ts * Fix add annotation * Fix fix header and Outpudir * Fix code * Fix fix code * Fix throw error * feat(preprocess): add return type for readPdf method Add PreprocessReadPdfResult interface and use it as return type for readPdf method to provide better type safety and clarity * refactor(preprocess): improve type safety for pdf parsing variable * refactor(PaddleocrPreprocessProvider): extract markdown filename generation to method Extract repeated filename replacement logic into a dedicated method to improve code reuse and maintainability * refactor: make createProcessedFileInfo async and await its result Use async/await pattern for file operations to improve code consistency and avoid potential blocking * fix: use English error message in PaddleOCR API failure * Fix fix doc * Fix remove ppocr tip * fix --------- Co-authored-by: icarus <eurfelux@gmail.com>
* refactor: Tool Permission Request Card and Streaming Tool Functionality - Refactor ToolPermissionRequestCard to improve rendering of tool content based on tool type. - Introduce a new ArgsTable component for displaying tool parameters. - Implement streaming support for tool arguments in StreamProcessingService and related callbacks. - Add new chunk type for streaming tool arguments in chunk types. - Update MCPToolResponseStatus to include 'streaming' state. - Create comprehensive tests for MessageAgentTools to cover various tool states and argument streaming. * feat: 添加工具状态指示器组件并更新相关工具渲染逻辑 * refactor: 优化 BashTool 组件,移除多余的输出行数计算和标签展示 * feat: 添加输出截断功能以优化工具输出显示 * feat(i18n): add translations for tool labels and sections in multiple languages - Updated Portuguese (pt-pt), Romanian (ro-ro), and Russian (ru-ru) translation files to include new labels and sections for various tools. - Integrated translation functionality into BashOutputTool, BashTool, EditTool, ExitPlanModeTool, GlobTool, GrepTool, MultiEditTool, NotebookEditTool, ReadTool, SearchTool, SkillTool, TaskTool, TodoWriteTool, UnknownToolRenderer, WebFetchTool, and WebSearchTool components. - Replaced hardcoded strings with translation keys for better localization support. * chore(i18n): clarify * refactor: 更新 ClaudeCodeService 和 transform 函数以增强工具调用语言提示和处理工具结果消息 * refactor: language instruction * feat(ui): group consecutive tool calls for better readability - Add ToolBlockGroup component to display multiple consecutive tool calls in a collapsible group - Modify groupSimilarBlocks to group consecutive TOOL blocks together - Add i18n translations for group header (e.g., "36 tool calls") - Style group header consistent with individual tool blocks Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(ui): group consecutive tool calls for better readability - Add ToolBlockGroup component to display multiple consecutive tool calls in a collapsible group - Modify groupSimilarBlocks to group consecutive TOOL blocks together - Add i18n translations for group header (e.g., "36 tool calls") - Style group header consistent with individual tool blocks Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor: 更新 truncateOutput 函数以统一返回结构,并调整相关工具的输出处理 * refactor: simplify code * refactor(ToolBlockGroup): tool block rendering with memoization and auto-expand feature * fix(ui): use direct child selectors to prevent style leakage to nested tools Use > selectors in ToolBlockGroup to only style the group collapse, not the nested tool collapses inside it. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(i18n): clean hardcoded ui string add ci * refactor: add toolblockgroup * refactor: simplify code * fix: lint * fix: lint 2 * fix: test * fix: test2 --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
…upport qwen3-max snapshots (#12614) Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
* feat: add Kimi K2.5 model support * fix: add Kimi K2.5 model thinking type detection * fix: add Kimi model support for thinking tokens * test: Update vision model test for Kimi non-vision model
remove trailing newline when copy from codeblocks Signed-off-by: Fy <haibarafy@163.com>
…12633) * refactor: Add support for removing :cloud suffix in model names * test: Add test for removing trailing :cloud from model name
* feat: allow Kimi K2.5 to be specified via Model Name * fix: allow Kimi K2.5 specified via Model Name through button renderer
Replace GLM-4.5-Flash with Qwen3-Next-80B-A3B-Instruct as the default free model for CherryAI provider. This includes migration logic to update existing users from the deprecated GLM model to the new Qwen model.
* fix(mcp): prevent infinite loop when refresh token expires
Implement proper token expiration handling in MCP OAuth provider to
prevent
infinite retry loops when both access and refresh tokens expire.
Changes:
- Add invalidateCredentials() method to McpOAuthClientProvider
- Implements OAuthClientProvider.invalidateCredentials interface
- Clears expired tokens when SDK detects InvalidGrantError
- Supports 'all', 'tokens', 'client', 'verifier' scopes
- Update storage methods to accept undefined for clearing credentials
- saveTokens() now accepts OAuthTokens | undefined
- saveClientInformation() now accepts OAuthClientInformationMixed |
undefined
- Fix type compatibility with SDK's OAuthClientProvider interface
- Use OAuthClientInformationMixed instead of
OAuthClientInformationFull
- Allows accepting both basic and full client information
How it works:
When refresh token expires, the MCP SDK automatically calls
invalidateCredentials('tokens'), which clears the expired tokens and
triggers a new OAuth authorization flow. The SDK's built-in retry
logic
(max 1 retry) prevents infinite loops.
Files modified:
- src/main/services/mcp/oauth/provider.ts
- src/main/services/mcp/oauth/storage.ts
- src/main/services/mcp/oauth/types.ts
Signed-off-by: tdh <tdh@tdh6.top>
* refactor: remove unnecessary type cast in invalidateCredentials.
Signed-off-by: tdh <tdh@tdh6.top>
---------
Signed-off-by: tdh <tdh@tdh6.top>
Co-authored-by: tdh <tdh@tdh6.top>
…12643) When using prompt-based tool calling (for models without native function call support), the system prompt containing MCP tool definitions was being duplicated on each recursive call after tool execution. Root cause: In `transformParams`, the system prompt was rebuilt even on recursive calls, causing tool definitions to be appended repeatedly. Fix: Check `context.isRecursiveCall` before rebuilding the system prompt. On recursive calls, skip the system prompt transformation to preserve the already-processed prompt. Fixes #12638 Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )