mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-19 06:30:10 +08:00
main
172 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
150bb3e3a0
|
fix: auto-discover and persist Git Bash path on Windows for scoop (#11921)
* feat: auto-discover and persist Git Bash path on Windows - Add autoDiscoverGitBash function to find and cache Git Bash path when needed - Modify System_CheckGitBash IPC handler to auto-discover and persist path - Update Claude Code service with fallback auto-discovery mechanism - Git Bash path is now cached after first discovery, improving UX for Windows users * udpate * fix: remove redundant validation of auto-discovered Git Bash path The autoDiscoverGitBash function already returns a validated path, so calling validateGitBashPath again is unnecessary. Co-Authored-By: Claude <noreply@anthropic.com> * udpate * test: add unit tests for autoDiscoverGitBash function Add comprehensive test coverage for autoDiscoverGitBash including: - Discovery with no existing config path - Validation of existing config paths - Handling of invalid existing paths - Config persistence verification - Real-world scenarios (standard Git, portable Git, user-configured paths) Co-Authored-By: Claude <noreply@anthropic.com> * fix: remove unnecessary async keyword from System_CheckGitBash handler The handler doesn't use await since autoDiscoverGitBash is synchronous. Removes async for consistency with other IPC handlers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: rename misleading test to match actual behavior Renamed "should not call configManager.set multiple times on single discovery" to "should persist on each discovery when config remains undefined" to accurately describe that each call to autoDiscoverGitBash persists when the config mock returns undefined. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: use generic type parameter instead of type assertion Replace `as string | undefined` with `get<string | undefined>()` for better type safety when retrieving GitBashPath from config. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: simplify Git Bash path resolution in Claude Code service Remove redundant validateGitBashPath call since autoDiscoverGitBash already handles validation of configured paths before attempting discovery. Also remove unused ConfigKeys and configManager imports. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: attempt auto-discovery when configured Git Bash path is invalid Previously, if a user had an invalid configured path (e.g., Git was moved or uninstalled), autoDiscoverGitBash would return null without attempting to find a valid installation. Now it logs a warning and attempts auto-discovery, providing a better user experience by automatically fixing invalid configurations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: ensure CLAUDE_CODE_GIT_BASH_PATH env var takes precedence over config Previously, if a valid config path existed, the environment variable CLAUDE_CODE_GIT_BASH_PATH was never checked. Now the precedence order is: 1. CLAUDE_CODE_GIT_BASH_PATH env var (highest - runtime override) 2. Configured path from settings 3. Auto-discovery via findGitBash This allows users to temporarily override the configured path without modifying their persistent settings. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: improve code quality and test robustness - Remove duplicate logging in Claude Code service (autoDiscoverGitBash logs internally) - Simplify Git Bash path initialization with ternary expression - Add afterEach cleanup to restore original env vars in tests - Extract mockExistingPaths helper to reduce test code duplication 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat: track Git Bash path source to distinguish manual vs auto-discovered - Add GitBashPathSource type and GitBashPathInfo interface to shared constants - Add GitBashPathSource config key to persist path origin ('manual' | 'auto') - Update autoDiscoverGitBash to mark discovered paths as 'auto' - Update setGitBashPath IPC to mark user-set paths as 'manual' - Add getGitBashPathInfo API to retrieve path with source info - Update AgentModal UI to show different text based on source: - Manual: "Using custom path" with clear button - Auto: "Auto-discovered" without clear button 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor: simplify Git Bash config UI as form field - Replace large Alert components with compact form field - Use static isWin constant instead of async platform detection - Show Git Bash field only on Windows with auto-fill support - Disable save button when Git Bash path is missing on Windows - Add "Auto-discovered" hint for auto-detected paths - Remove hasGitBash state, simplify checkGitBash logic 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * ui: add explicit select button for Git Bash path Replace click-on-input interaction with a dedicated "Select" button for clearer UX 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor: simplify Git Bash UI by removing clear button - Remove handleClearGitBash function (no longer needed) - Remove clear button from UI (auto-discover fills value, user can re-select) - Remove auto-discovered hint (SourceHint) - Remove unused SourceHint styled component 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: add reset button to restore auto-discovered Git Bash path - Add handleResetGitBash to clear manual setting and re-run auto-discovery - Show "Reset" button only when source is 'manual' - Show "Auto-discovered" hint when path was found automatically - User can re-select if auto-discovered path is not suitable 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: re-run auto-discovery when resetting Git Bash path When setGitBashPath(null) is called (reset), now automatically re-runs autoDiscoverGitBash() to restore the auto-discovered path. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * feat(i18n): add Git Bash config translations Add translations for: - autoDiscoveredHint: hint text for auto-discovered paths - placeholder: input placeholder for bash.exe selection - tooltip: help tooltip text - error.required: validation error message Supported languages: en-US, zh-CN, zh-TW 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * update i18n * fix: auto-discover Git Bash when getting path info When getGitBashPathInfo() is called and no path is configured, automatically trigger autoDiscoverGitBash() first. This handles the upgrade scenario from old versions that don't have Git Bash path configured. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
a91c69982c
|
feat: Add print to PDF and save as HTML for mini program webviews (#11104)
* Initial plan * ✨ feat: Add print to PDF and save as HTML for mini program webviews - Add IPC channels for Webview_PrintToPDF and Webview_SaveAsHTML - Implement printWebviewToPDF and saveWebviewAsHTML functions in WebviewService - Add keyboard shortcuts handlers (Cmd/Ctrl+P for print, Cmd/Ctrl+S for save) - Update WebviewContainer to handle keyboard shortcuts and trigger print/save actions - Add preload API methods for webview print and save operations Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com> * ♻️ refactor: Improve webview ID handling and remove unused import - Get webviewId dynamically when shortcuts are triggered instead of caching - Remove unused 'join' import from WebviewService - Add null check for webviewId in shortcut handler Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com> * 🐛 fix: Improve doctype serialization for better cross-browser compatibility - Use direct DOCTYPE construction instead of XMLSerializer - More reliable across different browser contexts - Based on code review feedback Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com> * ✨ enhance: Complete DOCTYPE support with publicId and systemId - Add full DOCTYPE construction including publicId and systemId - Fix grammar in comment (custom -> with custom logic) - Ensures proper HTML5 and XHTML document types are preserved Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com> * 🔒 security: Add input validation and improve code structure - Extract shortcut checking logic into isHandledShortcut helper - Add try-catch in executeJavaScript for safety - Escape quotes in DOCTYPE publicId and systemId - Add optional chaining for documentElement - Provide fallback if doctype properties are unexpected Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com> * 🐛 fix: Correct DOCTYPE declaration format and quote escaping - Use single quotes and proper escaping for DOCTYPE attributes - Add SYSTEM keyword for systemId-only cases - Ensure PUBLIC is only used with publicId - Fix quote escaping to use backslashes instead of HTML entities - Properly handle all DOCTYPE declaration formats per HTML/SGML spec Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com> * 🐛 fix: Correct JavaScript string escaping for quotes - Fix quote escaping from \\\\\' to \\' - Ensures proper backslash escaping in JavaScript template string - Produces correct \' in the final DOCTYPE string Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com> * fix(i18n): Auto update translations for PR #11104 * ✨ enhance: Use page title for default filename and improve PDF pagination - Get page title from webview and use it as default filename for both PDF and HTML export - Sanitize filename by removing invalid characters and limiting length - Add preferCSSPageSize option to printToPDF for better multi-page support - Fallback to timestamp-based filename if title is unavailable Addresses reviewer feedback and fixes PDF export only capturing first page issue. Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com> * 🎨 style: Fix formatting issues - Remove trailing whitespace in WebviewContainer.tsx - Run biome format and lint to ensure code style compliance Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com> Co-authored-by: GitHub Action <action@github.com> Co-authored-by: SuYao <sy20010504@gmail.com> |
||
|
|
ed695a8620
|
feat: Support custom git bash path (#11813)
* feat: allow custom Git Bash path for Claude Code Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> * format code * format code * update i18n * fix: correct Git Bash invalid path translation key Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> * test: cover null inputs for validateGitBashPath Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> * refactor: rely on findGitBash for env override check Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> * fix: validate env override for Git Bash path Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> * chore: align Git Bash path getter with platform guard Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> * test: cover env override behavior in findGitBash Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> * refactor: unify Git Bash path detection logic - Add customPath parameter to findGitBash() for config-based paths - Simplify checkGitBash IPC handler by delegating to findGitBash - Change validateGitBashPath success log level from info to debug - Only show success Alert when custom path is configured - Add tests for customPath parameter priority handling 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
96085707ce
|
feat: add MCP server log viewer (#11826)
* ✨ feat: add MCP server log viewer * 🧹 chore: format files * 🐛 fix: resolve MCP log viewer type errors * 🧹 chore: sync i18n for MCP log viewer * 💄 fix: improve MCP log modal contrast in dark mode * 🌐 fix: translate MCP log viewer strings Add translations for noLogs and viewLogs keys in: - German (de-de) - Greek (el-gr) - Spanish (es-es) - French (fr-fr) - Japanese (ja-jp) - Portuguese (pt-pt) - Russian (ru-ru) * 🌐 fix: update MCP log viewer translations and key references Added "logs" key to various language files and updated references in the MCP settings component to improve consistency across translations. This includes updates for English, Chinese (Simplified and Traditional), German, Greek, Spanish, French, Japanese, Portuguese, and Russian. --------- Co-authored-by: kangfenmao <kangfenmao@qq.com> |
||
|
|
058a2c763b
|
fix: restore API version control with trailing # delimiter (addresses #11750) (#11773)
* feat(utils): add isWithTrailingSharp URL helper function Add new utility function to check if URLs end with trailing '#' character Includes comprehensive test cases covering various URL patterns and edge cases * fix(api): check whether to auto append api version or not when formatting api host - extract api version to variable in GeminiAPIClient for consistency - simplify getBaseURL in OpenAIBaseClient by removing formatApiHost - modify provider api host formatting to respect trailing # - add tests for url parsing with trailing # characters * fix: update provider config tests for new isWithTrailingSharp function - Add isWithTrailingSharp to vi.mock in providerConfig tests - Update test expectations to match new formatApiHost calling behavior - All tests now pass with the new trailing # delimiter functionality 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix(anthropic): prevent duplicate api version in base url The Anthropic SDK automatically appends /v1 to endpoints, so we need to avoid duplication by removing the version from baseURL and explicitly setting the path in listModels --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|
|
bc00c11a00
|
fix(windows): add manual window resize for SelectionAction window (#11766)
Implement custom window resize functionality for the SelectionAction window on Windows only. This is a workaround for an Electron bug where native window resize doesn't work with frame: false + transparent: true. - Add IPC channel and API for window resize - Implement resize handler in SelectionService - Add 8 resize handles (4 edges + 4 corners) in SelectionActionApp - Only enable on Windows, other platforms use native resize Bug reference: https://github.com/electron/electron/issues/42738 All workaround code is documented and can be removed once the bug is fixed. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> |
||
|
|
8d1d09b1ec
|
fix: eliminate UI freeze on multi-file selection via batch processing (#11377)
* Initial plan * fix: improve file upload performance with batch processing and progress feedback - Add batch processing (5 files concurrently) to uploadNotes function - Use Promise.allSettled for parallel file processing - Add setTimeout(0) between batches to yield to event loop - Show loading toast when uploading more than 5 files - Add translation keys for uploading progress (en, zh-cn, zh-tw) Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com> * feat: add batch upload and file watcher control functionalities * feat: add hint node type and implement TreeNode component for notes - Updated NotesTreeNode type to include 'hint' as a node type. - Implemented TreeNode component to handle rendering of notes and folders, including hint nodes. - Added drag-and-drop functionality for organizing notes. - Created context hooks for managing notes actions, selection, editing, drag-and-drop, search, and UI state. - Developed file upload handling for drag-and-drop and file selection. - Enhanced menu options for notes with actions like create, rename, delete, and export. - Integrated auto-renaming feature for notes based on content. * clean comment * feat: add pause and resume functionality to file watcher; enhance error handling in useInPlaceEdit hook * fix: adjust padding in item container style for improved layout --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com> Co-authored-by: suyao <sy20010504@gmail.com> |
||
|
|
4f701d3e45
|
fix(apiServer): use 127.0.0.1 instead of localhost for better compatibility (#11673)
* fix(apiServer): use 127.0.0.1 instead of localhost for better compatibility - Change default host from localhost to 127.0.0.1 in config and settings - Add buildApiServerUrl helper to properly construct API server URLs - Update OpenAPI documentation server URL - Update test files to use 127.0.0.1 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix(migration): migrate existing localhost config to 127.0.0.1 - Add migration 180 to automatically update localhost to 127.0.0.1 - Handle both plain host and hosts with http/https protocol - Increment store version to 180 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(apiServer): simplify buildApiServerUrl implementation - Remove complex URL parsing and protocol handling - Use simple string concatenation for URL building - Assume http protocol since API server is local 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: remove buildApiServerUrl helper and simplify migration - Remove buildApiServerUrl helper function - Use 127.0.0.1 directly in URL construction - Simplify migration 180 to unconditionally set host to 127.0.0.1 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(apiServer): fix critical bugs and improve code structure 🔴 Critical Fixes: - Fix config.ts to use stored host value instead of ignoring it - Fix hardcoded 127.0.0.1 URLs to use apiServerConfig.host 🟡 Improvements: - Extract API_SERVER_DEFAULTS to shared constants in packages/shared/config/constant.ts - Apply consistent fallback pattern using API_SERVER_DEFAULTS.HOST and API_SERVER_DEFAULTS.PORT - Update all imports to use shared constants across main and renderer processes Files changed: - packages/shared/config/constant.ts: Add API_SERVER_DEFAULTS constants - src/main/apiServer/config.ts: Use stored host with fallback - src/main/apiServer/middleware/openapi.ts: Use constants - src/renderer/src/pages/settings/ToolSettings/ApiServerSettings/ApiServerSettings.tsx: Use config host and constants - src/renderer/src/store/settings.ts: Use constants in initial state - src/renderer/src/store/migrate.ts: Use constants in migration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * update * fix(apiServer): use relative URL in OpenAPI spec for better compatibility - Change server URL from hardcoded defaults to relative path '/' - This ensures Swagger UI "Try it out" works correctly regardless of configured host/port - Remove unused API_SERVER_DEFAULTS import 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
91f0c47b33
|
fix(anthropic): prevent duplicate /v1 in API endpoints (#11467)
* fix(anthropic): prevent duplicate /v1 in API endpoints Anthropic SDK automatically appends /v1 to endpoints, so we should not add it in our formatting. This change ensures URLs are correctly formatted without duplicate path segments. * fix(anthropic): strip /v1 suffix in getSdkClient to prevent duplicate in models endpoint The issue was: - AI SDK (for chat) needs baseURL with /v1 suffix - Anthropic SDK (for listModels) automatically appends /v1 to all endpoints Solution: - Keep /v1 in formatProviderApiHost for AI SDK compatibility - Strip /v1 in getSdkClient before passing to Anthropic SDK - This ensures chat works correctly while preventing /v1/v1/models duplication 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix(anthropic): correct preview URL to match actual request behavior The preview now correctly shows: - Input: https://api.siliconflow.cn/v2 - Preview: https://api.siliconflow.cn/v2/messages (was incorrectly showing /v2/v1/messages) - Actual: https://api.siliconflow.cn/v2/messages This matches the actual behavior where getSdkClient strips /v1 suffix before passing to Anthropic SDK, which then appends /v1/messages. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix(anthropic): strip all API version suffixes, not just /v1 The Anthropic SDK always appends /v1 to endpoints, regardless of the baseURL. Previously we only stripped /v1 suffix, causing issues with custom versions like /v2. Now we strip all version suffixes (/v1, /v2, /v1beta, etc.) before passing to Anthropic SDK. Examples: - Input: https://api.siliconflow.cn/v2/ - After strip: https://api.siliconflow.cn - Actual request: https://api.siliconflow.cn/v1/messages ✅ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix(anthropic): correct preview to show AI SDK behavior, not Anthropic SDK The preview was showing the wrong URL because it was reflecting Anthropic SDK behavior (which strips versions and uses /v1), but checkApi and chat use AI SDK which preserves the user's version path. Now preview correctly shows: - Input: https://api.siliconflow.cn/v2/ - AI SDK (checkApi/chat): https://api.siliconflow.cn/v2/messages ✅ - Preview: https://api.siliconflow.cn/v2/messages ✅ Note: Anthropic SDK (for listModels) still strips versions to use /v1/models, but this is not shown in preview since it's a different code path. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(checkApi): remove unnecessary legacy fallback The legacy fallback logic in checkApi was: 1. Complex and hard to maintain 2. Never actually triggered in practice for Modern SDK supported providers 3. Could cause duplicate API requests Since Modern AI SDK now handles all major providers correctly, we can simplify by directly throwing errors instead of falling back. This also removes unused imports: AiProvider and CompletionsParams. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix(anthropic): restore version stripping in getSdkClient for Anthropic SDK The Anthropic SDK (used for listModels) always appends /v1 to endpoints, so we need to strip version suffixes from baseURL to avoid duplication. This only affects Anthropic SDK operations (like listModels). AI SDK operations (chat/checkApi) use provider.apiHost directly via providerToAiSdkConfig, which preserves the user's version path. Examples: - AI SDK (chat): https://api.siliconflow.cn/v1 -> /v1/messages ✅ - Anthropic SDK (models): https://api.siliconflow.cn/v1 -> strip v1 -> /v1/models ✅ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix(anthropic): ensure AI SDK gets /v1 in baseURL, strip for Anthropic SDK The correct behavior is: 1. formatProviderApiHost: Add /v1 to apiHost (for AI SDK compatibility) 2. AI SDK (chat/checkApi): Use apiHost with /v1 -> /v1/messages ✅ 3. Anthropic SDK (listModels): Strip /v1 from baseURL -> SDK adds /v1/models ✅ 4. Preview: Show AI SDK behavior (main use case) -> /v1/messages ✅ Examples: - Input: https://api.siliconflow.cn - Formatted: https://api.siliconflow.cn/v1 (added by formatApiHost) - AI SDK: https://api.siliconflow.cn/v1/messages ✅ - Anthropic SDK: https://api.siliconflow.cn (stripped) + /v1/models ✅ - Preview: https://api.siliconflow.cn/v1/messages ✅ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(ai): simplify AiProviderNew initialization and improve docs Update AiProviderNew constructor to automatically format URLs by default Add comprehensive documentation explaining constructor behavior and usage * chore: remove unused play.ts file * fix(anthropic): strip api version from baseURL to avoid endpoint duplication --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
28dff9dfe3
|
feat: add silicon provider support for Anthropic API compatibility (#11468)
* feat: add silicon provider support for Anthropic API compatibility * fix: update handling of ANTHROPIC_BASE_URL for silicon provider compatibility * fix: update anthropicApiHost for silicon provider to use the correct endpoint * fix: remove silicon from CLAUDE_OFFICIAL_SUPPORTED_PROVIDERS * chore: add comment to clarify silicon model fallback logic in CLAUDE_OFFICIAL_SUPPORTED_PROVIDERS |
||
|
|
0a72c613af
|
fix(openai): apply verbosity setting with type safety improvements (#10964)
* refactor(types): consolidate OpenAI types and improve type safety
- Move OpenAI-related types to aiCoreTypes.ts
- Rename FetchChatCompletionOptions to FetchChatCompletionRequestOptions
- Add proper type definitions for service tiers and verbosity
- Improve type guards for service tier checks
* refactor(api): rename options parameter to requestOptions for consistency
Update parameter name across multiple files to use requestOptions instead of options for better clarity and consistency in API calls
* refactor(aiCore): simplify OpenAI summary text handling and improve type safety
- Remove 'off' option from OpenAISummaryText type and use null instead
- Add migration to convert 'off' values to null
- Add utility function to convert undefined to null
- Update Selector component to handle null/undefined values
- Improve type safety in provider options and reasoning params
* fix(i18n): Auto update translations for PR #10964
* feat(utils): add notNull function to convert null to undefined
* refactor(utils): move defined and notNull functions to shared package
Consolidate utility functions into shared package to improve code organization and reuse
* Revert "fix(i18n): Auto update translations for PR #10964"
This reverts commit
|
||
|
|
852192dce6
|
feat: add Git Bash detection and requirement check for Windows agents (#11388)
* feat: add Git Bash detection and requirement check for Windows agents - Add System_CheckGitBash IPC channel for detecting Git Bash installation - Implement detection logic checking common installation paths and PATH environment - Display non-closable error alert in AgentModal when Git Bash is not found - Disable agent creation/edit button until Git Bash is installed - Add recheck functionality to verify installation without restarting app Git Bash is required for agents to function properly on Windows systems. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * i18n: add Git Bash requirement translations for agent modal - Add English translations for Git Bash detection warnings - Add Simplified Chinese (zh-cn) translations - Add Traditional Chinese (zh-tw) translations 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * format code --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
f2c8484c48
|
feat: enable local crash mini dump file (#11348)
* feat: enabel loca crash mini file dump * update version |
||
|
|
d2be450906
|
fix: update gitcode update config url (#11298)
* fix: update gitcode update config url * update version --------- Co-authored-by: Payne Fu <payne@Paynes-MacBook-Pro.local> |
||
|
|
073d43c7cb
|
chore: rename cs-releases to x-files/app-upgrade-config (#11290)
rename cs-releases to x-files/app-upgrade-config |
||
|
|
038d30831c
|
♻️ refactor: implement config-based update system with version compatibility control (#11147)
* ♻️ refactor: implement config-based update system with version compatibility control Replace GitHub API-based update discovery with JSON config file system. Support version gating (users below v1.7 must upgrade to v1.7.0 before v2.0). Auto-select GitHub/GitCode config source based on IP location. Simplify fallback logic. Changes: - Add update-config.json with version compatibility rules - Implement _fetchUpdateConfig() and _findCompatibleChannel() - Remove legacy _getReleaseVersionFromGithub() and GitHub API dependency - Refactor _setFeedUrl() with simplified fallback to default feed URLs - Add design documentation in docs/UPDATE_CONFIG_DESIGN.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix(i18n): Auto update translations for PR #11147 * format code * 🔧 chore: update config for v1.7.5 → v2.0.0 → v2.1.6 upgrade path Update version configuration to support multi-step upgrade path: - v1.6.x users → v1.7.5 (last v1.x release) - v1.7.x users → v2.0.0 (v2.x intermediate version) - v2.0.0+ users → v2.1.6 (current latest) Changes: - Update 1.7.0 → 1.7.5 with fixed feedUrl - Set 2.0.0 as intermediate version with fixed feedUrl - Add 2.1.6 as current latest pointing to releases/latest This ensures users upgrade through required intermediate versions before jumping to major releases. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * 🔧 chore: refactor update config with constants and adjust versions Refactor update configuration system and adjust to actual versions: - Add UpdateConfigUrl enum in constant.ts for centralized config URLs - Point to test server (birdcat.top) for development testing - Update AppUpdater.ts to use UpdateConfigUrl constants - Adjust update-config.json to actual v1.6.7 with rc/beta channels - Remove v2.1.6 entry (not yet released) - Set package version to 1.6.5 for testing upgrade path - Add update-config.example.json for reference 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * update version * ✅ test: add comprehensive unit tests for AppUpdater config system Add extensive test coverage for new config-based update system including: - Config fetching with IP-based source selection (GitHub/GitCode) - Channel compatibility matching with version constraints - Smart fallback from rc/beta to latest when appropriate - Multi-step upgrade path validation (1.6.3 → 1.6.7 → 2.0.0) - Error handling for network and HTTP failures Test Coverage: - _fetchUpdateConfig: 4 tests (GitHub/GitCode selection, error handling) - _findCompatibleChannel: 9 tests (channel matching, version comparison) - Upgrade Path: 3 tests (version gating scenarios) - Total: 30 tests, 100% passing Also optimize _findCompatibleChannel logic with better variable naming and log messages. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * ✅ test: add complete multi-step upgrade path tests (1.6.3 → 1.7.5 → 2.0.0 → 2.1.6) Add comprehensive test suite for complete upgrade journey including: - Individual step validation (1.6.3→1.7.5, 1.7.5→2.0.0, 2.0.0→2.1.6) - Full multi-step upgrade simulation with version progression - Version gating enforcement (block skipping intermediate versions) - Verification that 1.6.3 cannot directly upgrade to 2.0.0 or 2.1.6 - Verification that 1.7.5 cannot skip 2.0.0 to reach 2.1.6 Test Coverage: - 6 new tests for complete upgrade path scenarios - Total: 36 tests, 100% passing This ensures the version compatibility system correctly enforces intermediate version upgrades for major releases. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * 📝 docs: reorganize update config documentation with English translation Move update configuration design document to docs/technical/ directory and add English translation for international contributors. Changes: - Move docs/UPDATE_CONFIG_DESIGN.md → docs/technical/app-update-config-zh.md - Add docs/technical/app-update-config-en.md (English translation) - Organize technical documentation in dedicated directory Documentation covers: - Config-based update system design and rationale - JSON schema with version compatibility control - Multi-step upgrade path examples (1.6.3 → 1.7.5 → 2.0.0 → 2.1.6) - TypeScript type definitions and matching algorithms - GitHub/GitCode source selection for different regions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * format code * ✅ test: add tests for latest channel self-comparison prevention Add tests to verify the optimization that prevents comparing latest channel with itself when latest is requested, and ensures rc/beta channels are returned when they are newer than latest. New tests: - should not compare latest with itself when requesting latest channel - should return rc when rc version > latest version - should return beta when beta version > latest version These tests ensure the requestedChannel !== UpgradeChannel.LATEST check works correctly and users get the right channel based on version comparisons. Test Coverage: 39 tests, 100% passing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * update github/gitcode * format code * update rc version * ♻️ refactor: merge update configs into single multi-mirror file - Merge app-upgrade-config-github.json and app-upgrade-config-gitcode.json into single app-upgrade-config.json - Add UpdateMirror enum for type-safe mirror selection - Optimize _fetchUpdateConfig to receive mirror parameter, eliminating duplicate IP country checks - Update ChannelConfig interface to use Record<UpdateMirror, string> for feedUrls - Rename documentation files from app-update-config-* to app-upgrade-config-* - Update docs with new multi-mirror configuration structure 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * ✅ test: update AppUpdater tests for multi-mirror configuration - Add UpdateMirror enum import - Update _fetchUpdateConfig tests to accept mirror parameter - Convert all feedUrl to feedUrls structure in test mocks - Update test expectations to match new ChannelConfig interface - All 39 tests passing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * format code * delete files * 📝 docs: add UpdateMirror enum to type definitions - Add UpdateMirror enum definition in both EN and ZH docs - Update ChannelConfig to use Record<UpdateMirror, string> - Add comments showing equivalent structure for clarity 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * 🐛 fix: return actual channel from _findCompatibleChannel Fix channel mismatch issue where requesting rc/beta but getting latest: - Change _findCompatibleChannel return type to include actual channel - Return { config, channel } instead of just config - Update _setFeedUrl to use actualChannel instead of requestedChannel - Update all test expectations to match new return structure - Add channel assertions to key tests This ensures autoUpdater.channel matches the actual feed URL being used. Fixes issue where: - User requests 'rc' channel - latest >= rc, so latest config is returned - But channel was set to 'rc' with latest URL ❌ - Now channel is correctly set to 'latest' ✅ All 39 tests passing ✅ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * update version * udpate version * update config * add no cache header * update files * 🤖 chore: automate app upgrade config updates * format code * update workflow * update get method * docs: document upgrade workflow automation --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: GitHub Action <action@github.com> |
||
|
|
a6182eaf85
|
Refactor/inputbar (#10332)
* Refactor inputbar system with configurable scope-based architecture - **Implement scope-based configuration** for chat, agent sessions, and mini-window with feature toggles - **Add tool registry system** with dependency injection for modular inputbar tools - **Create shared state management** via InputbarToolsProvider for consistent state handling - **Migrate existing tools** to registry-based definitions with proper scope filtering The changes introduce a flexible inputbar architecture that supports different use cases through scope-based configuration while maintaining feature parity and improving code organization. * Remove unused import and refactor tool rendering - Delete obsolete '@renderer/pages/home/Inputbar/tools' import from Inputbar.tsx - Extract ToolButton component to render tools outside useMemo dependency cycle - Store tool definitions in config for deferred rendering with current context - Fix potential stale closure issues in tool rendering by rebuilding context on each render * Wrap ToolButton in React.memo and optimize quick panel menu updates - Memoize ToolButton component to prevent unnecessary re-renders when tool key remains unchanged - Replace direct menu state updates with version-based triggering to batch registry changes - Add useEffect to consolidate menu updates and reduce redundant flat operations * chore style * refactor(InputbarToolsProvider): simplify quick panel menu update logic * Improve QuickPanel behavior and input handling - Default select first item when panel symbol changes to enhance user experience - Add Tab key support for selecting template variables in input field - Refactor QuickPanel trigger logic with better symbol tracking and boundary checks - Fix typo in translation key for model selection menu item * Refactor import statements to use type-only imports - Convert inline type imports to explicit type imports in Inputbar.tsx and types.ts - Replace combined type/value imports with separate type imports in InputbarToolsProvider and tools - Remove unnecessary menu version state and effect in InputbarToolsProvider * Refactor InputbarTools context to separate state and dispatch concerns - Split single context into separate state and dispatch contexts to optimize re-renders - Introduce derived state for `couldMentionNotVisionModel` based on file types - Encapsulate Quick Panel API in stable object with memoized functions - Add internal dispatch context for Inputbar-specific state setters * Refactor Inputbar to use split context hooks and optimize QuickPanel - Replace monolithic `useInputbarTools` with separate state, dispatch, and internal dispatch hooks - Move text state from context to local component state in InputbarInner - Optimize QuickPanel trigger registration to use ref pattern, avoiding frequent re-registrations * Refactor QuickPanel API to separate concerns between tools and inputbar - Split QuickPanel API into `toolsRegistry` for tool registration and `triggers` for inputbar triggering - Remove unused QuickPanel state variables and clean up dependencies - Update tool context to use new API structure with proper type safety * Optimize the state management of QuickPanel and Inputbar, add text update functionality, and improve the tool registration logic. * chore * Add reusable React hooks and InputbarCore component for chat input - Create `useInputText`, `useKeyboardHandler`, and `useTextareaResize` hooks for text management, keyboard shortcuts, and auto-resizing - Implement `InputbarCore` component with modular toolbar sections, drag-drop support, and textarea customization - Add `useFileDragDrop` and `usePasteHandler` hooks for file uploads and paste handling with type filtering * Refactor Inputbar to use custom hooks for text and textarea management - Replace manual text state with useInputText hook for text management and empty state - Replace textarea resize logic with useTextareaResize hook for automatic height adjustment - Add comprehensive refactoring documentation with usage examples and guidelines * Refactor inputbar drag-drop and paste handling into custom hooks - Extract paste handling logic into usePasteHandler hook - Extract drag-drop file handling into useFileDragDrop hook - Remove inline drag-drop state and handlers, use hook interfaces - Clean up dependencies and callback optimizations * Refactor Inputbar component to use InputbarCore composition - Extract complex UI logic into InputbarCore component for better separation of concerns - Remove intermediate wrapper component and action ref forwarding pattern - Consolidate focus/blur handlers and simplify component structure * Refactor Inputbar to expose actions via ref for external control - Extract action handlers into ProviderActionHandlers interface and expose via ref - Split component into Inputbar wrapper and InputbarInner implementation - Update useEffect to sync inner component actions with ref for external access * feat: inputbar core * refactor: Update QuickPanel integration across various tools * refactor: migrate to antd * chore: format * fix: clean code * clean code * fix i18n * fix: i18n * relative path * model type * 🤖 Weekly Automated Update: Nov 09, 2025 (#11209) feat(bot): Weekly automated script run Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com> Co-authored-by: SuYao <sy20010504@gmail.com> * format * fix * fix: format * use ripgrep * update with input * add common filters * fix build issue * format * fix error * smooth change * adjust * support listing dir * keep list files when focus and blur * support draft save * Optimize the rendering logic of session messages and input bars, and simplify conditional judgments. * Upgrade to agentId * format * 🐛 fix: force quick triggers for agent sessions * revert * fix migrate * fix: filter * fix: trigger * chore packages * feat: 添加过滤和排序功能,支持自定义函数 * fix cursor bug * fix format --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: beyondkmp <beyondkmp@gmail.com> Co-authored-by: kangfenmao <kangfenmao@qq.com> |
||
|
|
e268e69597
|
refactor(config): centralize home directory constant to shared config (#11158)
Some checks failed
Auto I18N Weekly / Auto I18N (push) Has been cancelled
Replace hardcoded '.cherrystudio' directory references with HOME_CHERRY_DIR constant |
||
|
|
28bc89ac7c
|
perf: optimize QR code generation and connection info for phone LAN export (#11086)
* Increase QR code margin for better scanning reliability - Change QRCodeSVG marginSize from 2 to 4 pixels - Maintains same QR code size (160px) and error correction level (Q) - Improves readability and scanning success rate on mobile devices * Optimize QR code generation and connection info for phone LAN export - Increase QR code size to 180px and reduce error correction to 'L' for better mobile scanning - Replace hardcoded logo path with AppLogo config and increase logo size to 60px - Simplify connection info by removing candidates array and using only essential IP/port data * Optimize QR code data structure for LAN connection - Compress IP addresses to numeric format to reduce QR code complexity - Use compact array format instead of verbose JSON object structure - Remove debug logging to streamline connection flow * feat: 更新 WebSocket 状态和候选者响应类型,优化连接信息处理 * Increase QR code size and error correction for better scanning - Increase QR code size from 180px to 300px for improved readability - Change error correction level from L (low) to H (high) for better reliability - Reduce logo size from 60px to 40px to accommodate larger QR data - Increase margin size from 1 to 2 for better border clearance * 调整二维码大小和图标尺寸以优化扫描体验 * fix(i18n): Auto update translations for PR #11086 * fix(i18n): Auto update translations for PR #11086 * fix(i18n): Auto update translations for PR #11086 --------- Co-authored-by: GitHub Action <action@github.com> |
||
|
|
dc06c103e0
|
chore[lint]: add import type lint (#11091)
chore: add import type lint |
||
|
|
2a06c606e1
|
feat: restore data to mobile App (#10108)
* feat: restore data to App
* fix: i18n check
* fix: lint
* Change WebSocket service port to 11451
- Update default port from 3000 to 11451 for WebSocket connections
- Maintain existing service structure and client connection handling
* Add local IP address to WebSocket server configuration
- Set server path using local IP address for improved network accessibility
- Maintain existing CORS policy with wildcard origin
- Keep backward compatibility with current connection handling
* Remove local IP path and enforce WebSocket transport
- Replace dynamic local IP path with static WebSocket transport configuration
- Maintain CORS policy with wildcard origin for cross-origin connections
- Ensure reliable WebSocket-only communication by disabling fallback transports
* Add detailed logging to WebSocket connection flow
- Enhance WebSocketService with verbose connection logging including transport type and client count
- Add comprehensive logging in ExportToPhoneLanPopup for WebSocket initialization and status tracking
- Improve error handling with null checks for main window before sending events
* Add engine-level WebSocket connection monitoring
- Add initial_headers event listener to log connection attempts with URL and headers
- Add engine connection event to log established connections with remote addresses
- Add startup logs for server binding and allowed transports
* chore: change to use 7017 port
* Improve local IP address selection with interface priority system
- Implement network interface priority ranking to prefer Ethernet/Wi-Fi over virtual/VPN interfaces
- Add detailed logging for interface discovery and selection process
- Remove websocket-only transport restriction for broader client compatibility
- Clean up unused parameter in initial_headers event handler
* Add VPN interface patterns for Tailscale and WireGuard
- Include Tailscale VPN interfaces in network interface filtering
- Add WireGuard VPN interfaces to low-priority network candidates
- Maintain existing VPN tunnel interface patterns for compatibility
* Add network interface prioritization for QR code generation
- Implement `getAllCandidates()` method to scan and prioritize network interfaces by type (Ethernet/Wi-Fi over VPN/virtual interfaces)
- Update QR code payload to include all candidate IPs with priority rankings instead of single host
- Add comprehensive interface pattern matching for macOS, Windows, and Linux systems
* Add WebSocket getAllCandidates IPC channel
- Add new WebSocket_GetAllCandidates enum value to IpcChannel
- Register getAllCandidates handler in main process IPC
- Expose getAllCandidates method in preload script API
* Add WebSocket connection logging and temporary test button
- Add URL and method logging to WebSocket engine connection events
- Implement Socket.IO connect and connect_error event handlers with logging
- Add temporary test button to force connection status for debugging
* Clean up WebSocket logging and remove debug code
- Remove verbose debug logs from WebSocket service and connection handling
- Consolidate connection logging into single informative messages
- Remove temporary test button and force connection functionality from UI
- Add missing "sending" translation key for export button loading state
* Enhance file transfer with progress tracking and improved UI
- Add transfer speed monitoring and formatted file size display in WebSocket service
- Implement detailed connection and transfer state management in UI component
- Improve visual feedback with status indicators, progress bars, and error handling
* Enhance WebSocket service and LAN export UI with improved logging and user experience
- Add detailed WebSocket server configuration with transports, CORS, and timeout settings
- Implement comprehensive connection logging at both Socket.IO and Engine.IO levels
- Refactor export popup with modular components, status indicators, and i18n support
* 移除 WebSocket 连接时的冗余日志记录
* Remove dot indicator from connection status component
- Simplify status style map by removing unused dot color properties
- Delete dot indicator element from connection status display
- Maintain existing border and background color styling for status states
* Refactor ExportToPhoneLanPopup with dedicated UI components and improved UX
- Extract QR code display states into separate components (LoadingQRCode, ScanQRCode, ConnectingAnimation, ConnectedDisplay, ErrorQRCode)
- Add confirmation dialog when attempting to close during active file transfer
- Improve WebSocket cleanup and modal dismissal behavior with proper connection handling
* Remove close button hiding during QR code generation
- Eliminate `hideCloseButton={isSending}` prop to keep close button visible
- Maintain consistent modal behavior throughout export process
- Prevent user confusion by ensuring close option remains available
* auto close
* Extract auto-close countdown into separate component
- Move auto-close countdown logic from TransferProgress to dedicated AutoCloseCountdown component
- Update styling to use paddingTop instead of marginTop for better spacing
- Clean up TransferProgress dependencies by removing autoCloseCountdown
* 添加局域网传输相关的翻译文本,包括自动关闭提示和确认关闭消息
---------
Co-authored-by: suyao <sy20010504@gmail.com>
|
||
|
|
aa810a7ead
|
fix: notify renderer when api server ready (#11049)
* fix: notify renderer when api server ready * chore: minor comment update Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: minor ui change to reflect server loading state --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> |
||
|
|
5790c12011
|
✨ Feat: Enhanced Tool Permission System with Real-time Approvals #10738 (#10743)
* ⬆️ chore: upgrade claude agent sdk to 0.1.15 * ✨ feat: add initial tool permission approval system - Add promptForToolApproval function for real-time tool approval UI - Integrate canUseTool callback into ClaudeCodeService - Create tool-permissions.ts module for permission handling - Set foundation for enhanced tool permission system #10738 This provides the basic infrastructure for displaying tool approval prompts and getting user consent before agents execute potentially dangerous operations. * restore to main for restore to main for * ✨ feat: implement agent tool permission request system Add comprehensive tool permission management for Claude Code agents with: - IPC channels for bidirectional permission requests/responses between main and renderer - Permission request queue with timeout (30s), abort signal handling, and auto-cleanup - Auto-approval system via CHERRY_AUTO_ALLOW_TOOLS env var and default allow-list (Read, Glob, Grep) - New ToolPermissionRequestCard UI component for user approval with input preview - Redux store (toolPermissions) for tracking pending/resolved permission requests - User input stream architecture allowing dynamic user messages during agent execution Key changes: - packages/shared/IpcChannel.ts: Add AgentToolPermission_* channels - src/main/services/agents/services/claudecode/: Refactor canUseTool with permission prompts - src/renderer/src/store/toolPermissions.ts: New Redux slice for permission state - src/renderer/src/pages/home/Messages/Tools/ToolPermissionRequestCard.tsx: Interactive approval UI * refactor: simplify ToolPermissionRequestCard by removing unused imports and suggestion handling logic * feat: add i18n * fix(i18n): Auto update translations for PR #10743 --------- Co-authored-by: dev <verc20.dev@proton.me> Co-authored-by: GitHub Action <action@github.com> |
||
|
|
352ecbc506
|
✨ feat: add plugin management system for Claude Agent (agents, commands, skills) (#10854)
* ✨ feat: add claude-code-templates via git submodule with build-time copy - Add git submodule for davila7/claude-code-templates - Create scripts/copy-templates.js to copy components at build time - Update package.json build script to include template copying - Add resources/data/components/ to .gitignore (generated files) Templates are now automatically synced from external repo to resources/data/components/ during build process, avoiding manual file copying. To update templates: git submodule update --remote --merge * fix: update target directory for copying Claude Code templates * ✨ feat: merge Anthropics skills into template sync * 📝 docs: add agent plugins management implementation spec Add comprehensive implementation plan for plugin management feature: - Security validation and transactional operations - Plugin browsing, installation, and management UI - IPC handlers and PluginService architecture - Metadata caching and database integration * ✨ feat: add plugin management backend infrastructure Backend implementation for Claude Code plugin management: - Add PluginService with security validation and caching - Create IPC handlers for plugin operations (list, install, uninstall) - Add markdown parser with safe YAML frontmatter parsing - Extend AgentConfiguration schema with installed_plugins field - Update preload bridge to expose plugin API to renderer - Add plugin types (PluginMetadata, PluginError, PluginResult) Features: - Transactional install/uninstall with rollback - Path traversal prevention and file validation - 5-minute plugin list caching for performance - SHA-256 content hashing for integrity checks - Duplicate plugin handling (auto-replace) Dependencies added: - gray-matter: Markdown frontmatter parsing - js-yaml: Safe YAML parsing with FAILSAFE_SCHEMA * ✨ feat: add plugin management UI and integration Complete frontend implementation for Claude Code plugin management: **React Hooks:** - useAvailablePlugins: Fetch and cache available plugins - useInstalledPlugins: List installed plugins with refresh - usePluginActions: Install/uninstall with loading states **UI Components (HeroUI):** - PluginCard: Display plugin with install/uninstall actions - CategoryFilter: Multi-select chip-based category filter - InstalledPluginsList: Table view with uninstall confirmation - PluginBrowser: Search, filter, pagination, responsive grid - PluginSettings: Main container with Available/Installed tabs **Integration:** - Added "Plugins" tab to AgentSettingsPopup - Full i18n support (English, Simplified Chinese, Traditional Chinese) - Toast notifications for success/error states - Loading skeletons and empty states **Features:** - Search plugins by name/description - Filter by category and type (agents/commands) - Pagination (12 items per page) - Install/uninstall with confirmation dialogs - Real-time plugin list updates - Responsive grid layout (1-3 columns) All code formatted with Biome and follows existing patterns. * 🐛 fix: add missing plugin i18n keys at root level Add plugin translation keys at root 'plugins.*' level to match component usage: - Search and filter UI strings - Pluralization support for result counts - Empty state messages - Action button labels - Confirmation dialog text Translations added for all three locales (en-US, zh-CN, zh-TW). * 🐛 fix: use getResourcePath() utility for plugin directory resolution Replace manual path calculation with getResourcePath() utility which correctly handles both development and production environments. This fixes the issue where plugins were not loading because __dirname was resolving to the wrong location. Fixes: - Plugins now load correctly in development mode - Path resolution consistent with other resource loading in the app - Removed unused 'app' import from electron * 🎨 fix: improve plugin UI scrolling and category filter layout Fixes two UI issues: 1. Enable scrolling for plugin list: - Changed overflow-hidden to overflow-y-auto on tab containers - Plugin grid now scrollable when content exceeds viewport 2. Make category filter more compact: - Added max-h-24 (96px) height limit to category chip container - Enabled vertical scrolling for category chips - Prevents category filter from taking too much vertical space UI improvements enhance usability when browsing large plugin collections. * 🎨 fix: ensure both agent and command badges have visible backgrounds Changed Chip variant from 'flat' to 'solid' for plugin type badges. This ensures both agent (primary) and command (secondary) badges display with consistent, visible background colors instead of command badges appearing as text-only. * ✨ feat: add plugin detail modal for viewing full plugin information Add modal to display complete plugin details when clicking on a card: Features: - Click any plugin card to view full details in a modal - Shows complete description (not truncated) - Displays all metadata: version, author, tools, allowed_tools, tags - Shows file info: filename, size, source path, install date - Install/uninstall actions available in modal - Hover effect on cards to indicate clickability - Button clicks don't trigger card click (event.stopPropagation) Components: - New PluginDetailModal component with scrollable content - Updated PluginCard to be clickable (isPressable) - Updated PluginBrowser to manage modal state UI improvements provide better plugin exploration and decision-making. * 🐛 fix: render plugin detail modal above agent settings modal Use React portal to render PluginDetailModal directly to document.body, ensuring it appears above the agent settings modal instead of being blocked by it. Changes: - Import createPortal from react-dom - Wrap modal content in createPortal(modalContent, document.body) - Add z-[9999] to modal wrapper for proper layering Fixes modal visibility issue where plugin details were hidden behind the parent agent settings modal. * ✨ feat: add plugin content viewing and editing in detail modal - Added IPC channels for reading and writing plugin content - Implemented readContent() and writeContent() methods in PluginService - Added IPC handlers for content operations with proper error handling - Exposed plugin content API through preload bridge - Updated PluginDetailModal to fetch and display markdown content - Added edit mode with textarea for modifying plugin content - Implemented save/cancel functionality with optimistic UI updates - Added agentId prop to component chain for write operations - Updated AgentConfigurationSchema to include all plugin metadata fields - Moved plugin types to shared @types for cross-process access - Added validation and security checks for content read/write - Updated content hash in DB after successful edits * 🐛 fix: change event handler from onPress to onClick for uninstall and install buttons * 📝 docs: update AI Assistant Guide to clarify proposal and commit guidelines * 📝 docs: add skills support extension spec for agent plugins management * ✨ feat: add secure file operation utilities for skills plugin system - Implement copyDirectoryRecursive() with security protections - Implement deleteDirectoryRecursive() with path validation - Implement getDirectorySize() for folder size calculation - Add path traversal protection using isPathInside() - Handle symlinks securely to prevent attacks - Add recursion depth limits to prevent stack overflow - Preserve file permissions during copy - Handle race conditions and missing files gracefully - Skip special files (pipes, sockets, devices) Security features: - Path validation against allowedBasePath boundary - Symlink detection and skip to prevent circular loops - Input validation for null/empty/relative paths - Comprehensive error handling and logging Updated spec status to "In Progress" and added implementation progress checklist. * ✨ feat: add skill type support and skill metadata parsing Type System Updates (plugin.ts): - Add PluginType export for 'agent' | 'command' | 'skill' - Update PluginMetadataSchema to include 'skill' in type enum - Update InstalledPluginSchema to support skill type - Update all option interfaces to support skill type - Add skills array to ListAvailablePluginsResult - Document filename semantics differences between types Markdown Parser Updates (markdownParser.ts): - Implement parseSkillMetadata() function for SKILL.md parsing - Add comprehensive input validation (absolute path check) - Add robust error handling with specific PluginErrors - Add try-catch around file operations and YAML parsing - Add type validation for frontmatter data fields - Add proper logging using loggerService - Handle getDirectorySize() failures gracefully - Document hash scope decision (SKILL.md only vs entire folder) - Use FAILSAFE_SCHEMA for safe YAML parsing Security improvements: - Path validation to ensure absolute paths - Differentiate ENOENT from permission errors - Type validation for all frontmatter fields - Safe YAML parsing to prevent deserialization attacks Updated spec progress tracking. * ✨ feat: implement complete skill support in PluginService Core Infrastructure: - Add imports for parseSkillMetadata and file operation utilities - Add PluginType to imports for type-safe handling Skill-Specific Methods: - sanitizeFolderName() - validates folder names (no dots allowed) - scanSkillDirectory() - scans skills/ for skill folders - installSkill() - copies folders with transaction/rollback - uninstallSkill() - removes folders with transaction/rollback Updated Methods for Skills Support: - listAvailable() - now scans and returns skills array - install() - branches on type to handle skills vs files - uninstall() - branches on type for skill/file handling - ensureClaudeDirectory() - handles 'skills' subdirectory - listInstalled() - validates skill folders on filesystem - writeContent() - updated signature to accept PluginType Key Implementation Details: - Skills use folder names WITHOUT extensions - Agents/commands use filenames WITH .md extension - Different sanitization rules for folders vs files - Transaction pattern with rollback for all operations - Comprehensive logging and error handling - Maintains backward compatibility with existing code Updated spec progress tracking. * ✨ feat: add skill support to frontend hooks and UI components Frontend Hooks (usePlugins.ts): - Add skills state to useAvailablePlugins hook - Return skills array in hook result - Update install() to accept 'skill' type - Update uninstall() to accept 'skill' type UI Components: - PluginCard: Add 'skill' type badge with success color - PluginBrowser: Add skills prop and include in plugin list - PluginBrowser: Update type definitions to include 'skill' - PluginBrowser: Include skills in tab filtering Complete frontend integration for skills plugin type. Updated spec progress tracking. * ♻️ refactor: remove unused variable in installSkill method * 📝 docs: mark implementation as complete with summary Implementation Status: COMPLETE (11/12 tasks) Completed: - ✅ File operation utilities with security protections - ✅ Skill metadata parsing with validation - ✅ Plugin type system updated to include 'skill' - ✅ PluginService skill methods (scan, install, uninstall) - ✅ PluginService updated for skill support - ✅ IPC handlers (no changes needed - already generic) - ✅ Frontend hooks updated for skills - ✅ UI components updated (PluginCard, PluginBrowser) - ✅ Build check passed with lint fixes Deferred (non-blocking): - ⏸️ Session integration - requires further investigation into session handler location and implementation The core skills plugin system is fully implemented and functional. Skills can be browsed, installed, and uninstalled through the UI. All security requirements met with path validation and transaction rollback. Code passes lint checks and follows project patterns. * 🐛 fix: pass skills prop to PluginBrowser component Fixed "skills is not iterable" error by: - Destructuring skills from useAvailablePlugins hook - Updating type annotations to include 'skill' type - Passing skills prop to PluginBrowser component This completes the missing UI wiring for skills support. * ✨ feat: add Skills tab to plugin browser Added missing Skills tab to PluginBrowser component: - Added Skills tab to type tabs - Added translations for skills in all locales (en-us, zh-cn, zh-tw) - English: "Skills" - Simplified Chinese: "技能" - Traditional Chinese: "技能" This completes the UI integration for the skills plugin type. * ✨ feat: add 'skill' type to AgentConfiguration and GetAgentSessionResponse schemas * ⬆️ chore: upgrade @anthropic-ai/claude-agent-sdk to v0.1.25 with patch - Updated from v0.1.1 to v0.1.25 - Applied fork/IPC patch to new version - Removed old patch file - All tests passing * 🐛 fix: resolve linting and TypeScript type errors in build check - Add external/** and resources/data/claude-code-plugins/** to lint ignore patterns to exclude git submodules and plugin templates from linting - Fix TypeScript error handling in IPC handlers by properly typing caught errors - Fix AgentConfiguration type mismatches by providing default values for permission_mode and max_turns when spreading configuration - Replace control character regex with String.fromCharCode() to avoid ESLint no-control-regex rule in sanitization functions - Fix markdownParser yaml.load return type by adding type assertion - Add getPluginErrorMessage helper to properly extract error messages from PluginError discriminated union types Main process TypeScript errors: Fixed (0 errors) Linting errors: Fixed (0 errors from 4397) Remaining: 4 renderer TypeScript errors in settings components * ♻️ refactor: improve plugin error handling and reorganize i18n structure * ⬆️ chore: update @anthropic-ai/claude-agent-sdk to include patch and additional dependencies * 🗑️ chore: remove unused Claude code plugins and related configurations - Deleted `.gitmodules` and associated submodules for `claude-code-templates` and `anthropics-skills`. - Updated `.gitignore`, `.oxlintrc.json`, and `eslint.config.mjs` to exclude `claude-code-plugins`. - Modified `package.json` to remove the build script dependency on copying templates. - Adjusted `PluginService.ts` to handle plugin paths without relying on removed resources. * format code * delete * delete * fix(i18n): Auto update translations for PR #10854 * ✨ feat: enhance PluginService and markdownParser with recursive skill directory search - Added `findAllSkillDirectories` function to recursively locate directories containing `SKILL.md`. - Updated `scanSkillDirectory` method in `PluginService` to utilize the new recursive search. - Modified `PluginDetailModal` to append `/SKILL.md` to the source path for skill plugins. * fix(i18n): Auto update translations for PR #10854 * remove specs * update claude code plugins files --------- Co-authored-by: suyao <sy20010504@gmail.com> Co-authored-by: beyondkmp <beyondkmp@gmail.com> Co-authored-by: GitHub Action <action@github.com> |
||
|
|
d187adb0d3
|
feat: redirect macOS About menu to settings About page (#10902)
* ci: add GitHub issue tracker workflow with Feishu notifications (#10895) * feat: add GitHub issue tracker workflow with Feishu notifications * fix: add missing environment variable for Claude translator in GitHub issue tracker workflow * fix: update environment variable for Claude translator in GitHub issue tracker workflow * Add quiet hours handling and scheduled processing for GitHub issue notifications - Implement quiet hours detection (00:00-08:30 Beijing Time) with delayed notifications - Add scheduled workflow to process pending issues daily at 08:30 Beijing Time - Create new script to batch process and summarize multiple pending issues with Claude * Replace custom Node.js script with Claude Code Action for issue processing - Migrate from custom JavaScript implementation to Claude Code Action for AI-powered issue summarization and processing - Simplify workflow by leveraging Claude's built-in GitHub API integration and tool usage capabilities - Maintain same functionality: fetch pending issues, generate Chinese summaries, send Feishu notifications, and clean up labels - Update Claude action reference from version pin to main branch for latest features * Remove GitHub issue comment functionality - Delete automated AI summary comments on issues after processing - Remove documentation for manual issue commenting workflow - Keep Feishu notification system intact while streamlining issue interactions * feat: redirect macOS About menu to settings About page Add functionality to navigate to the About page in settings when clicking the About menu item in macOS menu bar. Changes: - Add Windows_NavigateToAbout IPC channel for communication between main and renderer processes - Create AppMenuService to setup macOS application menu with custom About handler - Add IPC handler in main process to show main window and trigger navigation - Add IPC listener in renderer NavigationHandler to navigate to /settings/about - Initialize AppMenuService on app startup for macOS platform 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * * feat: add GitHub issue tracker workflow with Feishu notifications * feat: add GitHub issue tracker workflow with Feishu notifications * fix: add missing environment variable for Claude translator in GitHub issue tracker workflow * fix: update environment variable for Claude translator in GitHub issue tracker workflow * Add quiet hours handling and scheduled processing for GitHub issue notifications - Implement quiet hours detection (00:00-08:30 Beijing Time) with delayed notifications - Add scheduled workflow to process pending issues daily at 08:30 Beijing Time - Create new script to batch process and summarize multiple pending issues with Claude * Replace custom Node.js script with Claude Code Action for issue processing - Migrate from custom JavaScript implementation to Claude Code Action for AI-powered issue summarization and processing - Simplify workflow by leveraging Claude's built-in GitHub API integration and tool usage capabilities - Maintain same functionality: fetch pending issues, generate Chinese summaries, send Feishu notifications, and clean up labels - Update Claude action reference from version pin to main branch for latest features * Remove GitHub issue comment functionality - Delete automated AI summary comments on issues after processing - Remove documentation for manual issue commenting workflow - Keep Feishu notification system intact while streamlining issue interactions * Add OIDC token permissions and GitHub token to Claude workflow - Add `id-token: write` permission for OIDC authentication in both jobs - Pass `github_token` to Claude action for proper GitHub API access - Maintain existing issue write and contents read permissions * fix: add GitHub issue tracker workflow with Feishu notifications * feat: add GitHub issue tracker workflow with Feishu notifications * fix: add missing environment variable for Claude translator in GitHub issue tracker workflow * fix: update environment variable for Claude translator in GitHub issue tracker workflow * Add quiet hours handling and scheduled processing for GitHub issue notifications - Implement quiet hours detection (00:00-08:30 Beijing Time) with delayed notifications - Add scheduled workflow to process pending issues daily at 08:30 Beijing Time - Create new script to batch process and summarize multiple pending issues with Claude * Replace custom Node.js script with Claude Code Action for issue processing - Migrate from custom JavaScript implementation to Claude Code Action for AI-powered issue summarization and processing - Simplify workflow by leveraging Claude's built-in GitHub API integration and tool usage capabilities - Maintain same functionality: fetch pending issues, generate Chinese summaries, send Feishu notifications, and clean up labels - Update Claude action reference from version pin to main branch for latest features * Remove GitHub issue comment functionality - Delete automated AI summary comments on issues after processing - Remove documentation for manual issue commenting workflow - Keep Feishu notification system intact while streamlining issue interactions * Add OIDC token permissions and GitHub token to Claude workflow - Add `id-token: write` permission for OIDC authentication in both jobs - Pass `github_token` to Claude action for proper GitHub API access - Maintain existing issue write and contents read permissions * Enhance GitHub issue automation workflow with Claude integration - Refactor Claude action to handle issue analysis, Feishu notification, and comment creation in single step - Add tool permissions for Bash commands and custom notification script execution - Update prompt with detailed task instructions including summary generation and automated actions - Remove separate notification step by integrating all operations into Claude action workflow * fix * 删除AI总结评论的添加步骤和注意事项 * fix comments * refactor(AppMenuService): streamline WindowService usage Updated the AppMenuService to directly import and use the windowService for retrieving the main window and showing it, enhancing code clarity and maintainability. * add i18n * fix(AppMenuService): handle macOS application menu setup conditionally Updated the AppMenuService to only instantiate when running on macOS, preventing potential null reference errors. Additionally, added optional chaining in the main index file for safer menu setup. * fix(i18n): Auto update translations for PR #10902 --------- Co-authored-by: SuYao <sy20010504@gmail.com> Co-authored-by: Payne Fu <payne@Paynes-MacBook-Pro.local> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: GitHub Action <action@github.com> |
||
|
|
0e5ebcfd00
|
feat: new build-in OCR provider -> intel OV(NPU) OCR (#10737)
* new build-in ocr provider intel ov Signed-off-by: Ma, Kejiang <kj.ma@intel.com> Signed-off-by: Kejiang Ma <kj.ma@intel.com> * updated base on PR's commnets Signed-off-by: Kejiang Ma <kj.ma@intel.com> * feat(OcrImageSettings): use swr to fetch available providers Add loading state and error handling when fetching available OCR providers. Display an alert when provider loading fails, showing the error message. Also optimize provider filtering logic using useMemo. * refactor(ocr): rename providers to listProviders for consistency Update method name to better reflect its functionality and maintain naming consistency across the codebase --------- Signed-off-by: Ma, Kejiang <kj.ma@intel.com> Signed-off-by: Kejiang Ma <kj.ma@intel.com> Co-authored-by: icarus <eurfelux@gmail.com> |
||
|
|
1a972ac0e0
|
fix: api server status (#10734)
* refactor(apiServer): move api server types to dedicated module Restructure api server type definitions by moving them from index.ts to a dedicated apiServer.ts file. This improves code organization and maintainability by grouping related types together. * feat(api-server): add api server management hooks and integration Extract api server management logic into reusable hook and integrate with settings page * feat(api-server): improve api server status handling and error messages - add new error messages for api server status - optimize initial state and loading in useApiServer hook - centralize api server enabled check via useApiServer hook - update components to use new api server status handling * fix(agents): update error message key for agent server not running * fix(i18n): update api server status messages across locales Remove redundant 'notRunning' message in en-us locale Add consistent 'not_running' error message in all locales Add missing 'notEnabled' message in several locales * refactor: update api server type imports to use @types Move api server related type imports from renderer/src/types to @types package for better code organization and maintainability * docs(IpcChannel): add comment about unused api-server:get-config Add TODO comment about data inconsistency in useApiServer hook * refactor(assistants): pass apiServerEnabled as prop instead of using hook Move apiServerEnabled from being fetched via useApiServer hook to being passed as a prop through component hierarchy. This improves maintainability by making dependencies more explicit and reducing hook usage in child components. * style(AssistantsTab): add consistent margin-bottom to alert components * feat(useAgent): add api server status checks before fetching agent Ensure api server is enabled and running before attempting to fetch agent data |
||
|
|
7b90dfb46c
|
fix: intercept webview keyboard shortcuts for search functionality (#10641)
* feat: intercept webview keyboard shortcuts for search functionality Implemented keyboard shortcut interception in webview to enable search functionality (Ctrl/Cmd+F) and navigation (Enter/Escape) within mini app pages. Previously, these shortcuts were consumed by the webview content and not propagated to the host application. Changes: - Added Webview_SearchHotkey IPC channel for forwarding keyboard events - Implemented before-input-event handler in WebviewService to intercept Ctrl/Cmd+F, Escape, and Enter - Extended preload API with onFindShortcut callback for webview shortcut events - Updated WebviewSearch component to handle shortcuts from both window and webview - Added comprehensive test coverage for webview shortcut handling 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix lint * refactor: improve webview hotkey initialization and error handling Refactored webview keyboard shortcut handler for better code organization and reliability. Changes: - Extracted keyboard handler logic into reusable attachKeyboardHandler function - Added initWebviewHotkeys() to initialize handlers for existing webviews on startup - Integrated initialization in main app entry point - Added explanatory comment for event.preventDefault() behavior - Added warning log when webContentsId is unavailable in WebviewSearch 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: add WebviewKeyEvent type and update related components - Introduced WebviewKeyEvent type to standardize keyboard event handling for webviews. - Updated preload index to utilize the new WebviewKeyEvent type in the onFindShortcut callback. - Refactored WebviewSearch component and its tests to accommodate the new type, enhancing type safety and clarity. 🤖 Generated with [Claude Code](https://claude.com/claude-code) * fix lint --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
62774b34d3
|
feat: add updating dialog in render (#10569)
* feat: replace update dialog handling with quit and install functionality * refactor: remove App_ShowUpdateDialog and implement App_QuitAndInstall in IpcChannel * update ipc.ts to handle quit and install action * modify AppUpdater to include quitAndInstall method * adjust preload index to invoke new quit and install action * enhance AboutSettings to manage update dialog state and trigger quit and install * fix(AboutSettings): handle null update info in update dialog state management * fix(UpdateDialog): improve error handling during update installation and enhance release notes processing * fix(AppUpdater): remove redundant assignment of releaseInfo after update download * fix(IpcChannel): remove UpdateDownloadedCancelled enum value * format code * fix(UpdateDialog): enhance installation process with loading state and error handling * update i18n * fix(i18n): Auto update translations for PR #10569 * feat(UpdateAppButton): integrate UpdateDialog and update button functionality for better user experience * fix(UpdateDialog): update installation handler to support async operation and ensure modal closes after installation * refactor(AppUpdater.test): remove deprecated formatReleaseNotes tests to streamline test suite * refactor(update-dialog): simplify dialog close handling Replace onOpenChange with onClose prop to directly handle dialog closing Remove redundant handleClose function and simplify button onPress handler --------- Co-authored-by: GitHub Action <action@github.com> Co-authored-by: icarus <eurfelux@gmail.com> |
||
|
|
d4c6131fa3 |
Merge remote-tracking branch 'origin/main' into feat/agents-new
# Conflicts: # package.json # src/renderer/src/aiCore/chunk/AiSdkToChunkAdapter.ts |
||
|
|
38ac42af8c
|
feat: add GitHub Copilot CLI integration to coding tools (#10403)
* feat: add GitHub Copilot CLI integration to coding tools - Add githubCopilotCli to codeTools enum - Support @github/copilot package installation - Add 'copilot' executable command mapping - Update Redux store to include GitHub Copilot CLI state - Add GitHub Copilot CLI option to UI with proper provider mapping - Implement environment variable handling for GitHub authentication - Fix model selection logic to disable model choice for GitHub Copilot CLI - Update launch validation to not require model selection for GitHub Copilot CLI - Fix prepareLaunchEnvironment and executeLaunch to handle no-model scenario This enables users to launch GitHub Copilot CLI directly from Cherry Studio's code tools interface without needing to select a model, as GitHub Copilot CLI uses GitHub's built-in models and authentication. Signed-off-by: LeaderOnePro <leaderonepro@outlook.com> * style: apply code formatting for GitHub Copilot CLI integration Auto-fix code style inconsistencies using project's Biome formatter. Resolves semicolon, comma, and quote style issues to match project standards. Signed-off-by: LeaderOnePro <leaderonepro@outlook.com> * feat: conditionally render model selector for GitHub Copilot CLI - Hide model selector component when GitHub Copilot CLI is selected - Maintain validation logic to allow GitHub Copilot CLI without model selection - Improve UX by removing empty model dropdown for GitHub Copilot CLI 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Signed-off-by: LeaderOnePro <leaderonepro@outlook.com> Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
538291c03f |
♻️ refactor: consolidate Claude Code system message handling and streaming logic
- Unify buildClaudeCodeSystemMessage implementation in shared package - Refactor MessagesService to provide comprehensive message processing API - Extract streaming logic, error handling, and header preparation into service methods - Remove duplicate anthropic config from renderer, use shared implementation - Update ClaudeCodeService to use append mode for custom instructions - Improve type safety and request validation in message processing |
||
|
|
d9d8bae2d6 | Merge remote-tracking branch 'origin/main' into feat/agents-new | ||
|
|
422ba52093 |
⬆️ chore: migrate from Claude Code SDK to Claude Agent SDK v0.1.1
- Replace @anthropic-ai/claude-code with @anthropic-ai/claude-agent-sdk@0.1.1 - Update all import statements across 4 files - Migrate patch for Electron compatibility (fork vs spawn) - Handle breaking changes: replace appendSystemPrompt with systemPrompt preset - Add settingSources configuration for filesystem settings - Update vendor path in build scripts - Update package name mapping in CodeToolsService |
||
|
|
27c31d6e0c |
feat(file): add showInFolder IPC channel to reveal files in explorer
Implement functionality to show files/folders in system explorer through IPC. Includes channel definition, preload API, main handler, and error handling for non-existent paths. |
||
|
|
961ee22327
|
feat: add new provider intel OVMS(openvino model server) (#9853)
* add new provider: OVMS(openvino model server) Signed-off-by: Ma, Kejiang <kj.ma@intel.com> * remove useless comments * add note: support windows only * fix eslint error; add migrate for ovms provider Signed-off-by: Ma, Kejiang <kj.ma@intel.com> * fix ci error after rebase Signed-off-by: Ma, Kejiang <kj.ma@intel.com> * modifications base on reviewers' comments Signed-off-by: Ma, Kejiang <kj.ma@intel.com> * show intel-ovms provider only on windows and intel cpu Signed-off-by: Ma, Kejiang <kj.ma@intel.com> * complete i18n for intel ovms Signed-off-by: Ma, Kejiang <kj.ma@intel.com> * update ovms 2025.3; apply patch for model qwen3-8b on local Signed-off-by: Ma, Kejiang <kj.ma@intel.com> * fix lint issues Signed-off-by: Ma, Kejiang <kj.ma@intel.com> * fix issues for format, type checking Signed-off-by: Ma, Kejiang <kj.ma@intel.com> * remove test code Signed-off-by: Ma, Kejiang <kj.ma@intel.com> * fix issues after rebase Signed-off-by: Ma, Kejiang <kj.ma@intel.com> --------- Signed-off-by: Ma, Kejiang <kj.ma@intel.com> |
||
|
|
cff9068359 | ♻️ refactor: standardize string quotes and improve logging in Anthropic integration | ||
|
|
cc871b7a72 | ♻️ refactor: enhance logging and provider handling for Anthropic integration | ||
|
|
4d133d59ea |
feat: enhance Anthropic API support for compatible providers
- Add support for anthropicApiHost configuration in providers - Improve model filtering for Anthropic-compatible providers - Add isAnthropicModel function to validate Anthropic models - Update ClaudeCode service to support compatible providers - Enhance logging and error handling in API routes - Fix model transformation and validation logic |
||
|
|
35b885798b |
Add Anthropic API Host support for compatible providers
- Add `anthropicApiHost` field to Provider type - Update provider config and migration to set Anthropic endpoints - Add UI for configuring Anthropic API Host in provider settings - Update SDK client logic to use Anthropic API Host when available - Add i18n strings for Anthropic API Host configuration |
||
|
|
45961d2eda | Merge remote-tracking branch 'origin/main' into feat/agents-new | ||
|
|
499cb52e28
|
feat: enhance terminal command handling for macOS (#10362)
- Introduced a helper function to escape strings for AppleScript to ensure proper command execution. - Updated terminal command definitions to utilize the new escape function, improving compatibility with special characters. - Adjusted command parameters to use double quotes for directory paths, enhancing consistency and reliability. |
||
|
|
8e163b8f17 | Merge branch 'main' of github.com:CherryHQ/cherry-studio into feat/agents-new | ||
|
|
37218eef4f | feat: enable cherryin provider | ||
|
|
183b46be9e |
feat(ipc): add App_Quit channel and update related handlers
- Introduced a new IPC channel for quitting the application. - Updated ipc.ts to handle the App_Quit channel, allowing the app to quit when invoked. - Added corresponding quit method in the preload API for client-side access. - Fixed a minor URL check in WindowService to ensure proper navigation handling. |
||
|
|
1d5761b1fd
|
WIP | ||
|
|
335bf47dbd
|
Merge branch 'feat/agents-new' of https://github.com/CherryHQ/cherry-studio into feat/agents-new | ||
|
|
26ac9e3c2e | fix(getSdkClient): add authToken to anthropic client initialization for claude code | ||
|
|
6f6944d003
|
chunk type | ||
|
|
a32fad06a0 | Merge remote-tracking branch 'origin/main' into feat/agents-new |