main
202 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
706fac898a |
fix(i18n): clarify image-generation endpoint type as OpenAI-based (#11554)
* fix(i18n): remove image-generation translations and clarify endpoint type Update English locale to specify OpenAI for image generation Add comments to clarify image-generation endpoint type relationship * fix(i18n): correct portuguese translations in pt-pt.json |
||
|
|
5167c927be |
fix: preserve openrouter reasoning with web search (#11505)
* feat(options): implement deep merging for provider options Add deep merge functionality to preserve nested properties when combining provider options. The new implementation handles object merging recursively while maintaining type safety. * refactor(tsconfig): reorganize include paths in tsconfig files Clean up and reorder include paths for better maintainability and consistency between tsconfig.node.json and tsconfig.web.json * test: add aiCore test configuration and script Add new test configuration for aiCore package and corresponding test script in package.json to enable running tests specifically for the aiCore module. * fix: format * fix(aiCore): resolve test failures and update test infrastructure - Add vitest setup file with global mocks for @cherrystudio/ai-sdk-provider - Fix context assertions: use 'model' instead of 'modelId' in plugin tests - Fix error handling tests: update expected error messages to match actual behavior - Fix streamText tests: use 'maxOutputTokens' instead of 'maxTokens' - Fix schemas test: update expected provider list to match actual implementation - Fix mock-responses: use AI SDK v5 format (inputTokens/outputTokens) - Update vi.mock to use importOriginal for preserving jsonSchema export 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix(aiCore): add alias mock for @cherrystudio/ai-sdk-provider in tests The vi.mock in setup file doesn't work for source code imports. Use vitest resolve.alias to mock the external package properly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix(aiCore): disable unused-vars warnings in mock file 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix(aiCore): use import.meta.url for ESM compatibility in vitest config __dirname is not available in ESM modules, use fileURLToPath instead. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix(aiCore): use absolute paths in vitest config for workspace compatibility - Use path.resolve for setupFiles and all alias paths - Extend aiCore vitest.config.ts from root workspace config - Change aiCore test environment to 'node' instead of 'jsdom' 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * docs(factory): improve mergeProviderOptions documentation Add detailed explanation of merge behavior with examples * test(factory): add tests for mergeProviderOptions behavior Add test cases to verify mergeProviderOptions correctly handles primitive values, arrays, and nested objects during merging * refactor(tests): clean up mock responses test fixtures Remove unused mock streaming chunks and error responses to simplify test fixtures Update warning details structure in mock complete responses * docs(test): clarify comment in generateImage test Update comment to use consistent 'model id' terminology instead of 'modelId' * test(factory): verify array replacement in mergeProviderOptions --------- Co-authored-by: suyao <sy20010504@gmail.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 |
||
|
|
5fb59d21ec |
fix: header merging logic via chore ai-sdk (#11443)
* fix: update provider-utils and add patch for header merging logic * fix: enhance header merging logic to deduplicate values * fix: handle null values in header merging logic * chore: update ai-sdk dependencies and remove obsolete patches - Updated @ai-sdk/amazon-bedrock from 3.0.56 to 3.0.61 - Updated @ai-sdk/anthropic from 2.0.45 to 2.0.49 - Updated @ai-sdk/gateway from 2.0.13 to 2.0.15 - Updated @ai-sdk/google from 2.0.40 to 2.0.43 - Updated @ai-sdk/google-vertex from 3.0.72 to 3.0.79 - Updated @ai-sdk/openai from 2.0.71 to 2.0.72 - Updated @ai-sdk/provider-utils from patch version to 3.0.17 - Removed obsolete patches for @ai-sdk/openai and @ai-sdk/provider-utils - Added reasoning_content field to OpenAIChat response and chunk schemas - Enhanced OpenAIChatLanguageModel to handle reasoning content in responses * chore |
||
|
|
2c3338939e |
feat: update Google and OpenAI SDKs with new features and fixes (#11395)
* feat: update Google and OpenAI SDKs with new features and fixes - Updated Google SDK to ensure model paths are correctly formatted. - Enhanced OpenAI SDK to include support for image URLs in chat responses. - Added reasoning content handling in OpenAI chat responses and chunks. - Introduced Azure Anthropic provider configuration for Claude integration. * fix: azure error * fix: lint * fix: test * fix: test * fix type * fix comment * fix: redundant * chore resolution * fix: test * fix: comment * fix: comment * fix * feat: 添加 OpenRouter 推理中间件以支持内容过滤 |
||
|
|
49903a1567 |
Test/ai-core (#11307)
* test: 1 * test: 2 * test: 3 * format * chore: move provider from config to utils * fix: 4 * test: 5 * chore: redundant logic * test: add reasoning model tests and improve provider options typings * chore: format * test 6 * chore: format * test: 7 * test: 8 * fix: test * fix: format and typecheck * fix error * test: isClaude4SeriesModel * fix: test * fix: test --------- Co-authored-by: defi-failure <159208748+defi-failure@users.noreply.github.com> |
||
|
|
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
|
||
|
|
c48f222cdb |
feat: add endpoint type support for cherryin provider (#11367)
* feat: add endpoint type support for cherryin provider * chore: bump @cherrystudio/ai-sdk-provider version to 0.1.1 * chore: bump ai-sdk-provider version to 0.1.3 |
||
|
|
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> |
||
|
|
77529b3cd3 |
chore: update ai-core release scripts and bump version to 1.0.7 (#11370)
* chore: update ai-core release scripts and bump version to 1.0.7 * chore: update ai-sdk-provider release script to include build step and enhance type exports in webSearchPlugin and providers * chore: bump @cherrystudio/ai-core version to 1.0.8 and update dependencies in package.json and yarn.lock * chore: bump @cherrystudio/ai-core version to 1.0.9 and @cherrystudio/ai-sdk-provider version to 0.1.2 in package.json and yarn.lock --------- Co-authored-by: suyao <sy20010504@gmail.com> |
||
|
|
c8e9a10190 |
bump ai core version (#11363)
* bump ai core version * chore * chore: add patch for @ai-sdk/openai and update peer dependencies in aiCore * chore: update installation instructions in README to include @ai-sdk/google and @ai-sdk/openai * chore: bump @cherrystudio/ai-core version to 1.0.6 in package.json and yarn.lock --------- Co-authored-by: MyPrototypeWhat <daoquqiexing@gmail.com> |
||
|
|
dc9503ef8b |
feat: support gemini 3 (#11356)
* feat(reasoning): add support for gemini-3-pro-preview model Update regex pattern to include gemini-3-pro-preview as a supported thinking model Add tests for new gemini-3 model support and edge cases * fix(reasoning): update gemini model regex to include stable versions Add support for stable versions of gemini-3-flash and gemini-3-pro in the model regex pattern. Update tests to verify both preview and stable versions are correctly identified. * feat(providers): add vertexai provider check function Add isVertexAiProvider function to consistently check for vertexai provider type and use it in websearch model detection * feat(websearch): update gemini search regex to include v3 models Add support for gemini 3.x models in the search regex pattern, including preview versions * feat(vision): add support for gemini-3 models and add tests Add regex pattern for gemini-3 models in visionAllowedModels Create comprehensive test suite for isVisionModel function * refactor(vision): make vision-related model constants private Remove unused isNotSupportedImageSizeModel function and change exports to const declarations for internal use only * chore(deps): update @ai-sdk/google to v2.0.36 and related dependencies update @ai-sdk/google dependency from v2.0.31 to v2.0.36 to include fixes for model path handling and tool support for newer Gemini models * chore: remove outdated @ai-sdk-google patch file * chore: remove outdated @ai-sdk/google patch dependency |
||
|
|
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> |
||
|
|
649f9420a4 |
feat: add @cherrystudio/ai-sdk-provider package and integrate (#10715)
* feat: add @cherrystudio/ai-sdk-provider package and integrate with CherryIN - Introduced the @cherrystudio/ai-sdk-provider package, providing a CherryIN routing solution for AI SDKs. - Updated configuration files to include the new provider. - Enhanced provider initialization to support CherryIN as a new AI provider. - Added README and documentation for usage instructions. * chore: remove deprecated @ai-sdk/google dependency and clean up package files - Removed the @ai-sdk/google dependency from package.json and yarn.lock as it is no longer needed. - Simplified the createGeminiModel function in index.ts for better readability and maintainability. * feat: update CherryIN provider integration and dependencies - Updated @ai-sdk/anthropic and @ai-sdk/google dependencies to their latest versions in package.json and yarn.lock. - Introduced a new CherryInProvider implementation in cherryin-provider.ts, enhancing support for CherryIN API. - Refactored provider initialization to include CherryIN as a supported provider in schemas.ts and options.ts. - Updated web search plugin to utilize the new CherryIN provider capabilities. - Cleaned up and organized imports across various files for better maintainability. * chore: clean up tsconfig and remove unnecessary nullish coalescing in CherryIn provider - Simplified tsconfig.json by consolidating exclude and include arrays. - Removed nullish coalescing in cherryin-provider.ts for cleaner header handling in model initialization. * fix: remove console.log from webSearchPlugin to clean up code - Eliminated unnecessary console.log statement in the webSearchPlugin to enhance code clarity and maintainability. * fix(i18n): Auto update translations for PR #10715 * chore: update yarn.lock with new package versions and dependencies - Added new versions for @ai-sdk/anthropic, @ai-sdk/google, @ai-sdk/provider-utils, and eventsource-parser. - Updated dependencies and peerDependencies for the newly added packages. * feat: enhance CherryIn provider with chat model support and custom fetch logic - Introduced CherryInOpenAIChatLanguageModel to handle chat-specific configurations. - Updated createChatModel to support CherryIn chat models. - Modified webSearchPlugin to accommodate both 'cherryin' and 'cherryin-chat' provider IDs. - Added 'cherryin-chat' provider ID to schemas and provider configurations. - Adjusted provider factory to correctly set provider ID for chat mode. - Enhanced web search utility to handle CherryIn chat models. * 🐛 fix: resolve cherryin provider lint errors and web search config - Add fetch global variable declaration for ai-sdk-provider in oxlintrc - Fix endpoint_type mapping fallback logic in cherryin provider - Add error handling comment for better code readability * chore(dependencies): update AI SDK packages and patches - Added new versions for @ai-sdk/anthropic, @ai-sdk/google, and @ai-sdk/provider-utils in yarn.lock. - Updated @ai-sdk/openai dependency to use a patch version in package.json. - Included @cherrystudio/ai-sdk-provider as a new dependency in the workspace. * chore(dependencies): update peer dependencies and installation instructions - Removed specific versions of @ai-sdk/anthropic and @ai-sdk/google from package.json and yarn.lock. - Updated peer dependencies in package.json to include @ai-sdk/anthropic, @ai-sdk/google, and @ai-sdk/openai. - Revised installation instructions in README.md to reflect the new dependencies. --------- Co-authored-by: GitHub Action <action@github.com> |
||
|
|
2663cb19ce |
Chore/aisdk (#11232)
* chore(dependencies): update AI SDK dependencies to latest versions * chore(patches): update AI SDK patches for Hugging Face, OpenAI, and Google |
||
|
|
e268e69597 |
refactor(config): centralize home directory constant to shared config (#11158)
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> |
||
|
|
e0a2ed0481 |
Provider Config & anthropic-web-fetch (#10808)
* fix: update AI SDK dependencies to latest versions * feat: Update provider configurations and API handling - Refactor provider configuration to support new API types and enhance API host formatting. - Introduce new utility functions for handling API versions and formatting Azure OpenAI hosts. - Update system models to include new capabilities and adjust provider types for CherryIN and VertexAI. - Enhance provider settings UI to accommodate new API types and improve user experience. - Implement migration logic for provider type updates and default API host settings. - Update translations for API host configuration tips across multiple languages. - Fix various type checks and utility functions to ensure compatibility with new provider types. * fix: update unsupported API version providers and add longcat to compatible provider IDs * fix: 移除不再使用的 Azure OpenAI API 版本参数,优化 API 主机格式化逻辑 feat: 在选择器组件中添加样式属性,增强可定制性 feat: 更新提供者设置,支持动态选择 API 主机字段 * refactor: 优化测试用例 * 修复: 更新工具调用处理器以支持新的工具调用类型 * feat: 添加TODO注释以改进基于AI SDK的供应商内置工具展示和类型安全处理 * feat: 添加对Google SDK的支持,更新流式参数构建逻辑以包含Google工具的上下文 * feat: 更新web搜索模型判断逻辑,使用SystemProviderIds常量替代硬编码字符串 * feat: 添加对@renderer/store的mock以支持测试环境 * feat: 添加API主机地址验证功能,更新相关逻辑以支持端点提取 * fix: i18n * fix(i18n): Auto update translations for PR #10808 * Apply suggestion from @EurFelux Co-authored-by: Phantom <eurfelux@gmail.com> * Apply suggestion from @EurFelux Co-authored-by: Phantom <eurfelux@gmail.com> * Apply suggestion from @EurFelux Co-authored-by: Phantom <eurfelux@gmail.com> * refactor: Simplify provider type migration logic and enhance API version validation * fix: Correct variable name from configedApiHost to configuredApiHost for consistency * fix: Update package.json to remove deprecated @ai-sdk/google version and streamline @ai-sdk/openai versioning * fix: 更新 hasAPIVersion 函数中的正则表达式以更准确地匹配 API 版本路径 * fix(api): 简化 validateApiHost 函数逻辑以始终返回 true fix(yarn): 更新 @ai-sdk/openai 版本至 2.0.53 并添加依赖项 * fix(api): 修正 validateApiHost 函数在使用哈希后缀时的验证逻辑 --------- Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Phantom <eurfelux@gmail.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> |
||
|
|
82132d479a |
feat: add huggingface provider (#10966)
* Refactor code structure for improved readability and maintainability * fix(i18n): Auto update translations for PR #10966 * fix: add empty array for huggingface models in SYSTEM_MODELS * feat: integrate HuggingFace provider and enhance reasoning options * fix: remove debug console logs from provider options functions --------- Co-authored-by: GitHub Action <action@github.com> |
||
|
|
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> |
||
|
|
a176814ad1 |
fix: update ESLint configuration and dependencies, replace zod import… (#10645)
fix: update ESLint configuration and dependencies, replace zod import style |
||
|
|
5f469a71f3 | fix: update ai-sdk dependencies to latest versions (#10643) | ||
|
|
1c73271e33 |
fix: support gpt-5-codex for github copilot (#10587)
* fix: support gpt-5-codex for github copilot
- Added patch for @ai-sdk/openai to version 2.0.42 in package.json and yarn.lock.
- Updated editor version for Copilot from v1.97.2 to v1.104.1 in OpenAIBaseClient and providerConfig.
- Enhanced provider configuration to support new model options for Copilot.
* fix: streamline Copilot header management
- Replaced individual header assignments for Copilot with centralized constants in OpenAIBaseClient and providerConfig.
- Enhanced provider configuration to conditionally set response mode for Copilot models, improving routing logic.
* update aisdk
* delete patch
* 🤖 chore: integrate Copilot SDK provider
* use a plugin
* udpate dependency
* fix: remove unused Copilot default headers from OpenAIBaseClient
- Eliminated the import and usage of COPILOT_DEFAULT_HEADERS to streamline header management in the OpenAIBaseClient class.
* update yarn
* fix lint
* format code
* feat: enhance web search tool types in webSearchPlugin
- Added type normalization for web search tools to improve type safety and clarity.
- Updated WebSearchToolInputSchema and WebSearchToolOutputSchema to use normalized types for better consistency across the plugin.
|
||
|
|
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 |
||
|
|
d11a2cd95c |
chore: update dependencies and versioning across packages (#10471)
- Bumped versions for several @ai-sdk packages in package.json and yarn.lock to their latest releases, including @ai-sdk/amazon-bedrock, @ai-sdk/google-vertex, @ai-sdk/mistral, and @ai-sdk/perplexity. - Updated ai package version from 5.0.44 to 5.0.59. - Updated aiCore package version from 1.0.0-alpha.18 to 1.0.1 and adjusted dependencies accordingly. - Ensured compatibility with the latest zod version in multiple packages. |
||
|
|
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 | ||
|
|
027d6ea2b2 | Merge remote-tracking branch 'origin/main' into feat/agents-new | ||
|
|
483b4e090e |
feat(toolUsePlugin): separate provider-defined tools from prompt tool (#10428)
* feat(toolUsePlugin): separate provider-defined tools from prompt tools in context - Enhanced the `createPromptToolUsePlugin` function to distinguish between provider-defined tools and other tools, ensuring only non-provider-defined tools are saved in the context. - Updated the handling of tools in the transformed parameters to retain provider-defined tools while removing others. - Improved error handling in `ToolExecutor` by logging tool and tool use details for better debugging. - Refactored various components to use `NormalToolResponse` instead of `MCPToolResponse`, aligning with the new response structure across multiple message components. * refactor(toolUsePlugin): streamline tool handling in createPromptToolUsePlugin - Updated the `createPromptToolUsePlugin` function to improve type handling for tools, ensuring proper type inference and reducing the use of type assertions. - Enhanced clarity in the separation of provider-defined tools and prompt tools, maintaining functionality while improving code readability. * refactor(ToolExecutor): remove debug logging for tool and tool use - Removed console logging for tool and tool use details in the ToolExecutor class to clean up the code and improve performance. This change enhances the clarity of the code without affecting functionality. |
||
|
|
cfdeb124b9 | Merge branch 'main' of github.com:CherryHQ/cherry-studio into feat/agents-new |