- Updated version to 1.7.0-rc.3 in package.json
- Added new features including support for Silicon provider and AIHubMix
- Consolidated bug fixes related to providers, models, UI, and settings
- Improved SDK integration with upgraded dependencies
* Initial plan
* feat: Add proper Poe API reasoning parameters support for GPT-5 and other models
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
* test: Add comprehensive tests for Poe API reasoning support
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
* fix: Add missing isGPT5SeriesModel import in reasoning.ts
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
* fix: Use correct extra_body format for Poe API reasoning parameters
Per Poe API documentation, custom bot parameters like reasoning_effort
and thinking_budget should be passed directly in extra_body, not as
nested structures.
Changed from:
- reasoning_effort: 'low' -> extra_body: { reasoning_effort: 'low' }
- thinking: { type: 'enabled', budget_tokens: X } -> extra_body: { thinking_budget: X }
- extra_body: { google: { thinking_config: {...} } } -> extra_body: { thinking_budget: X }
Updated tests to match the corrected implementation.
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
* fix: Update reasoning parameters and improve type definitions for GPT-5 support
* fix lint
* docs
* fix(reasoning): handle edge cases for models without token limit configuration
---------
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>
* 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>
* 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
- Bumped @types/react from ^19.0.12 to ^19.2.7
- Bumped @types/react-dom from ^19.0.4 to ^19.2.3
- Updated csstype dependency from ^3.0.2 to ^3.2.2 in yarn.lock
These updates ensure compatibility with the latest React types and improve type definitions.
* fix: add claude-opus-4-5 pattern to THINKING_TOKEN_MAP
Adds missing regex pattern for claude-opus-4-5 models (e.g., claude-opus-4-5-20251101)
to the THINKING_TOKEN_MAP configuration. Without this pattern, the model was not
recognized, causing findTokenLimit() to return undefined and leading to an
AI_InvalidArgumentError when using Google Vertex AI Anthropic provider.
The fix adds the pattern 'claude-opus-4-5.*$': { min: 1024, max: 64_000 } to
match the existing claude-4 thinking token configuration.
Fixes AI_InvalidArgumentError: invalid anthropic provider options caused by
budgetTokens receiving NaN instead of a number.
Signed-off-by: Shuchen Luo (personal linux) <nemo0806@gmail.com>
* refactor: make THINKING_TOKEN_MAP constant private
* fix(reasoning): update claude model token limit regex patterns
- Consolidate claude model regex patterns to be more consistent
- Add comprehensive test cases for various claude model variants
- Ensure case insensitivity and proper handling of edge cases
* fix: format
* feat(models): extend claude model regex patterns to support AWS and GCP formats
Update regex patterns in THINKING_TOKEN_MAP to support additional Claude model ID formats used in AWS Bedrock and GCP Vertex AI
Add comprehensive test cases for new model ID formats and reorganize test suite
* fix: format
---------
Signed-off-by: Shuchen Luo (personal linux) <nemo0806@gmail.com>
Co-authored-by: icarus <eurfelux@gmail.com>
- Updated links in CONTRIBUTING.md and README.md to point to the correct Chinese documentation paths.
- Removed outdated files including the English and Chinese versions of the branching strategy, contributing guide, and test plan documents.
- Cleaned up references to non-existent documentation in the project structure to streamline the contributor experience.
* Initial plan
* fix(aiCore): extract AI SDK standard params from custom params for Gemini
Custom parameters like topK, frequencyPenalty, presencePenalty,
stopSequences, and seed should be passed as top-level streamText()
parameters, not in providerOptions. This fixes the issue where these
parameters were being ignored by the AI SDK's @ai-sdk/google module.
Changes:
- Add extractAiSdkStandardParams function to separate standard params
- Update buildProviderOptions to return both providerOptions and standardParams
- Update buildStreamTextParams to spread standardParams into params object
- Update tests to reflect new return structure
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
* refactor(aiCore): remove extractAiSdkStandardParams function and its tests, streamline parameter extraction logic
* chore: type
---------
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>
* 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
* feat(settings): show OpenAI settings for supported service tier providers
Add support for displaying OpenAI settings when provider supports service tiers.
This includes refactoring the condition check and fixing variable naming consistency.
* fix(settings): set openAI verbosity to undefined by default
* fix(store): bump version to 178 and disable verbosity for groq provider
Add migration to remove verbosity from groq provider and implement provider utility to check verbosity support
Update provider types to include verbosity support flag
* feat(provider): add verbosity option support for providers
Add verbosity parameter support in provider API options settings
* fix(aiCore): check provider support for verbosity before applying
Add provider validation and check for verbosity support to prevent errors when unsupported providers are used with verbosity settings
* feat(settings): add Groq settings group component and translations
add new GroqSettingsGroup component for managing Groq provider settings
update translations for Groq settings in both zh-cn and en-us locales
refactor OpenAISettingsGroup to separate Groq-specific logic
* feat(i18n): add groq settings and verbosity support translations
add translations for groq settings title and verbosity parameter support in multiple languages
* refactor(settings): simplify service tier mode fallback logic
Remove conditional service tier mode fallback and use provider-specific defaults directly
* fix(provider): remove redundant system provider check in verbosity support
* test(provider): add tests for verbosity support detection
* fix(OpenAISettingsGroup): add endpoint_type check for showSummarySetting condition
Add model.endpoint_type check to properly determine when to show summary setting for OpenAI models
* refactor(selector): simplify selector option types and add utility functions
remove undefined and null from selector option types
add utility functions to convert between option values and real values
update groq and openai settings groups to use new utilities
add new translation for "ignore" option
* fix(ApiOptionsSettings): correct checked state for verbosity toggle
* feat(i18n): add "ignore" translation for multiple languages
* refactor(groq): remove unused model prop and related checks
Clean up GroqSettingsGroup component by removing unused model prop and unnecessary service tier checks
refactor(models): improve text delta support check for qwen-mt models
Replace direct qwen-mt model check with regex pattern matching
Add comprehensive test cases for isNotSupportTextDeltaModel
Update all references to use new function name
The previous implementation used `a = preset` inside forEach, which only
reassigns the local variable and doesn't actually update the array element.
Changed to use findIndex + direct array assignment to properly update
the preset in the state.
Fixes#11451🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
* fix: respect enableMaxTokens setting when maxTokens is not configured
When enableMaxTokens is disabled, getMaxTokens() should return undefined
to let the API use its own default value, instead of forcing 4096 tokens.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(modelParameters): handle max tokens when feature is disabled
Check if max tokens feature is enabled before returning undefined to ensure proper API behavior
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: icarus <eurfelux@gmail.com>
* 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 推理中间件以支持内容过滤
* refactor: improve model filtering with todo for robust conversion
* refactor(aiCore): add AiSdkConfig type and update provider config handling
- Introduce new AiSdkConfig type in aiCoreTypes for better type safety
- Update provider factory and config to use AiSdkConfig consistently
- Simplify getAiSdkProviderId return type to string
- Add config validation in ModernAiProvider
* refactor(aiCore): move ai core types to dedicated module
Consolidate AI core type definitions into a dedicated module under aiCore/types. This improves code organization by keeping related types together and removes circular dependencies between modules. The change includes:
- Moving AiSdkConfig to aiCore/types
- Updating all imports to reference the new location
- Removing duplicate type definitions
* refactor(provider): add return type to createAiSdkProvider function
* feat(messages): add filter for error-only messages and their related pairs
Add new filter function to remove assistant messages containing only error blocks along with their associated user messages, identified by askId. This improves conversation quality by cleaning up error-only responses.
* refactor(ConversationService): improve message filtering pipeline readability
Break down complex message filtering chain into clearly labeled steps
Add comments explaining each filtering step's purpose
Maintain same functionality while improving code maintainability
* test(messageUtils): add test cases for message filter utilities
* docs(messageUtils): correct jsdoc for filterUsefulMessages
* refactor(ConversationService): extract message filtering logic into pipeline method
Move message filtering steps into a dedicated static method to improve testability and maintainability. Add comprehensive tests to verify pipeline behavior.
* refactor(ConversationService): add logging and improve message filtering readability
Add logger service to track message pipeline output
Split filterUserRoleStartMessages into separate variable for better debugging
* 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 68bd7eaac5.
* feat(i18n): add "off" translation and remove "performance" tier
Add "off" translation for multiple languages and remove "performance" service tier option from translations
* Apply suggestion from @EurFelux
* docs(types): clarify handling of undefined and null values
Add comments to explain that undefined is treated as default and null as explicitly off in OpenAIVerbosity and OpenAIServiceTier types. Also update type safety for OpenAIServiceTiers record.
* fix(migration): update migration version from 167 to 171 for removed type
* chore: update store version to 172
* fix(migrate): update migration version number from 171 to 172
* fix(i18n): Auto update translations for PR #10964
* refactor(types): improve type safety for verbosity handling
add NotUndefined and NotNull utility types to better handle null/undefined cases
clarify verbosity types in aiCoreTypes and update related utility functions
* refactor(types): replace null with undefined for verbosity values
Standardize on undefined instead of null for verbosity values to align with OpenAI API docs and improve type consistency
* refactor(aiCore): update OpenAI provider options type import and usage
* fix(openai): change summaryText default from null to 'auto'
Update OpenAI settings to use 'auto' as default summaryText value instead of null for consistency with API behavior. Remove 'off' option and add 'concise' option while maintaining type safety.
* refactor(OpenAISettingsGroup): extract service tier options type for better maintainability
* refactor(types): make SystemProviderIdTypeMap internal type
* docs(provider): clarify OpenAIServiceTier behavior for undefined vs null
Explain that undefined and null values for serviceTier should be treated differently since they affect whether the field appears in the response
* refactor(utils): rename utility functions for clarity
Rename `defined` to `toNullIfUndefined` and `notNull` to `toUndefinedIfNull` to better reflect their functionality
* refactor(aiCore): extract service tier logic and improve type safety
Extract service tier validation logic into separate functions for better reusability
Add proper type annotations for provider options
Pass service tier parameter through provider option builders
* refactor(utils): comment out unused utility functions
Keep commented utility functions for potential future use while cleaning up current codebase
* fix(migration): update migration version number from 172 to 177
* docs(aiCoreTypes): clarify parameter passing behavior in OpenAI API
Update comments to consistently use 'undefined' instead of 'null' when describing parameter passing behavior in OpenAI API requests, as they share the same meaning in this context
---------
Co-authored-by: GitHub Action <action@github.com>
* refactor: optimize DatabaseManager and fix libsql crash issues
Major improvements:
- Created DatabaseManager singleton to centralize database connection management
- Auto-initialize database in constructor (no manual initialization needed)
- Removed all manual initialize() and ensureInitialized() calls (47 occurrences)
- Simplified initialization logic (removed retry loops that could cause crashes)
- Removed unused close() and reinitialize() methods
- Reduced code from ~270 lines to 172 lines (-36%)
Key changes:
1. DatabaseManager.ts (new file):
- Singleton pattern with auto-initialization
- State management (INITIALIZING, INITIALIZED, FAILED)
- Windows compatibility fixes (empty file detection, intMode: 'number')
- Simplified waitForInitialization() logic
2. BaseService.ts:
- Removed static initialize() and ensureInitialized() methods
- Simplified database/rawClient getters to use DatabaseManager
3. Service classes (AgentService, SessionService, SessionMessageService):
- Removed all initialize() methods
- Removed all ensureInitialized() calls
- Services now work out of the box
4. Main entry points (index.ts, server.ts):
- Removed explicit database initialization calls
- Database initializes automatically on first access
Benefits:
- Fixes Windows libsql crashes by removing dangerous retry logic
- Simpler API - no need to remember to call initialize()
- Better separation of concerns
- Cleaner codebase with 36% less code
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: wait for database initialization on app startup
Issue: "Database is still initializing" error on startup
Root cause: Synchronous database getter was called before async initialization completed
Solution:
- Explicitly wait for database initialization in main index.ts
- Import DatabaseManager and call getDatabase() to ensure initialization is complete
- This guarantees database is ready before any service methods are called
Changes:
- src/main/index.ts: Added explicit database initialization wait before API server check
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: use static import for getDatabaseManager
- Move import to top of file for better code organization
- Remove unnecessary dynamic import
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: streamline database access in service classes
- Replaced direct database access with asynchronous calls to getDatabase() in various service classes (AgentService, SessionService, SessionMessageService).
- Updated the main index.ts to utilize runAsyncFunction for API server initialization, ensuring proper handling of asynchronous database access.
- Improved code organization and readability by consolidating database access logic.
This change enhances the reliability of database interactions across the application and ensures that services are correctly initialized before use.
* refactor: remove redundant logging in ApiServer initialization
- Removed the logging statement for 'AgentService ready' during server initialization.
- This change streamlines the startup process by eliminating unnecessary log entries.
This update contributes to cleaner logs and improved readability during server startup.
* refactor: change getDatabase method to synchronous return type
- Updated the getDatabase method in DatabaseManager to return a synchronous LibSQLDatabase instance instead of a Promise.
- This change simplifies the database access pattern, aligning with the current initialization logic.
This refactor enhances code clarity and reduces unnecessary asynchronous handling in the database access layer.
* refactor: simplify sessionMessageRepository by removing transaction handling
- Removed transaction handling parameters from message persistence methods in sessionMessageRepository.
- Updated database access to use a direct call to getDatabase() instead of passing a transaction client.
- Streamlined the upsertMessage and persistExchange methods for improved clarity and reduced complexity.
This refactor enhances code readability and simplifies the database interaction logic.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Implement single instance IPC subscription pattern to resolve MaxListenersExceededWarning. Previously, each component using useApiServer would register a separate 'api-server:ready' listener, and React strict mode double rendering would quickly exceed the 10 listener limit.
Changes:
- Add module-level subscription manager with onReadyCallbacks Set
- Ensure only one IPC listener is registered regardless of component count
- Use useRef to maintain stable callback references
- Properly cleanup subscriptions when all components unmount
This maintains existing behavior while keeping listener count constant at 1.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
* 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
* test(knowledge): fix tests for knowledge base form modal refactoring
Update all test files to match the new vertical layout structure with button-based advanced settings toggle. Remove obsolete tests for deleted features.
Changes:
- Rewrite KnowledgeBaseFormModal.test.tsx for new button-toggle structure
- Remove tests for preprocess and rerank features from GeneralSettingsPanel
- Update AdvancedSettingsPanel tests with required props
- Update all snapshots to reflect new component structure
- Format test files according to biome rules
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* test(knowledge): simplify KnowledgeBaseFormModal button tests
Simplify button interaction tests to avoid text matching issues. Focus on testing behavior rather than implementation details.
Changes:
- Simplify advanced settings toggle test
- Simplify footer buttons test to check button count instead of text content
- Remove fragile text-based button selection
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* 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>
* feat: add ChatGPT conversation import feature
Introduces a new import workflow for ChatGPT conversations, including UI components, service logic, and i18n support for English, Simplified Chinese, and Traditional Chinese. Adds an import menu to data settings, a popup for file selection and progress, and a service to parse and store imported conversations as topics and messages.
* fix: ci failure
* refactor: import service and add modular importers
Refactored the import service to support a modular importer architecture. Moved ChatGPT import logic to a dedicated importer class and directory. Updated UI components and i18n descriptions for clarity. Removed unused Redux selector in ImportMenuSettings. This change enables easier addition of new importers in the future.
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix: improve ChatGPT import UX and set model for assistant
Added a loading state and spinner for file selection in the ChatGPT import popup, with new translations for the 'selecting' state in en-us, zh-cn, and zh-tw locales. Also, set the model property for imported assistant messages to display the GPT-5 logo.
---------
Co-authored-by: SuYao <sy20010504@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* feat: add i18n support and local data to emoji picker
- Add emoji-picker-element-data package for offline-first emoji data
- Implement i18n translations for emoji picker UI (de, en, es, fr, ja, pt, ru, zh)
- Switch from CDN to local emoji data to improve performance and reliability
- Add locale mapping to match app language with emoji picker data
- Move emoji-picker-element import to EmojiPicker component for better encapsulation
- Use proper TypeScript types instead of 'any' for type safety
This improves user experience by providing localized emoji picker interface
and eliminating dependency on external CDN, ensuring the picker works offline.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: enable native language emoji search with CLDR data format
Switch from emojibase to CLDR format for emoji-picker-element data to support full multi-language search functionality. Users can now search for emojis in their native language (e.g., German users can search "Herz" for ❤️, Spanish users can search "corazón"). Also improves type safety by using the LanguageVarious type for locale mappings.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* refactor(AgentModal): simplify agent type handling and update default values
- Removed unused agent type options and related logic.
- Updated default agent name from 'Claude Code' to 'Agent'.
- Adjusted padding in button styles and textarea rows for better UI consistency.
- Cleaned up unnecessary imports and code comments for improved readability.
* refactor(AgentSettings): clean up and enhance name setting component
- Removed unused imports and commented-out code in AgentModal and EssentialSettings.
- Updated NameSetting to include an emoji avatar picker for enhanced user experience.
- Simplified the logic for updating the agent's name and avatar.
- Improved overall readability and maintainability of the code.
- Remove 'banner' prop from Alert components in InstallNpxUv
- Set SettingContainer background to 'inherit' in MCP settings
- Fixes the light background color issue in NpxUv interface
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
* 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>
* 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>
* 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
- Added anthropicApiHost configuration for qiniu and longcat providers during state migration.
- Incremented version number in persistedReducer to 176.
- Ensured proper handling of reasoning_effort settings during migration.
* refactor(assistant): change default tool use mode to function and use default settings
Simplify reset logic by using DEFAULT_ASSISTANT_SETTINGS object instead of hardcoded values
* fix(ApiService): safely fallback to prompt tool use for unsupported models
Add check for function calling model support before using tool use mode to prevent errors with unsupported models.
feat(i18n): add input placeholder translations for multiple languages
- Introduced a new placeholder for the input field in various language files, providing guidance on message entry and command selection.
- Updated English, Chinese (Simplified and Traditional), German, Greek, Spanish, French, Japanese, Portuguese, and Russian translations to include the new input placeholder text.
- Adjusted the reference in the AgentSessionInputbar component to use the new translation key for consistency.
* Initial plan
* feat: add verbosity parameter support for GPT-5 models in OpenAIAPIClient
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
* fix: ensure gpt-5-pro always uses 'high' verbosity
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
* refactor: move verbosity configuration to config/models as suggested
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
* refactor: encapsulate verbosity logic in getVerbosity method
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
* feat: add support for verbosity and reasoning options for GPT-5 Pro and GPT-5.1 models
* fix comment
* build: add @ai-sdk/google dependency
Add the @ai-sdk/google package to support Google AI SDK integration
* build: add @ai-sdk/anthropic dependency
* refactor(aiCore): update reasoning params handling for AI providers
- Add type imports for provider options
- Handle 'none' reasoning effort consistently across providers
- Improve type safety by using Pick with provider options
- Standardize disabled reasoning config for all providers
* fix: adjust none effort ratio from 0 to 0.01
Prevent potential division by zero errors by ensuring none effort ratio has a small positive value
* feat(reasoning): add support for GPT-5.1 series models
Handle 'none' reasoning effort for GPT-5.1 models and add model type check
* Update src/renderer/src/aiCore/utils/reasoning.ts
---------
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>
Co-authored-by: icarus <eurfelux@gmail.com>
* build: update @cherrystudio/openai dependency from v6.5.0 to v6.9.0
* refactor(reasoning): replace 'off' with 'none' for reasoning effort option
Update reasoning effort option from 'off' to 'none' across multiple files for consistency
Add support for gpt5_1 model with reasoning effort options
* fix(openai): handle apply_patch_call and apply_patch_call_output in response conversion
Filter and properly handle apply_patch_call and apply_patch_call_output types in OpenAI response conversion. Ensure undefined/null values are handled appropriately and log warnings for missing required fields.
* feat(models): add gpt-5.1 model logo and configuration
* fix(providers): include cherryin in url context provider check
Add SystemProviderIds.cherryin to the list of providers that support URL context to ensure proper functionality
* feat(models): add logo images for gpt-5.1 model variants
* feat(model): add support for GPT-5.1 series models
- Add new model type check for GPT-5.1 series
- Update reasoning effort and verbosity checks to include GPT-5.1
- Add logging to provider options builder
* feat(models): add gpt5_1_codex model support
Add new model type 'gpt5_1_codex' to ThinkModelTypes and configure its reasoning effort levels
Update model type detection logic to handle gpt5_1_codex variant
* chore: update @opeoginni/github-copilot-openai-compatible to version 0.1.21
- Updated package version in package.json and yarn.lock.
- Refactored OpenAIBaseClient to enhance getBaseURL method and improve header management for SDK instances.
* format
Add comprehensive release notes highlighting:
- AI Agent system as the major new feature
- New AI providers support (Hugging Face, Mistral, Perplexity, SophNet)
- Knowledge base enhancements (OpenMinerU, full-text search)
- Image & OCR improvements (Intel OVMS, OpenVINO NPU)
- MCP management interface redesign with dual-column layout
- German language support
- Electron 38.7.0 upgrade and system improvements
- Important bug fixes
- Added `header` prop to display content above the list.
- Introduced `className` prop for additional styling on the container.
- Updated `Sessions` component to utilize `StyledVirtualList` with new props for improved layout and functionality.
* ♻️ 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>
* fix: update Azure OpenAI API version references to v1 in configuration and translations
* fix: support Azure OpenAI API v1 in client compatibility check
* fix: lint/ format
* fix: topic branch incomplete copy - split ID mapping into two passes
Fix the bug where topic branching would not copy all message relationships completely.The issue was that askId mapping lookup happened in the same loop as ID generation, causing later messages' askIds to fail mapping when they referenced messages that hadn't been processed yet.
Solution: Split into two passes:
1. First pass: Generate new IDs for all messages and build complete mapping
2. Second pass: Clone messages and blocks using the complete ID mapping
This ensures all message relationships (especially assistant message askId references)are properly maintained in the new topic.
* fix(notes): 保持 Ctrl+F ‘下一个’在编辑器容器内滚动,避免索引提前回到第一条
- 使用传入的滚动容器计算相对偏移并 target.scrollTo 居中
- 容器不可滚动时回退到 scrollIntoView,兼容其他页面
- 将 target 纳入依赖,确保引用最新容器
受影响文件:
- src/renderer/src/components/ContentSearch.tsx:165
* fix(search): improve notes content search next-scroll behavior
* Update dom.ts
---------
Co-authored-by: Pleasurecruise <3196812536@qq.com>
* fix(message): Incorrect navigation when creating new message with @
Update variable name from newAssistantStub to newAssistantMessageStub for clarity
Add dispatch calls to update message folding state
Remove unused message length tracking effect in MessageGroup
Fixes#10928
* refactor(MessageGroup): remove unused prevMessageLengthRef variable
Updated the sorting logic in getSorter to use the 'numeric' option in localeCompare for all name-based sorts. This ensures that note names containing numbers are sorted in a more natural, human-friendly order.
* feat(models): add MiniMax M2 models to default configuration
* fix(config): update minimax api host and add anthropic host
Update the API endpoint for MiniMax provider and add a new endpoint for Anthropic integration
* feat: add minimax to ANTHROPIC_COMPATIBLE_PROVIDER_IDS
* docs(ProviderSetting): add todo comment for reset button
* fix(store): update minimax provider config in migration 174
Add anthropicApiHost to minimax provider configuration during state migration
* fix(store): revert version and remove unused migration
Remove migration for version 175 and revert persisted reducer version to 174
- Update releaseNotes in electron-builder.yml with comprehensive changelog
- Document inputbar system refactor with scope-based architecture
- Include AI SDK provider integration details
- Add bug fixes and improvements documentation
- Provide bilingual release notes (English/Chinese)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
chore: simplify release notes for v1.7.0-beta.6
- Rewrite release notes to focus on user-facing improvements
- Remove technical jargon and developer-specific details
- Use clear, user-friendly language for features and fixes
- Maintain bilingual support (English/Chinese)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* 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>
* 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>
NewApiPage always show the first image in filteredPaintings. As a
result, the user is unable to select other images. This issue was
introduced in commit 0502ff4.
The Content-Type header was removed from the fetch request when uploading files. This change may allow the server to infer the correct content type or handle uploads more flexibly.
- Add MCPRouter provider and MCP marketplace features
- Improve UI optimization and MCP OAuth callback
- Fix various bugs including Agent allowed_tools inheritance
refactor(DataSettings, MCPSettings, AssistantPresetsPage): clean up imports and enhance UI components
- Removed unused imports and components from DataSettings for better clarity.
- Updated MCPSettings layout by introducing a new Container styled with Scrollbar for improved scrolling.
- Added AssistantsSubscribeUrlSettings component to manage subscription URLs in AssistantPresetsPage, enhancing user interaction.
- Adjusted button styles and layout in AssistantPresetsPage for a more cohesive design.
When creating a Session under an Agent, the Session should inherit the Agent's allowed_tools configuration. Previously, the allowed_tools parameter was missing from the Session creation API call, causing inconsistency between Agent and Session configurations.
Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
- Added a hyperlink to Poe in the AI Web Service Integration list for better accessibility.
- Removed the public beta notice for the Enterprise Edition to streamline the documentation.
- Updated the cost section to include a link to the AGPL-3.0 License for clarity.
Replace empty state text with a visual permission mode display card that shows:
- Permission mode icon with unique colors for each mode (default, plan, acceptEdits, bypassPermissions)
- Permission mode title and description
- Clickable to navigate directly to tooling settings tab
Replace loading text with Ant Design Spin component for better UX.
* ♻️ refactor: remove unused resources/js directory and references
Remove legacy resources/js directory (bridge.js and utils.js) that was left over after minapp.html removal in commit 461458e5e. Also update .oxlintrc.json to remove the unused resources/js/** file pattern.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* ♻️ refactor: remove additional unused files
- Remove duplicate ipService.js (superseded by TypeScript version in src/main/utils/)
- Remove unused components.json (shadcn config with non-existent target directory)
- Remove unused context-menu.tsx component (no imports found)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Fixes#11125
Add placement="right" to sidebar toggle tooltips in ChatNavbar, Navbar,
and Notes HeaderNavbar to prevent tooltips from overlapping with macOS
window control buttons (minimize, maximize, close) in the top-left corner.
This ensures tooltips appear to the right of the toggle buttons rather
than above them, avoiding overlap with native window controls.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
* fix: prevent MCP card description text from overflowing dialog width
Add whitespace-pre-wrap and break-all classes to the MCP server description
text in Agent Settings to ensure long descriptions wrap properly within the
dialog bounds instead of causing layout overflow issues.
Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: display MCP server logo in Agent Settings tooling section
Add logo display support for MCP servers in the Agent Settings tooling
section. When a server has a logoUrl defined, it will now be shown next
to the server name as a 20x20px rounded image, matching the design
pattern used in MCPSettings.
Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* 🐛 fix(ui): truncate long Bash command in tag with popover
Add automatic truncation for Bash commands exceeding 200 characters in the tag display. When truncated, users can hover over the tag to view the full command in a popover.
- Add MAX_TAG_LENGTH constant (200 chars)
- Implement command truncation logic
- Add Popover component for full command display on hover
- Prevent UI overflow issues with long commands
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* ♻️ refactor(ui): reduce MAX_TAG_LENGTH to 100 for smaller screens
Reduce the command truncation threshold from 200 to 100 characters to better support smaller screen sizes and improve readability.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* docs: remove emoji requirement from conventional commits
Update commit message guidelines to use standard Conventional Commit format without emoji prefixes for better compatibility and consistency.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
💄 style(ui): center plugin browser tabs
Center the tab items in the plugin browser component for better visual alignment and improved user experience.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
- Fix OAuth callback server not sending HTTP response, causing browser to hang
- Add internationalization support for OAuth callback page (10 languages)
- Simplify callback page design with clean white background
- Improve user experience with localized success messages
Changes:
- src/main/services/mcp/oauth/callback.ts: Add HTTP response to OAuth callback
- src/renderer/src/i18n/: Add callback page translations for all supported languages
Signed-off-by: charles <kidccc@gmail.com>
* refactor(migrate): consolidate migrations into version 172
Consolidates migrations 162-166 into a single migration 172 to fix data
inconsistencies between release/v1.6.x and v1.7.0-x versions. This
ensures a single, consistent migration path and corrects data deviations
that occurred during version upgrades.
Changes:
- Remove separate migrations 162-166
- Add consolidated migration 172 that includes:
- Mini app additions (ling, huggingchat)
- OCR provider updates (ovocr)
- Agent to preset migration
- Sidebar icon updates (agents -> store)
- LLM provider Anthropic API host configurations
- Assistant preset settings initialization
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(store): update persist version to 172
Update the redux-persist version number from 171 to 172 to match the
consolidated migration version.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(migrate): add missing break statement in switch case
Add missing break statement after 'grok' case to prevent fall-through
to 'cherryin' case. Also add break statement for 'longcat' case.
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* chore: update bun and uv versions
- Update bun from 1.2.17 to 1.3.1
- Update uv from 0.7.13 to 0.9.5
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: update UV installer to support tar.gz format
- Update UV package mappings from .zip to .tar.gz for macOS and Linux
- Add RISCV64 Linux platform support
- Implement dual extraction logic:
- tar.gz extraction for macOS/Linux using tar command
- zip extraction for Windows using StreamZip
- Flatten directory structure during extraction
- Maintain executable permissions on Unix-like systems
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* 🐛 fix: correct error handling in UV installer
Remove ineffective error code 102 return from nested function.
Chmod errors now properly propagate to outer try-catch block.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
- Changed RightContainer from Scrollbar to a standard div for layout adjustments.
- Updated DetailContainer to use Scrollbar for improved scrolling behavior.
- Modified server synchronization logic across multiple providers to include allServers in the results, enhancing server management capabilities.
- Refactored provider configurations to ensure consistency and support for new server data structure.
- Introduced MCPRouter provider with token management and server synchronization functionalities.
- Added MCPRouter logo to settings page for visual representation.
- Updated provider configuration to include MCPRouter details and API interactions.
- Implemented functions for saving, retrieving, and clearing MCPRouter tokens, along with server synchronization logic.
- Updated auto-translation script to allow configurable max concurrent translations and delay via environment variables.
- Added new translations for "discover", "fetch", "marketplaces", "providers", and "servers" across multiple locales (en-us, zh-cn, zh-tw, de-de, el-gr, es-es, fr-fr, ja-jp, pt-pt, ru-ru).
- Improved MCPSettings UI by adjusting layout and adding a new provider settings component for better server management.
- Refactored MCP server list and market list components for improved usability and styling consistency.
Update electron-builder.yml with release notes covering:
- UI framework upgrade with improved performance and UX
- New features: AWS Bedrock API key support, SophNet provider, auto session rename, TopP parameter, and reasoning effort control
- Improvements to UI components, quick panel, painting models, system shutdown handling, and package size optimization
- Bug fixes for provider support, i18n translations, and API issues
* ci(i18n): change auto i18n workflow to run weekly
Update the workflow to run on a weekly schedule instead of on pull request events.
Also simplify the workflow by using yarn for dependency management and create a PR
for changes instead of committing directly to the branch.
* ci(github-actions): improve workflow step names with emojis
Use emojis in step names to enhance readability and visual scanning of workflow logs
* ci(workflow): prevent committing package.json and yarn.lock changes in i18n workflow
Previously, the macOS menu bar was always displayed in English regardless of
system language or in-app language settings. This change enables the menu bar
to dynamically follow the application's language preference.
Key changes:
- Add language change listener to automatically update menu when user switches language
- Refactor AppMenuService with proper subscription management and cleanup
- Add appMenu translations for en-us, zh-cn, and zh-tw locales
- Implement destroy method to prevent memory leaks from config subscriptions
- Convert all menu items (File, Edit, View, Window, Help) to use localized labels
The menu bar now respects the in-app language setting and updates in real-time
when users change their preferences, providing a consistent multilingual experience.
* feat: add Perplexity provider support and update API host formatting
- Introduced `isPerplexityProvider` function to identify Perplexity providers.
- Updated `formatProviderApiHost` to handle Perplexity provider API host formatting.
- Added unit tests for Perplexity provider configuration to ensure correct API host formatting behavior.
* fix: add 'perplexity' to unsupported API version providers list
* refactor(Tabs): extract shared styled components into separate file
Move common styled components (ListItem, ListItemNameContainer, ListItemName, ListItemEditInput) from SessionItem.tsx and Topics.tsx into shared.tsx to improve code reuse and maintainability
* refactor(components): extract ListContainer component for shared tab layouts
Create reusable ListContainer component to standardize layout styling across tabs
Replace manual div containers in Sessions and Topics components with new ListContainer
* refactor(ListItem): convert styled component to Tailwind CSS function component
- Convert ListItem from styled-components to Tailwind CSS function component
- Maintain all original styling and hover/active states
- Use HTMLDivElement props interface for proper TypeScript typing
- Preserve CSS custom properties for theme variables
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(ListItemNameContainer): convert styled component to Tailwind CSS function component
- Convert ListItemNameContainer from styled-components to Tailwind CSS function component
- Simplify layout styles using Tailwind's utility classes
- Use HTMLDivElement props interface for proper TypeScript typing
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(ListItemName): convert styled component to Tailwind CSS function component
- Convert ListItemName from styled-components to Tailwind CSS function component
- Use inline styles for webkit-specific line clamping properties
- Remove complex animations from component definition (can be added via CSS classes)
- Use HTMLDivElement props interface for proper TypeScript typing
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(ListItemEditInput): convert styled component to Tailwind CSS function component
- Convert ListItemEditInput from styled-components to Tailwind CSS function component
- Use proper InputHTMLAttributes type for input elements
- Remove styled-components import as no longer needed
- Maintain all original styling using Tailwind utility classes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(components): improve type safety and class ordering in shared components
- Replace HTMLAttributes with more specific ComponentProps types
- Reorder class names for better readability and consistency
* refactor(components): update styling and class handling in list items
- Replace deprecated classNames utility with cn from @heroui/react
- Consolidate style properties into className using cn
- Improve CSS selector syntax for better specificity
- Standardize padding and border radius values
* Revert "refactor(ListItemName): convert styled component to Tailwind CSS function component"
This reverts commit 196136068d.
* style(shared): increase font size and remove redundant padding
The font size was increased from 13px to 14px for better readability. Redundant padding in ListItemEditInput was removed to maintain consistent styling.
* refactor(AddButton): simplify component by removing FC type and inline props
Remove unnecessary FC type declaration and inline the Props interface with ButtonProps. Also clean up prop spreading by moving it to the end of the component.
* style(Topics): remove redundant className and add overflow styles
* refactor(components): extract MenuButton to shared components
Move MenuButton implementation from individual components to shared module to reduce code duplication and improve maintainability
* refactor(PendingIndicator): convert styled component to Tailwind CSS function component
- Convert PendingIndicator from styled-components to Tailwind CSS function component
- Use ComponentPropsWithoutRef<'div'> for consistent TypeScript typing
- Replace styled-components attrs with Tailwind animate-pulse class
- Use CSS custom properties for pulse-size variable
- Remove styled-components import as no longer needed
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(components): replace styled indicators with shared StatusIndicator
Consolidate PendingIndicator and FulfilledIndicator into a single StatusIndicator component with variant support
* style(shared.tsx): adjust border styles for singlealone active state
* refactor: use type-only imports for react props
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat: add PowerMonitorService for system shutdown handling
- Add PowerMonitorService to monitor system shutdown events
- Use @paymoapp/electron-shutdown-handler for Windows platform
- Use Electron's powerMonitor for macOS and Linux platforms
- Support registering multiple shutdown handlers via dependency injection
- Register shutdown handlers in ipc.ts to disable auto-update and save data
🤖 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>
* feat: integrate version tracking in app initialization
- Added versionService to record the current version during app startup.
- This change prepares for upcoming data refactoring in version 2.
* fix: lint from other PRs & format
* feat: enhance version tracking with meaningful change detection
- Updated VersionService to check for changes in version, OS, environment, packaged status, and install mode before recording a new entry.
- Improved logging to reflect whether version information has changed or remained the same.
* feat: amazon bedrock request use bedrock api key
* feat: ai-core/provider support bedrock api key
* refactor: extract AWS Bedrock auth type and remove redundant state
* feat: add bedrock reasoning support
Add AWS Bedrock-specific reasoning parameter handling to support Extended Thinking feature for Claude models via Bedrock API.
Changes:
- Add `buildBedrockProviderOptions` function in options.ts to handle Bedrock-specific provider options
- Add `getBedrockReasoningParams` function in reasoning.ts to generate reasoning config with budget tokens
- Register 'bedrock' case in provider options switch to route to Bedrock-specific builder
- Reuse `getAnthropicThinkingBudget` helper for consistent token budget calculation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: add migration for Bedrock auth type and API key fields
* refactor: replace any type with BedrockRuntimeClientConfig in AWS Bedrock client
* fix: bug fix
* fix: lint error
* fix: bedrock reasoning
* chore: bump persisted reducer version to 171
* Update src/renderer/src/store/migrate.ts
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: icarus <eurfelux@gmail.com>
* feat(QuickPanel): add hidden property to list items
Add support for hiding QuickPanel items by introducing a hidden property. This allows conditional visibility of items like the knowledge base button based on application state.
* docs(types): clarify settings field comment in Assistant type
* refactor:Unify the naming of configuration fields in thinking, change to using underscore style.
* fix(i18n): Auto update translations for PR #11106
* chore: lint
* fix: typecheck
---------
Co-authored-by: GitHub Action <action@github.com>
* 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>
* fix: update EmbeddingsFactory to use net.fetch and refactor KnowledgeService to use ModernAiProvider
* fix: remove deprecated @langchain/community dependency from package.json
* fix: add @langchain/community dependency to package.json and update yarn.lock
- Introduced a new AddAssistantOrAgentPopup component for selecting between assistant and agent options.
- Updated English, Simplified Chinese, and Traditional Chinese translations to include descriptions and titles for assistant and agent options.
- Refactored UnifiedAddButton to utilize the new popup for adding assistants or agents.
* fix: use dropdown instead of chip filter
* fix: add padding to avoid scroll bar overlap
* fix: set max card grid col to 2
* fix: minor ui tweak for plugin card
* fix: remove redundant args
* fix(i18n): Auto update translations for PR #11085
* fix: cleanup comments
---------
Co-authored-by: GitHub Action <action@github.com>
Adds cancellation of the debounced save when the active file path is updated after moving a file or folder. This prevents saving to the old path and ensures lastFilePathRef is updated accordingly.
- Modified the names of the issue templates for bug reports, feature requests, and other questions to remove the "(English)" suffix, simplifying the titles for better clarity.
- Introduced an "Enterprise" section in the i18n files for English, Simplified Chinese, and Traditional Chinese.
- Removed the "License" section from the AboutSettings component, replacing it with a link to the enterprise website.
- Updated icons in the AboutSettings component to reflect the new structure.
- Added new features including an enhanced tool permission system, plugin management, and support for various AI models.
- Improved UI elements and agent creation processes.
- Fixed multiple bugs related to session models, assistant activation, and various API integrations.
- Updated version in package.json to v1.7.0-beta.3.
* 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>
* feat: add SkillTool component and integrate into agent tools
- Introduced SkillTool component for rendering skill-related functionality.
- Updated MessageAgentTools to include SkillTool in the tool renderers.
- Enhanced MessageTool to recognize 'Skill' as a valid agent tool type.
- Modified handleUserMessage to conditionally handle text blocks based on skill inclusion.
- Added SkillToolInput and SkillToolOutput types for better type safety.
* feat: implement command tag filtering in message handling
- Added filterCommandTags function to remove command-* tags from text content, ensuring internal command messages do not appear in the user-facing UI.
- Updated handleUserMessage to utilize the new filtering logic, enhancing the handling of text blocks and improving user experience by preventing unwanted command messages from being displayed.
* refactor: rename tool prefix constants for clarity
- Updated variable names for tool prefixes in MessageTool and SkillTool components to enhance code readability.
- Changed `prefix` to `builtinToolsPrefix` and `agentPrefix` to `agentMcpToolsPrefix` for better understanding of their purpose.
* feat: add confirmation modal for activating protocol-installed MCP
* fix: sync i18n
* fix(i18n): Auto update translations for PR #11070
* chore: verify ci is working
* Revert "chore: verify ci is working"
This reverts commit a2434a397d.
---------
Co-authored-by: GitHub Action <action@github.com>
* refactor: remove unused SWITCH_ASSISTANT event and related code
Clean up unused event and associated listener in HomePage component
* feat(agents): improve agent handling and state management
- Return result from useUpdateAgent hook
- Update useActiveTopic to handle null assistantId
- Add state management for active agent and topic in Tabs
- Implement afterSubmit callback in AgentModal
- Refactor agent press handling in AssistantsTab
- Clean up HomePage state management logic
- Add afterCreate callback in UnifiedAddButton
* refactor(agent): update agent and session update functions to return entities
Modify update functions in useUpdateAgent and useUpdateSession hooks to return updated entities.
Update related components to handle the new return types and adjust type definitions accordingly.
* refactor(hooks): simplify active topic hook by using useAssistant
* refactor(agent): consolidate agent update types and functions
Move UpdateAgentBaseOptions and related function types from hooks/agents/types.ts to types/agent.ts
Update components to use new UpdateAgentFunctionUnion type
Simplify component props by removing redundant type definitions
* refactor(agent): update type for plugin settings update function
* refactor(AgentSettings): simplify tooling settings type definitions
Remove unused hooks and use direct type imports instead of ReturnType
* fix(ToolPermissionRequestCard): simplify button rendering by removing suggestion handling
* ✨ feat: add CachedPluginsDataSchema for plugin cache file
- Add Zod schema for .claude/plugins.json cache file format
- Schema includes version, lastUpdated timestamp, and plugins array
- Reuses existing InstalledPluginSchema for type safety
- Cache will store metadata for all installed plugins
* ✨ feat: add cache management methods to PluginService
- Add readCacheFile() to read .claude/plugins.json
- Add writeCacheFile() for atomic cache writes (temp + rename)
- Add rebuildCache() to scan filesystem and rebuild cache
- Add listInstalledFromCache() to load plugins from cache with fallback
- Add updateCache() helper for transactional cache updates
- All methods handle missing/corrupt cache gracefully
- Cache auto-regenerates from filesystem if needed
* ✨ feat: integrate cache loading in AgentService.getAgent()
- Add installed_plugins field to GetAgentResponseSchema
- Load plugins from cache via PluginService.listInstalledFromCache()
- Gracefully handle errors by returning empty array
- Use loggerService for error logging
* 🐛 fix: break circular dependency causing infinite loop in cache methods
- Change cache method signatures from agentId to workdir parameter
- Update listInstalledFromCache(workdir) to accept workdir directly
- Update rebuildCache(workdir) to accept workdir directly
- Update updateCache(workdir, updater) to accept workdir directly
- AgentService.getAgent() now passes accessible_paths[0] to cache methods
- Removes AgentService.getAgent() calls from PluginService methods
- Fixes infinite recursion bug where methods called each other endlessly
Breaking the circular dependency:
BEFORE: AgentService.getAgent() → PluginService.listInstalledFromCache(id)
→ AgentService.getAgent(id) [INFINITE LOOP]
AFTER: AgentService.getAgent() → PluginService.listInstalledFromCache(workdir)
[NO MORE RECURSION]
* 🐛 fix: update listInstalled() to use agent.installed_plugins
- Change from agent.configuration.installed_plugins (old DB location)
- To agent.installed_plugins (new top-level field from cache)
- Simplify validation logic to use existing plugin structure
- Fixes UI not showing installed plugins correctly
This was causing the UI to show empty plugin lists even though plugins
were correctly loaded in the cache by AgentService.getAgent().
* ♻️ refactor: remove unused updateCache helper
* ♻️ refactor: centralize plugin directory helpers
* feat: Implement Plugin Management System
- Added PluginCacheStore for managing plugin metadata and caching.
- Introduced PluginInstaller for handling installation and uninstallation of plugins.
- Created PluginService to manage plugin lifecycle, including installation, uninstallation, and listing of available plugins.
- Enhanced AgentService to integrate with PluginService for loading installed plugins.
- Implemented validation and sanitization for plugin file names and paths to prevent security issues.
- Added support for skills as a new plugin type, including installation and management.
- Introduced caching mechanism for available plugins to improve performance.
* ♻️ refactor: simplify PluginInstaller and PluginService by removing agent dependency and updating plugin handling
feat(useAppInit): implement automatic update checks with interval support
- Added a function to check for updates, which is called initially and set to run every 6 hours if the app is packaged and auto-update is enabled.
- Refactored the initial update check to utilize the new function for better code organization and clarity.
Updated useUnifiedGrouping to sort grouped items by the tags order saved in the Redux store, falling back to untagged first. This improves consistency with user-defined tag ordering.
* fix(i18n): standardize "max" translation to indicate unlimited
* feat(SettingsTab): add current context
* feat(settings): show proper "max" label for context count
* fix(settings): simplify contextCount value expression
* feat(settings): make context count editable with number input
feat(ReadTool): add function to remove <system-reminder> tags from output text
- Introduced `removeSystemReminderTags` function to clean output by removing <system-reminder> tags and their content.
- Updated output processing logic to apply this function for both array and string output types, ensuring consistent formatting.
* refactor(agent): move permission mode types and constants to config
Move PermissionModeCard type definition to types/agent.ts and relocate permissionModeCards constant from constants/permissionModes.ts to config/agent.ts for better organization and maintainability
* refactor(AgentSettings): simplify state management in ToolingSettings
remove redundant state for selectedMode and derive it from configuration
consolidate permission mode constants import path
* docs(AgentSettings): add jsdoc for computeModeDefaults function
* refactor(AgentSettings): simplify tooling state management with useMemo
remove redundant state for autoToolIds and compute it directly using useMemo
* refactor(AgentSettings): simplify tool approval state management
- Replace useState with useMemo for approvedToolIds to prevent unnecessary state updates
- Remove redundant state transitions and simplify toggle logic
- Ensure consistent tool filtering and merging with defaults
* refactor(AgentSettings): replace useState with useMemo for configuration state
Optimize performance by memoizing agent configuration state to prevent unnecessary re-renders
* perf(AgentSettings): optimize permission_mode computation with useMemo
Prevent unnecessary recalculations of permission_mode by memoizing the value
* refactor(AgentSettings): simplify MCP selection logic and remove unused imports
Remove useEffect for MCP state synchronization and directly use memoized value
Clean up unused imports and simplify toggle handler logic
* refactor: remove unused useAgentClient hook from ToolingSettings
* 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>
* ⬆️ 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>
* ✨ 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>
* fix: allow new-topic shortcut to create agent sessions
* revert: restore ProxyManager.ts
* fix: make agent session shortcut sidebar-independent
* refactor: centralize default session creation
* feat: add new session button to agent inputbar
* fix: encapsulate agent session creation state
* refactor: remove redundant useMemo in useCreateDefaultSession
The useMemo wrapper around the return object was unnecessary because:
- createDefaultSession is already memoized via useCallback
- creatingSession is a primitive boolean that doesn't need memoization
- The object gets recreated on every creatingSession change anyway
This simplifies the code and removes unnecessary overhead.
---------
Co-authored-by: wangdenghui <wangdenghui@xiaomi.com>
* Initial plan
* Fix Qwen3 thinking mode control for Ollama by using reasoning_effort instead of qwenThinkMode
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
* Refactor: Move Qwen thinking mode control from legacy to aiCore middleware
- Revert changes to legacy OpenAIApiClient.ts
- Create new qwenThinkingMiddleware for handling /think and /no_think suffixes
- Update AiSdkMiddlewareBuilder to add assistant field and apply Qwen middleware
- Middleware automatically handles Qwen models on Ollama, LM Studio, and NVIDIA providers
- This follows the modern aiCore architecture instead of deprecated legacy approach
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
* Fix: Explicitly pass assistant field to buildAiSdkMiddlewares
Ensure that the assistant field from ModernAiProviderConfig is explicitly passed
to buildAiSdkMiddlewares so that Qwen thinking middleware can access
assistant.settings.reasoning_effort correctly.
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
* Fix: Remove unnecessary whitespace in processPostsuffixQwen3Model tests
* Refactor: Simplify user message suffix handling in qwenThinkingMiddleware
* Refactor: Remove processPostsuffixQwen3Model tests to streamline ModelMessageService tests
* refactor: remove logger and debug statement from qwenThinkingMiddleware
---------
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>
* fix: align and unify LocalBackupManager footer layout
- Use Space component to wrap footer buttons, consistent with S3BackupManager
- Optimize delete button i18n text by using count parameter instead of hardcoded concatenation
* fix: fix the i18n issue in the delete button text
refactor(sidebar): replace 'agents' with 'store' in sidebar icons and labels
Update sidebar icon mapping and translation keys to use 'store' instead of 'agents' for consistency with the application's terminology. The change includes both the label definitions and the icon component mapping.
* feat: add isClaude45ReasoningModel function and update getTopP logic
* fix: update getTopP logic to correctly handle Claude45 model support
* fix: update getTemperature and getTopP logic to handle Claude45 model conditions
* fix: update getTemperature logic to correctly handle Claude45 model conditions
fix: refine isClaude45ReasoningModel regex pattern for better matching
* fix: simplify navigation button auto-hide logic
Remove complex state management (isNearButtons, resetHideTimer) and rely directly
on isInTriggerArea to control button visibility. This fixes the issue where buttons
don't properly auto-hide by using mouse position detection instead of fragile state tracking.
- Simplify showNavigation to just show and clear timers
- Remove resetHideTimer function and use showNavigation directly
- Simplify handleNavigationMouseLeave to always schedule hide after 500ms
- Update all button handlers to call showNavigation() instead of resetHideTimer()
- Rely on mouse enter/leave events to control visibility state
* refactor(ChatNavigation): replace native setTimeout with custom useTimer hook
Use custom useTimer hook for better timer management and cleanup
---------
Co-authored-by: icarus <eurfelux@gmail.com>
* refactor(types): add InputBarToolType and update related types
- Define InputBarToolType union type in chat types
- Update ToolOrder and InputToolsState to use InputBarToolType
- Modify InputbarTools component to use new type for tool keys
* refactor(assistants): use DEFAULT_ASSISTANT_SETTINGS constant for default settings
* fix(assistants): ensure default settings for presets in migration
Add default settings for assistant presets during migration if they are missing, including toolUseMode
* fix(aiCore): add minimax-m2 to reasoning model check and correct comment
* feat(models): add minimax-m2 to function calling models list
* feat(models): add isMiniMaxReasoningModel helper function
Add helper function to check for MiniMax reasoning models and update isReasoningModel to use it
* ci(github): disable package manager cache for node setup
* refactor(i18n): translate sync script comments to english
Update all Chinese comments and log messages in sync-i18n.ts to English for better international collaboration
* style(scripts): format error message string in sync-i18n.ts
* docs: update PR template and README with feature PR restrictions
Add temporary hold notice for Redux/IndexedDB feature PRs in both pull request template and README
Fix whitespace and formatting inconsistencies in README
* docs: update contributing guidelines with temporary PR restrictions
Add important notice about temporary restrictions on data-changing feature PRs
Clarify acceptable contribution types during v2.0.0 development phase
* docs: remove warning about feature PR restrictions
The warning about temporary restrictions on feature PRs involving Redux or IndexedDB changes has been removed as it is no longer relevant
* docs: remove core developer membership section from contributing guides
* fix: create or update assistant causing blank screen
* fix: remove redundant type annotation
* fix: improve logging
* fix: remove redundant check
* fix(migration): move presets initialization to migration 166
The initialization of assistants.presets was incorrectly placed in migration 164. Move it to a new migration 166 to ensure proper state initialization after versions 1.6.5 and 1.7.0-beta.2.
---------
Co-authored-by: icarus <eurfelux@gmail.com>
* fix: azure gpt-image-1 and openroute gemini-image
* feat: update encoding format handling for embeddings based on model type
* fix: normalize model ID check for Azure OpenAI GPT-Image-1-Mini
* feat: enhance regex for gemini-2.5-flash-image in image enhancement models
* feat: 支持处理 base64 格式的图片 URL 在消息转换中
* feat: 更新消息转换函数以支持图像增强模型的特殊处理
* fix: update model handling in AzureOpenAI and Embeddings classes
* fix: update OpenAI package version to 6.5.0
* fix: remove outdated OpenAI package patch for version 6.4.0
* fix: remove outdated OpenAI package entry from yarn.lock
* feat(miniapp): add HuggingChat mini app
- Add HuggingChat to default mini apps list
- Update HuggingChat SVG icon with official design
* chore(migration): add migration for HuggingChat mini app
- Add migration version 165 to add HuggingChat to existing users
- Update store version from 163 to 165
* fix(migrate): log error during mini app migration
2025-10-25 10:24:37 +08:00
1161 changed files with 45366 additions and 17559 deletions
1. Consider creating this PR as draft: https://github.com/CherryHQ/cherry-studio/blob/main/CONTRIBUTING.md
-->
<!--
⚠️ Important: Redux/IndexedDB Data-Changing Feature PRs Temporarily On Hold ⚠️
Please note: For our current development cycle, we are not accepting feature Pull Requests that introduce changes to Redux data models or IndexedDB schemas.
While we value your contributions, PRs of this nature will be blocked without merge. We welcome all other contributions (bug fixes, perf enhancements, docs, etc.). Thank you!
Once version 2.0.0 is released, we will resume reviewing feature PRs.
index 461e9a2ba246778261108a682762ffcf26f7224e..44bd667d9f591969d36a105ba5eb8b478c738dd8 100644
index bf429a344b7d59f70aead16b639f949b07688a81..f77d50cc5d3fb04292cb3ac7fa7085d02dcc628f 100755
--- a/sdk.mjs
+++ b/sdk.mjs
@@ -6215,7 +6215,7 @@ function createAbortController(maxListeners = DEFAULT_MAX_LISTENERS) {
@@ -6250,7 +6250,7 @@ function createAbortController(maxListeners = DEFAULT_MAX_LISTENERS) {
}
// ../src/transport/ProcessTransport.ts
-import { spawn } from "child_process";
+import { fork } from "child_process";
import { createInterface } from "readline";
// ../src/utils/fsOperations.ts
@@ -6473,14 +6473,11 @@ class ProcessTransport {
@@ -6619,18 +6619,11 @@ class ProcessTransport {
const errorMessage = isNativeBinary(pathToClaudeCodeExecutable) ? `Claude Code native binary not found at ${pathToClaudeCodeExecutable}. Please ensure Claude Code is installed via native installer or specify a valid path with options.pathToClaudeCodeExecutable.` : `Claude Code executable not found at ${pathToClaudeCodeExecutable}. Is options.pathToClaudeCodeExecutable set?`;
const caller = /* @__PURE__ */ new require_utils_async_caller.AsyncCaller({});
async function getEncoding(encoding) {
- if (!(encoding in cache)) cache[encoding] = caller.fetch(`https://tiktoken.pages.dev/js/${encoding}.json`).then((res) => res.json()).then((data) => new js_tiktoken_lite.Tiktoken(data)).catch((e) => {
index 641acca03cb92f04a6fa5c9c31f1880ce635572e..707389970ad957aa0ff20ef37fa8dd2875be737c 100644
--- a/dist/utils/tiktoken.js
+++ b/dist/utils/tiktoken.js
@@ -1,6 +1,5 @@
import { __export } from "../_virtual/rolldown_runtime.js";
import { AsyncCaller } from "./async_caller.js";
-import { Tiktoken, getEncodingNameForModel } from "js-tiktoken/lite";
//#region src/utils/tiktoken.ts
var tiktoken_exports = {};
@@ -11,14 +10,10 @@ __export(tiktoken_exports, {
const cache = {};
const caller = /* @__PURE__ */ new AsyncCaller({});
async function getEncoding(encoding) {
- if (!(encoding in cache)) cache[encoding] = caller.fetch(`https://tiktoken.pages.dev/js/${encoding}.json`).then((res) => res.json()).then((data) => new Tiktoken(data)).catch((e) => {
index 433e2efc9cef156ff5444f0c4520362ed2ef9ea7..0167441bf928a92f59b5dbe70b2317a74dda74c9 100644
--- a/scheme.json
+++ b/scheme.json
@@ -1825,6 +1825,20 @@
"string"
]
},
+ "excludeReBuildModules": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The modules to exclude from the rebuild."
+ },
"executableArgs": {
"anyOf": [
{
@@ -1975,6 +1989,13 @@
],
"description": "The mime types in addition to specified in the file associations. Use it if you don't want to register a new mime type, but reuse existing."
},
+ "minimumSystemVersion": {
+ "description": "The minimum os kernel version required to install the application.",
+ "type": [
+ "null",
+ "string"
+ ]
+ },
"packageCategory": {
"description": "backward compatibility + to allow specify fpm-only category for all possible fpm targets in one place",
"type": [
@@ -2327,6 +2348,13 @@
"MacConfiguration": {
"additionalProperties": false,
"properties": {
+ "LSMinimumSystemVersion": {
+ "description": "The minimum version of macOS required for the app to run. Corresponds to `LSMinimumSystemVersion`.",
+ "type": [
+ "null",
+ "string"
+ ]
+ },
"additionalArguments": {
"anyOf": [
{
@@ -2527,6 +2555,20 @@
"string"
]
},
+ "excludeReBuildModules": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The modules to exclude from the rebuild."
+ },
"executableName": {
"description": "The executable name. Defaults to `productName`.",
"type": [
@@ -2737,7 +2779,7 @@
"type": "boolean"
},
"minimumSystemVersion": {
- "description": "The minimum version of macOS required for the app to run. Corresponds to `LSMinimumSystemVersion`.",
+ "description": "The minimum os kernel version required to install the application.",
"type": [
"null",
"string"
@@ -2959,6 +3001,13 @@
"MasConfiguration": {
"additionalProperties": false,
"properties": {
+ "LSMinimumSystemVersion": {
+ "description": "The minimum version of macOS required for the app to run. Corresponds to `LSMinimumSystemVersion`.",
+ "type": [
+ "null",
+ "string"
+ ]
+ },
"additionalArguments": {
"anyOf": [
{
@@ -3159,6 +3208,20 @@
"string"
]
},
+ "excludeReBuildModules": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The modules to exclude from the rebuild."
+ },
"executableName": {
"description": "The executable name. Defaults to `productName`.",
"type": [
@@ -3369,7 +3432,7 @@
"type": "boolean"
},
"minimumSystemVersion": {
- "description": "The minimum version of macOS required for the app to run. Corresponds to `LSMinimumSystemVersion`.",
+ "description": "The minimum os kernel version required to install the application.",
"type": [
"null",
"string"
@@ -6381,6 +6444,20 @@
"string"
]
},
+ "excludeReBuildModules": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The modules to exclude from the rebuild."
+ },
"executableName": {
"description": "The executable name. Defaults to `productName`.",
"type": [
@@ -6507,6 +6584,13 @@
"string"
]
},
+ "minimumSystemVersion": {
+ "description": "The minimum os kernel version required to install the application.",
+ "type": [
+ "null",
+ "string"
+ ]
+ },
"protocols": {
"anyOf": [
{
@@ -7153,6 +7237,20 @@
"string"
]
},
+ "excludeReBuildModules": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The modules to exclude from the rebuild."
+ },
"executableName": {
"description": "The executable name. Defaults to `productName`.",
"type": [
@@ -7376,6 +7474,13 @@
],
"description": "MAS (Mac Application Store) development options (`mas-dev` target)."
},
+ "minimumSystemVersion": {
+ "description": "The minimum os kernel version required to install the application.",
@@ -7,11 +7,12 @@ This file provides guidance to AI coding assistants when working with code in th
- **Keep it clear**: Write code that is easy to read, maintain, and explain.
- **Match the house style**: Reuse existing patterns, naming, and conventions.
- **Search smart**: Prefer `ast-grep` for semantic queries; fall back to `rg`/`grep` when needed.
- **Build with HeroUI**: Use HeroUI for every new UI component; never add `antd` or `styled-components`.
- **Log centrally**: Route all logging through `loggerService` with the right context—no `console.log`.
- **Research via subagent**: Lean on `subagent` for external docs, APIs, news, and references.
- **Seek review**: Ask a human developer to review substantial changes before merging.
- **Commit in rhythm**: Keep commits small, conventional, and emoji-tagged.
- **Always propose before executing**: Before making any changes, clearly explain your planned approach and wait for explicit user approval to ensure alignment and prevent unwanted modifications.
- **Lint, test, and format before completion**: Coding tasks are only complete after running `yarn lint`, `yarn test`, and `yarn format` successfully.
- **Follow PR template**: When submitting pull requests, follow the template in `.github/pull_request_template.md` to ensure complete context and documentation.
## Development Commands
@@ -40,7 +41,6 @@ This file provides guidance to AI coding assistants when working with code in th
- **Services** (`src/main/services/`): MCPService, KnowledgeService, WindowService, etc.
- **Build System**: Electron-Vite with experimental rolldown-vite, yarn workspaces.
- **State Management**: Redux Toolkit (`src/renderer/src/store/`) for predictable state.
- **UI Components**: HeroUI (`@heroui/*`) for all new UI elements.
@@ -32,7 +32,7 @@ To help you get familiar with the codebase, we recommend tackling issues tagged
### Testing
Features without tests are considered non-existent. To ensure code is truly effective, relevant processes should be covered by unit tests and functional tests. Therefore, when considering contributions, please also consider testability. All tests can be run locally without dependency on CI. Please refer to the "Testing" section in the [Developer Guide](docs/dev.md).
Features without tests are considered non-existent. To ensure code is truly effective, relevant processes should be covered by unit tests and functional tests. Therefore, when considering contributions, please also consider testability. All tests can be run locally without dependency on CI. Please refer to the "Testing" section in the [Developer Guide](docs/zh/guides/development.md).
### Automated Testing for Pull Requests
@@ -60,12 +60,33 @@ Maintainers are here to help you implement your use case within a reasonable tim
### Participating in the Test Plan
The Test Plan aims to provide users with a more stable application experience and faster iteration speed. For details, please refer to the [Test Plan](docs/testplan-en.md).
The Test Plan aims to provide users with a more stable application experience and faster iteration speed. For details, please refer to the [Test Plan](docs/en/guides/test-plan.md).
### Other Suggestions
- **Contact Developers**: Before submitting a PR, you can contact the developers first to discuss or get help.
- **Become a Core Developer**: If you contribute to the project consistently, congratulations, you can become a core developer and gain project membership status. Please check our [Membership Guide](https://github.com/CherryHQ/community/blob/main/docs/membership.en.md).
## Important Contribution Guidelines & Focus Areas
Please review the following critical information before submitting your Pull Request:
### Temporary Restriction on Data-Changing Feature PRs 🚫
**Currently, we are NOT accepting feature Pull Requests that introduce changes to our Redux data models or IndexedDB schemas.**
Our core team is currently focused on significant architectural updates that involve these data structures. To ensure stability and focus during this period, contributions of this nature will be temporarily managed internally.
***PRs that require changes to Redux state shape or IndexedDB schemas will be closed.**
***This restriction is temporary and will be lifted with the release of `v2.0.0`.** You can track the progress of `v2.0.0` and its related discussions on issue [#10162](https://github.com/CherryHQ/cherry-studio/pull/10162).
We highly encourage contributions for:
* Bug fixes 🐞
* Performance improvements 🚀
* Documentation updates 📚
* Features that **do not** alter Redux data models or IndexedDB schemas (e.g., UI enhancements, new components, minor refactors). ✨
We appreciate your understanding and continued support during this important development phase. Thank you!
❤️ Like Cherry Studio? Give it a star 🌟 or [Sponsor](docs/sponsor.md) to support the development!
❤️ Like Cherry Studio? Give it a star 🌟 or [Sponsor](docs/zh/guides/sponsor.md) to support the development!
# 🌠 Screenshot
@@ -82,7 +82,7 @@ Cherry Studio is a desktop client that supports multiple LLM providers, availabl
1.**Diverse LLM Provider Support**:
- ☁️ Major LLM Cloud Services: OpenAI, Gemini, Anthropic, and more
- 🔗 AI Web Service Integration: Claude, Perplexity, Poe, and others
- 🔗 AI Web Service Integration: Claude, Perplexity, [Poe](https://poe.com/), and others
- 💻 Local Model Support with Ollama, LM Studio
2.**AI Assistants & Conversations**:
@@ -175,7 +175,7 @@ We welcome contributions to Cherry Studio! Here are some ways you can contribute
6.**Community Engagement**: Join discussions and help users.
7.**Promote Usage**: Spread the word about Cherry Studio.
Refer to the [Branching Strategy](docs/branching-strategy-en.md) for contribution guidelines
Refer to the [Branching Strategy](docs/en/guides/branching-strategy.md) for contribution guidelines
## Getting Started
@@ -238,20 +238,16 @@ The Enterprise Edition addresses core challenges in team collaboration by centra
## ✨ Online Demo
> 🚧 **Public Beta Notice**
>
> The Enterprise Edition is currently in its early public beta stage, and we are actively iterating and optimizing its features. We are aware that it may not be perfectly stable yet. If you encounter any issues or have valuable suggestions during your trial, we would be very grateful if you could contact us via email to provide feedback.
**🔗 [Cherry Studio Enterprise](https://www.cherry-ai.com/enterprise)**
## Version Comparison
| Feature | Community Edition | Enterprise Edition |
@@ -262,8 +258,12 @@ We believe the Enterprise Edition will become your team's AI productivity engine
# 🔗 Related Projects
- [new-api](https://github.com/QuantumNous/new-api): The next-generation LLM gateway and AI asset management system supports multiple languages.
- [one-api](https://github.com/songquanpeng/one-api): LLM API management and distribution system supporting mainstream models like OpenAI, Azure, and Anthropic. Features a unified API interface, suitable for key management and secondary distribution.
- [Poe](https://poe.com/): Poe gives you access to the best AI, all in one place. Explore GPT-5, Claude Opus 4.1, DeepSeek-R1, Veo 3, ElevenLabs, and millions of others.
- [ublacklist](https://github.com/iorate/ublacklist): Blocks specific sites from appearing in Google search results
@@ -11,13 +11,15 @@ The Test Plan is divided into the RC channel and the Beta channel, with the foll
Users can enable the "Test Plan" and select the version channel in the software's `Settings` > `About`. Please note that the versions in the "Test Plan" cannot guarantee data consistency, so be sure to back up your data before using them.
After enabling the RC channel or Beta channel, if a stable version is released, users will still be upgraded to the stable version.
Users are welcome to submit issues or provide feedback through other channels for any bugs encountered during testing. Your feedback is very important to us.
## Developer Guide
### Participating in the Test Plan
Developers should submit `PRs` according to the [Contributor Guide](../CONTRIBUTING.md) (and ensure the target branch is `main`). The repository maintainers will evaluate whether the `PR` should be included in the Test Plan based on factors such as the impact of the feature on the application, its importance, and whether broader testing is needed.
Developers should submit `PRs` according to the [Contributor Guide](../../CONTRIBUTING.md) (and ensure the target branch is `main`). The repository maintainers will evaluate whether the `PR` should be included in the Test Plan based on factors such as the impact of the feature on the application, its importance, and whether broader testing is needed.
If the `PR` is added to the Test Plan, the repository maintainers will:
Currently, AppUpdater directly queries the GitHub API to retrieve beta and rc update information. To support users in China, we need to fetch a static JSON configuration file from GitHub/GitCode based on IP geolocation, which contains update URLs for all channels.
## Design Goals
1. Support different configuration sources based on IP geolocation (GitHub/GitCode)
2. Support version compatibility control (e.g., users below v1.x must upgrade to v1.7.0 before upgrading to v2.0)
4. Maintain compatibility with existing electron-updater mechanism
## Current Version Strategy
- **v1.7.x** is the last version of the 1.x series
- Users **below v1.7.0** must first upgrade to v1.7.0 (or higher 1.7.x version)
- Users **v1.7.0 and above** can directly upgrade to v2.x.x
## Automation Workflow
The `x-files/app-upgrade-config/app-upgrade-config.json` file is synchronized by the [`Update App Upgrade Config`](../../.github/workflows/update-app-upgrade-config.yml) workflow. The workflow runs the [`scripts/update-app-upgrade-config.ts`](../../scripts/update-app-upgrade-config.ts) helper so that every release tag automatically updates the JSON in `x-files/app-upgrade-config`.
- When GitHub marks the release as _prerelease_, the tag must include `-beta`/`-rc` (with optional numeric suffix). Otherwise the workflow exits early.
- When GitHub marks the release as stable, the tag must match the latest release returned by the GitHub API. This prevents out-of-order updates when publishing historical tags.
- If the guard clauses pass, the version is tagged as `latest` or `beta/rc` based on its semantic suffix and propagated to the script through the `IS_PRERELEASE` flag.
- When `is_prerelease=true`, the tag must carry a beta/rc suffix, mirroring the automatic validation.
- Manual runs still download the latest release metadata so that the workflow knows whether the tag represents the newest stable version (for documentation inside the PR body).
### Workflow Steps
1.**Guard + metadata preparation**– the `Check if should proceed` and `Prepare metadata` steps compute the target tag, prerelease flag, whether the tag is the newest release, and a `safe_tag` slug used for branch names. When any rule fails, the workflow stops without touching the config.
2.**Checkout source branches**– the default branch is checked out into `main/`, while the long-lived `x-files/app-upgrade-config` branch lives in `cs/`. All modifications happen in the latter directory.
3.**Install toolchain**– Node.js 22, Corepack, and frozen Yarn dependencies are installed inside `main/`.
4.**Run the update script**–`yarn tsx scripts/update-app-upgrade-config.ts --tag <tag> --config ../cs/app-upgrade-config.json --is-prerelease <flag>` updates the JSON in-place.
- The script normalizes the tag (e.g., strips `v` prefix), detects the release channel (`latest`, `rc`, `beta`), and loads segment rules from `config/app-upgrade-segments.json`.
- It validates that prerelease flags and semantic suffixes agree, enforces locked segments, builds mirror feed URLs, and performs release-availability checks (GitHub HEAD request for every channel; GitCode GET for latest channels, falling back to `https://releases.cherry-ai.com` when gitcode is delayed).
- After updating the relevant channel entry, the script rewrites the config with semver-sort order and a new `lastUpdated` timestamp.
5.**Detect changes + create PR**– if `cs/app-upgrade-config.json` changed, the workflow opens a PR `chore/update-app-upgrade-config/<safe_tag>` against `x-files/app-upgrade-config` with a commit message `🤖 chore: sync app-upgrade-config for <tag>`. Otherwise it logs that no update is required.
### Manual Trigger Guide
1. Open the Cherry Studio repository on GitHub → **Actions** tab → select **Update App Upgrade Config**.
2. Click **Run workflow**, choose the default branch (usually `main`), and fill in the `tag` input (e.g., `v2.1.0`).
3. Toggle `is_prerelease` only when the tag carries a prerelease suffix (`-beta`, `-rc`). Leave it unchecked for stable releases.
4. Start the run and wait for it to finish. Check the generated PR in the `x-files/app-upgrade-config` branch, verify the diff in `app-upgrade-config.json`, and merge once validated.
**Note**: Both mirrors provide the same configuration file hosted on the `x-files/app-upgrade-config` branch. The client automatically selects the optimal mirror based on IP geolocation.
-`lastUpdated`: Last update time of the configuration file (ISO 8601 format)
-`versions`: Version configuration object, key is the version number, sorted by semantic versioning
-`minCompatibleVersion`: Minimum compatible version that can upgrade to this version
-`description`: Version description
-`channels`: Update channel configuration
-`latest`: Stable release channel
-`rc`: Release Candidate channel
-`beta`: Beta testing channel
- Each channel contains:
-`version`: Version number for this channel
-`feedUrls`: Multi-mirror URL configuration
-`github`: electron-updater feed URL for GitHub mirror
-`gitcode`: electron-updater feed URL for GitCode mirror
-`metadata`: Stable mapping info for automation
-`segmentId`: ID from `config/app-upgrade-segments.json`
-`segmentType`: Optional flag (`legacy` | `breaking` | `latest`) for documentation/debugging
## TypeScript Type Definitions
```typescript
// Mirror enum
enumUpdateMirror{
GITHUB='github',
GITCODE='gitcode'
}
interfaceUpdateConfig{
lastUpdated: string
versions:{
[versionKey: string]:VersionConfig
}
}
interfaceVersionConfig{
minCompatibleVersion: string
description: string
channels:{
latest: ChannelConfig|null
rc: ChannelConfig|null
beta: ChannelConfig|null
}
metadata?:{
segmentId: string
segmentType?:'legacy'|'breaking'|'latest'
}
}
interfaceChannelConfig{
version: string
feedUrls: Record<UpdateMirror,string>
// Equivalent to:
// feedUrls: {
// github: string
// gitcode: string
// }
}
```
## Segment Metadata & Breaking Markers
- **Segment definitions** now live in `config/app-upgrade-segments.json`. Each segment describes a semantic-version range (or exact matches) plus metadata such as `segmentId`, `segmentType`, `minCompatibleVersion`, and per-channel feed URL templates.
- Each entry under `versions` carries a `metadata.segmentId`. This acts as the stable key that scripts use to decide which slot to update, even if the actual semantic version string changes.
- Mark major upgrade gateways (e.g., `2.0.0`) by giving the related segment a `segmentType: "breaking"` and (optionally) `lockedVersion`. This prevents automation from accidentally moving that entry when other 2.x builds ship.
- Adding another breaking hop (e.g., `3.0.0`) only requires defining a new segment in the JSON file; the automation will pick it up on the next run.
## Automation Workflow
Starting from this change, `.github/workflows/update-app-upgrade-config.yml` listens to GitHub release events (published + prerelease). The workflow:
1. Checks out the default branch (for scripts) and the `x-files/app-upgrade-config` branch (where the config is hosted).
2. Runs `yarn tsx scripts/update-app-upgrade-config.ts --tag <tag> --config ../cs/app-upgrade-config.json` to regenerate the config directly inside the `x-files/app-upgrade-config` working tree.
3. If the file changed, it opens a PR against `x-files/app-upgrade-config` via `peter-evans/create-pull-request`, with the generated diff limited to `app-upgrade-config.json`.
You can run the same script locally via `yarn update:upgrade-config --tag v2.1.6 --config ../cs/app-upgrade-config.json` (add `--dry-run` to preview) to reproduce or debug whatever the workflow does. Passing `--skip-release-checks` along with `--dry-run` lets you bypass the release-page existence check (useful when the GitHub/GitCode pages aren’t published yet). Running without `--config` continues to update the copy in your current working directory (main branch) for documentation purposes.
## Version Matching Logic
### Algorithm Flow
1. Get user's current version (`currentVersion`) and requested channel (`requestedChannel`)
2. Get all version numbers from configuration file, sort in descending order by semantic versioning
3. Iterate through the sorted version list:
- Check if `currentVersion >= minCompatibleVersion`
- Check if the requested `channel` exists and is not `null`
- If conditions are met, return the channel configuration
4. If no matching version is found, return `null`
### Pseudocode Implementation
```typescript
functionfindCompatibleVersion(
currentVersion: string,
requestedChannel: UpgradeChannel,
config: UpdateConfig
):ChannelConfig|null{
// Get all version numbers and sort in descending order
All special view components share a common architecture for consistent user experience and functionality. For detailed information about these components and their implementation, see [Image Preview Components Documentation](./ImagePreview-en.md).
All special view components share a common architecture for consistent user experience and functionality. For detailed information about these components and their implementation, see [Image Preview Components Documentation](./image-preview.md).
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.