- Added new components including CodeEditor, CollapsibleSearchBar, and DraggableList.
- Removed obsolete components such as Button, CustomCollapse, and StatusTag.
- Updated migration status documentation and adjusted component exports.
- Enhanced package.json dependencies for better compatibility.
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
* refactor(aiCore): reorganize reasoning effort logic for different providers
Restructure the reasoning effort calculation logic to handle different model providers more clearly. Move OpenRouter and SiliconFlow specific logic to dedicated sections and remove duplicate checks. Improve maintainability by grouping related provider logic together.
* refactor(sdk): update thinking config type and property names
- Replace inline thinking config type with imported ThinkingConfig type
- Update property names from snake_case to camelCase for consistency
- Add null checks for token limit calculations
- Clarify hard-coded maximum for silicon provider in comments
* refactor(openai): standardize property names to camelCase in thinking_config
Update property names in thinking_config object from snake_case to camelCase for consistency with codebase conventions
* feat(i18n): enhance translation script with concurrency and validation
- Add concurrent translation support with configurable limits
- Implement input validation for script configuration
- Improve error handling and progress tracking
- Add detailed usage instructions and performance recommendations
* fix(i18n): update translations for multiple languages
- Translate previously untranslated strings in zh-tw, ja-jp, pt-pt, es-es, ru-ru, el-gr, fr-fr
- Fix array to object structure in zh-cn accessibility description
- Add missing translations and fix structure in de-de locale
* chore: update i18n auto-translation script command
Update the yarn command from 'i18n:auto' to 'auto:i18n' for consistency with other script naming conventions
* ci: rename i18n workflow env vars for clarity
Use more descriptive names for translation-related environment variables to improve readability and maintainability
* Revert "fix(i18n): update translations for multiple languages"
This reverts commit 01dac1552e.
* fix(i18n): Auto update translations for PR #10916
* ci: run sync-i18n script before auto-translate in workflow
* fix(i18n): Auto update translations for PR #10916
---------
Co-authored-by: GitHub Action <action@github.com>
Replaces logical OR with nullish coalescing when updating advanced server properties to allow empty string values, enabling users to clear fields instead of preserving previous values.
* ci: add GitHub issue tracker workflow with Feishu notifications (#10895)
* feat: add GitHub issue tracker workflow with Feishu notifications
* fix: add missing environment variable for Claude translator in GitHub issue tracker workflow
* fix: update environment variable for Claude translator in GitHub issue tracker workflow
* Add quiet hours handling and scheduled processing for GitHub issue notifications
- Implement quiet hours detection (00:00-08:30 Beijing Time) with delayed notifications
- Add scheduled workflow to process pending issues daily at 08:30 Beijing Time
- Create new script to batch process and summarize multiple pending issues with Claude
* Replace custom Node.js script with Claude Code Action for issue processing
- Migrate from custom JavaScript implementation to Claude Code Action for AI-powered issue summarization and processing
- Simplify workflow by leveraging Claude's built-in GitHub API integration and tool usage capabilities
- Maintain same functionality: fetch pending issues, generate Chinese summaries, send Feishu notifications, and clean up labels
- Update Claude action reference from version pin to main branch for latest features
* Remove GitHub issue comment functionality
- Delete automated AI summary comments on issues after processing
- Remove documentation for manual issue commenting workflow
- Keep Feishu notification system intact while streamlining issue interactions
* feat: redirect macOS About menu to settings About page
Add functionality to navigate to the About page in settings when clicking the About menu item in macOS menu bar.
Changes:
- Add Windows_NavigateToAbout IPC channel for communication between main and renderer processes
- Create AppMenuService to setup macOS application menu with custom About handler
- Add IPC handler in main process to show main window and trigger navigation
- Add IPC listener in renderer NavigationHandler to navigate to /settings/about
- Initialize AppMenuService on app startup for macOS platform
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* * feat: add GitHub issue tracker workflow with Feishu notifications
* feat: add GitHub issue tracker workflow with Feishu notifications
* fix: add missing environment variable for Claude translator in GitHub issue tracker workflow
* fix: update environment variable for Claude translator in GitHub issue tracker workflow
* Add quiet hours handling and scheduled processing for GitHub issue notifications
- Implement quiet hours detection (00:00-08:30 Beijing Time) with delayed notifications
- Add scheduled workflow to process pending issues daily at 08:30 Beijing Time
- Create new script to batch process and summarize multiple pending issues with Claude
* Replace custom Node.js script with Claude Code Action for issue processing
- Migrate from custom JavaScript implementation to Claude Code Action for AI-powered issue summarization and processing
- Simplify workflow by leveraging Claude's built-in GitHub API integration and tool usage capabilities
- Maintain same functionality: fetch pending issues, generate Chinese summaries, send Feishu notifications, and clean up labels
- Update Claude action reference from version pin to main branch for latest features
* Remove GitHub issue comment functionality
- Delete automated AI summary comments on issues after processing
- Remove documentation for manual issue commenting workflow
- Keep Feishu notification system intact while streamlining issue interactions
* Add OIDC token permissions and GitHub token to Claude workflow
- Add `id-token: write` permission for OIDC authentication in both jobs
- Pass `github_token` to Claude action for proper GitHub API access
- Maintain existing issue write and contents read permissions
* fix: add GitHub issue tracker workflow with Feishu notifications
* feat: add GitHub issue tracker workflow with Feishu notifications
* fix: add missing environment variable for Claude translator in GitHub issue tracker workflow
* fix: update environment variable for Claude translator in GitHub issue tracker workflow
* Add quiet hours handling and scheduled processing for GitHub issue notifications
- Implement quiet hours detection (00:00-08:30 Beijing Time) with delayed notifications
- Add scheduled workflow to process pending issues daily at 08:30 Beijing Time
- Create new script to batch process and summarize multiple pending issues with Claude
* Replace custom Node.js script with Claude Code Action for issue processing
- Migrate from custom JavaScript implementation to Claude Code Action for AI-powered issue summarization and processing
- Simplify workflow by leveraging Claude's built-in GitHub API integration and tool usage capabilities
- Maintain same functionality: fetch pending issues, generate Chinese summaries, send Feishu notifications, and clean up labels
- Update Claude action reference from version pin to main branch for latest features
* Remove GitHub issue comment functionality
- Delete automated AI summary comments on issues after processing
- Remove documentation for manual issue commenting workflow
- Keep Feishu notification system intact while streamlining issue interactions
* Add OIDC token permissions and GitHub token to Claude workflow
- Add `id-token: write` permission for OIDC authentication in both jobs
- Pass `github_token` to Claude action for proper GitHub API access
- Maintain existing issue write and contents read permissions
* Enhance GitHub issue automation workflow with Claude integration
- Refactor Claude action to handle issue analysis, Feishu notification, and comment creation in single step
- Add tool permissions for Bash commands and custom notification script execution
- Update prompt with detailed task instructions including summary generation and automated actions
- Remove separate notification step by integrating all operations into Claude action workflow
* fix
* 删除AI总结评论的添加步骤和注意事项
* fix comments
* refactor(AppMenuService): streamline WindowService usage
Updated the AppMenuService to directly import and use the windowService for retrieving the main window and showing it, enhancing code clarity and maintainability.
* add i18n
* fix(AppMenuService): handle macOS application menu setup conditionally
Updated the AppMenuService to only instantiate when running on macOS, preventing potential null reference errors. Additionally, added optional chaining in the main index file for safer menu setup.
* fix(i18n): Auto update translations for PR #10902
---------
Co-authored-by: SuYao <sy20010504@gmail.com>
Co-authored-by: Payne Fu <payne@Paynes-MacBook-Pro.local>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: GitHub Action <action@github.com>
* ci: update OpenAI dependency in i18n workflow
Use @cherrystudio/openai instead of openai package for translation dependencies
* ci(workflows): allow workflow dispatch for auto-i18n job
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.
* feat: add GitHub issue tracker workflow with Feishu notifications
* fix: add missing environment variable for Claude translator in GitHub issue tracker workflow
* fix: update environment variable for Claude translator in GitHub issue tracker workflow
* Add quiet hours handling and scheduled processing for GitHub issue notifications
- Implement quiet hours detection (00:00-08:30 Beijing Time) with delayed notifications
- Add scheduled workflow to process pending issues daily at 08:30 Beijing Time
- Create new script to batch process and summarize multiple pending issues with Claude
* Replace custom Node.js script with Claude Code Action for issue processing
- Migrate from custom JavaScript implementation to Claude Code Action for AI-powered issue summarization and processing
- Simplify workflow by leveraging Claude's built-in GitHub API integration and tool usage capabilities
- Maintain same functionality: fetch pending issues, generate Chinese summaries, send Feishu notifications, and clean up labels
- Update Claude action reference from version pin to main branch for latest features
* Remove GitHub issue comment functionality
- Delete automated AI summary comments on issues after processing
- Remove documentation for manual issue commenting workflow
- Keep Feishu notification system intact while streamlining issue interactions
* feat: add GitHub issue tracker workflow with Feishu notifications
* feat: add GitHub issue tracker workflow with Feishu notifications
* fix: add missing environment variable for Claude translator in GitHub issue tracker workflow
* fix: update environment variable for Claude translator in GitHub issue tracker workflow
* Add quiet hours handling and scheduled processing for GitHub issue notifications
- Implement quiet hours detection (00:00-08:30 Beijing Time) with delayed notifications
- Add scheduled workflow to process pending issues daily at 08:30 Beijing Time
- Create new script to batch process and summarize multiple pending issues with Claude
* Replace custom Node.js script with Claude Code Action for issue processing
- Migrate from custom JavaScript implementation to Claude Code Action for AI-powered issue summarization and processing
- Simplify workflow by leveraging Claude's built-in GitHub API integration and tool usage capabilities
- Maintain same functionality: fetch pending issues, generate Chinese summaries, send Feishu notifications, and clean up labels
- Update Claude action reference from version pin to main branch for latest features
* Remove GitHub issue comment functionality
- Delete automated AI summary comments on issues after processing
- Remove documentation for manual issue commenting workflow
- Keep Feishu notification system intact while streamlining issue interactions
* Add OIDC token permissions and GitHub token to Claude workflow
- Add `id-token: write` permission for OIDC authentication in both jobs
- Pass `github_token` to Claude action for proper GitHub API access
- Maintain existing issue write and contents read permissions
fix: add GitHub issue tracker workflow with Feishu notifications
* feat: add GitHub issue tracker workflow with Feishu notifications
* fix: add missing environment variable for Claude translator in GitHub issue tracker workflow
* fix: update environment variable for Claude translator in GitHub issue tracker workflow
* Add quiet hours handling and scheduled processing for GitHub issue notifications
- Implement quiet hours detection (00:00-08:30 Beijing Time) with delayed notifications
- Add scheduled workflow to process pending issues daily at 08:30 Beijing Time
- Create new script to batch process and summarize multiple pending issues with Claude
* Replace custom Node.js script with Claude Code Action for issue processing
- Migrate from custom JavaScript implementation to Claude Code Action for AI-powered issue summarization and processing
- Simplify workflow by leveraging Claude's built-in GitHub API integration and tool usage capabilities
- Maintain same functionality: fetch pending issues, generate Chinese summaries, send Feishu notifications, and clean up labels
- Update Claude action reference from version pin to main branch for latest features
* Remove GitHub issue comment functionality
- Delete automated AI summary comments on issues after processing
- Remove documentation for manual issue commenting workflow
- Keep Feishu notification system intact while streamlining issue interactions
* Add OIDC token permissions and GitHub token to Claude workflow
- Add `id-token: write` permission for OIDC authentication in both jobs
- Pass `github_token` to Claude action for proper GitHub API access
- Maintain existing issue write and contents read permissions
* Enhance GitHub issue automation workflow with Claude integration
- Refactor Claude action to handle issue analysis, Feishu notification, and comment creation in single step
- Add tool permissions for Bash commands and custom notification script execution
- Update prompt with detailed task instructions including summary generation and automated actions
- Remove separate notification step by integrating all operations into Claude action workflow
* fix
* 删除AI总结评论的添加步骤和注意事项
* feat(Miniapp): add Ling app and according migration support.
* feat(models): add Ling model support and related reasoning checks
Signed-off-by: cafe3310 <4354898+cafe3310@users.noreply.github.com>
* fix: resolved lint findings; simplifying model reasoning check.
---------
Signed-off-by: cafe3310 <4354898+cafe3310@users.noreply.github.com>
* build: replace openai package with @cherrystudio/openai
Update all imports from 'openai' to '@cherrystudio/openai' and remove the yarn patch
* refactor(OpenAIResponseAPIClient): simplify token estimation logic for function call output
Consolidate token estimation by first concatenating all output parts into a single string before counting tokens. This improves maintainability and handles additional output types consistently.
* fix(ModelListItem): fallback to model name when logo not found by id
Use model name as fallback when fetching model logo if lookup by id fails
* refactor(model-logo): simplify model logo handling with unified function
Replace direct calls to getModelLogo with model.id with new getModelLogo function that handles both id and name fallback
Rename original getModelLogo to getModelLogoById for clarity
Update all components to use the new unified function
* refactor(model-utils): improve model type detection with fallback logic
Add helper function to check both model ID and name as ID for type detection
Refactor getThinkModelType and isSupportedThinkingTokenModel to use new fallback logic
* refactor(agent-popups): make avatar optional in BaseOption interface
update getModelLogo functions to return undefined instead of null for consistency
* refactor(models): remove outdated comment in reasoning.ts
* build: pin vite to specific version 7.1.5
Update package.json and yarn.lock to use exact version of vite instead of latest tag for better dependency stability
* build: pin vite version to 7.1.5
* build: pin rolldown-vite version to 7.1.5
- Adjusted the flex style for the InputEmbeddingDimension component to improve layout consistency.
- Removed the unset color style from the Spinner component to ensure default styling is applied.
- Replaced previous licensing information with the complete text of the GNU Affero General Public License v3.0 (AGPL-3.0).
- Clarified terms regarding commercial use and compliance with AGPL-3.0.
- Added detailed definitions and conditions for users and organizations regarding licensing options.
This update ensures that users have clear access to the licensing terms governing the Cherry Studio Community Edition.
- Updated the proxy bypass tooltip to use InfoTooltip component for better styling and functionality.
- Maintained existing behavior while enhancing the user interface.
Implement new service layer for OCR provider management following the IBaseService interface. Includes basic CRUD operations, pagination, and special methods for built-in providers. This is an early version pending final data architecture design.
* refactor: migrate from configManager to preferenceService
- Replace configManager with preferenceService for app settings
- Update zoom factor management to use preferenceService
- Migrate spell check settings to preferenceService
- Update language subscription in NodeTraceService
- Move client ID generation to systemInfo utility
- Keep shortcuts management in configManager (not migrated)
- Mark legacy Config_Set/Config_Get as deprecated
- Update AppUpdater test mock to include getClientId
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: migrate from configManager to preferenceService
- Replace configManager with preferenceService for app settings
- Update zoom factor management to use preferenceService
- Migrate spell check settings to preferenceService
- Update language subscription in NodeTraceService
- Move client ID generation to systemInfo utility
- Keep shortcuts management in configManager (not migrated)
- Mark legacy Config_Set/Config_Get as deprecated
- Update AppUpdater test mock to include getClientId
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
The ocr provider schema was moved from `schemas/ocr/provider.ts` to `schemas/ocrProvider.ts` to simplify the directory structure and make imports more straightforward. All related imports were updated accordingly.
* feat: enhance proxy bypass rules with comprehensive matching
- Add support for wildcard domains (*.example.com, .example.com)
- Add CIDR notation support for IPv4 and IPv6 (192.168.0.0/16, 2001:db8::/32)
- Add wildcard IP matching (192.168.1.*)
- Add <local> keyword for local network hostnames
- Support both semicolon and comma separators in bypass rules
- Add comprehensive unit tests with 22 test cases
- Export matchWildcardDomain and matchIpRule for testability
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* move to devDeps
* delete logs
* feat: enhance ProxyManager with advanced proxy bypass rule handling
- Introduced comprehensive parsing and matching for proxy bypass rules, including support for wildcard domains, CIDR notation, and local network addresses.
- Refactored existing functions and added new utility methods for improved clarity and maintainability.
- Updated unit tests to cover new functionality and ensure robust validation of bypass rules.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
* update proxy rules
* fix lint
* add tips
* delete hostname rule
* add logs
---------
Co-authored-by: Claude <noreply@anthropic.com>
* fix: capture detailed error response body for reranker API failures
Previously, when reranker API returned 400 or other error status codes,
only the HTTP status and status text were captured, without reading the
actual error response body that contains detailed error information.
This commit fixes the issue by:
- Reading the error response body (as JSON or text) before throwing error
- Attaching the response details to the error object
- Including responseBody in formatErrorMessage output
This will help diagnose issues like "qwen3-reranker not available" by
showing the actual error message from the API provider.
* fix: enhance error handling in GeneralReranker for API failures
This update improves the error handling in the GeneralReranker class by ensuring that the response body is properly cloned and read when an API call fails. The detailed error information, including the status, status text, and body, is now attached to the error object. This change aids in diagnosing issues by providing more context in error messages.
Update both English and Chinese versions of the OCR architecture documentation to reflect current implementation where IPC serves as API layer. Clarify direct communication between renderer and business layer, and enhance data flow diagrams with new components and security aspects.
Add comprehensive technical documentation for the OCR system architecture, covering:
- Layered architecture design
- Provider system implementation
- Data flow and type system
- Configuration management
- Error handling and security
- Development guidelines
The documentation was automatically generated based on code analysis and reflects the current implementation state.
Update sharp package and its platform-specific variants to version 0.34.4, including corresponding libvips dependencies. This ensures compatibility and includes latest fixes/improvements from the sharp library.
Add type guards for OCR provider configs and ensure config is passed to OCR handlers
Update all built-in OCR services to validate config before processing
Add initial database migration files including schema definition for ocr_provider table and related metadata files. This sets up the foundation for OCR provider management in the system.
Centralize translate-related types and schemas in a dedicated module for better organization and maintainability. This change involves moving types from the shared index file to a new translate-specific file and updating import paths accordingly.
Remove unnecessary response wrapper objects ({ data: ... }) from OCR service methods and update types accordingly
Update API handlers to maintain consistent response structure
- Split monolithic ocr.ts into separate files for base types, providers, models, and layers (api, data, business)
- Update related imports and references across the codebase
- Rename API request/response types to be more consistent (Patch->Update, Put->Replace)
- Adjust repository and service implementations to match new type structure
Add "not_availabel" translation key and use it when provider is unavailable. Also update type name from ImageOcrProvider to OcrProvider to better reflect its usage.
- Extract database operations to new OcrProviderRepository
- Improve service initialization and provider management
- Add better error handling and logging
- Update API handlers to use new service methods
* new painting provider: intel ovms
Signed-off-by: Ma, Kejiang <kj.ma@intel.com>
Signed-off-by: Kejiang Ma <kj.ma@intel.com>
* cherryin -> cherryai
Signed-off-by: Kejiang Ma <kj.ma@intel.com>
* ovms painting only valid when ovms is running
Signed-off-by: Kejiang Ma <kj.ma@intel.com>
* fix: painting(ovms) still appear while ovms is not running after rebase
Signed-off-by: Kejiang Ma <kj.ma@intel.com>
* fix warning in PaintingRoute
Signed-off-by: Kejiang Ma <kj.ma@intel.com>
* add ovms_paintings in migrate config 163
---------
Signed-off-by: Ma, Kejiang <kj.ma@intel.com>
Signed-off-by: Kejiang Ma <kj.ma@intel.com>
* feat: add right-click to paste text file content into input
Implemented context menu functionality for text file attachments that allows users to right-click on a text file attachment to paste its content directly into the input field.
Changes:
- Added onContextMenu prop to CustomTag component for handling right-click events
- Extended AttachmentPreview with onAttachmentContextMenu callback
- Implemented appendTxtContentToInput function to read and paste text file content
- Added clipboard support for copying file content
- Integrated context menu handler in Inputbar component
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* use real path
* 🐛 fix: clear txt attachment after paste
* ✨ fix: improve attachment confirm flow
* update i18n
* 🎨 refactor: restyle confirm dialog
* format code
* refactor(ConfirmDialog): replace text buttons with icon buttons and remove i18n
- Replace text-based cancel/confirm buttons with icon buttons for better visual clarity
- Remove unused i18n translation hook as it's no longer needed
- Adjust styling to accommodate new button layout
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: icarus <eurfelux@gmail.com>
* chore: update @opeoginni/github-copilot-openai-compatible to version 0.1.19 and remove obsolete patch file
- Updated the dependency version for @opeoginni/github-copilot-openai-compatible from 0.1.18 to 0.1.19 in package.json and yarn.lock.
- Removed the obsolete patch file for the previous version to clean up the project.
* recover
- Remove useOcrProvider hook usage in favor of direct props passing
- Add proper type casting for updateConfig functions
- Maintain consistent state management across all OCR provider settings
- Simplify useOcrImageProvider by directly using useOcrProvider
- Make useOcrProvider handle null provider IDs
- Update provider settings components to use passed props
- Remove styled-components in favor of tailwind classes
The id parameter was missing in the update request body, causing potential issues with identifying which provider to update. Add id to the request body to ensure correct provider is updated.
- Add params validation in API handlers to ensure path ID matches body ID
- Introduce isDbOcrProvider type guard for runtime validation
- Validate provider data before database operations
- Add ListOcrProvidersQuery type for better type safety
- Update useOcrProviders hook to accept query params and handle undefined data
- Improve error handling and loading states in OcrImageSettings component
- Memoize filtered image providers for better performance
Add DELETE endpoint for OCR providers with proper type definitions and handler implementation. The endpoint removes the provider from both the registry and database after validation checks.
Add error messages for provider operations (create, delete, get, list, update) in multiple languages
Include search-related translations for various languages
Add new OVMS runtime error codes for installation process
Replace complex provider and config management with useQuery and useMutation hooks
Add loading states and error handling
Remove unused imports and simplify return type
- Remove separate configs from store and move them into provider definitions
- Add Zod schemas for OCR provider types and configurations
- Update migration to use new provider structure
- Make OCR provider config non-nullable in database schema
- Clean up unused OCR preference settings
- Replace OcrProvider with OcrParams to simplify interface
- Remove unused OcrApiClientFactory and related code
- Consolidate ocr service calls to use consistent params structure
build: update sharp dependencies to version 0.34.3
Update sharp image processing library dependencies to latest version 0.34.3 across all platforms (darwin, linux, win32) to ensure consistent behavior and security fixes
Remove unused imports and simplify the provider filtering logic by removing platform-specific checks
Update UI styling to use Tailwind classes instead of inline styles
Update OCR settings components to use config object returned by useOcrProvider hook instead of accessing it through provider.config. This provides more direct access to the configuration data and improves consistency across components.
- Replace dynamic provider lookup with type-safe registry pattern
- Add separate config management for each provider type
- Remove unused imports and simplify provider fallback logic
Remove unused provider management methods (add/remove) and simplify the fallback logic in useOcrProvider to always use Tesseract when provider is not found
Move image provider related state and logic from useOcrProviders to new useOcrImageProvider hook
Update all components to use the new hook for better separation of concerns
Move OcrProviderLogo implementation from useOcrProviders hook to the component file
Extract common OCR provider logic into a separate useOcrProviders hook
Clean up and reorganize related imports and exports
Add OCR provider configuration mappings to PreferencesMappings.ts and define default preferences for OCR providers in preferenceSchemas.ts. This enables support for multiple OCR providers with their respective configurations.
Add type import for PreferenceSchemas and update REDUX_STORE_MAPPINGS type to use keyof PreferenceSchemas
Mark several mappings with TODO comments for future fixes
Centralize OCR configuration in shared package to avoid duplication and improve maintainability. This change affects multiple components that previously imported from renderer config.
The config property is being phased out in favor of a more streamlined type structure. This change marks it as deprecated while maintaining backward compatibility.
Remove unused OcrProvider type and related endpoints. The GET endpoint now returns a simple array of provider IDs instead of full provider objects, as the detailed provider data will be handled separately.
Add more context about ID format for custom providers and clarify name usage for built-in providers
Explain JSON config validation requirements and mark timestamps as potentially unused
Add new schema for OCR providers including fields for id, name, capabilities, and config. Capabilities and config are stored as JSON to accommodate various provider types and configurations.
refactor(AgentItem): simplify BotIcon component and adjust styling
- Replace absolute positioning with flex layout in BotIcon
- Add tooltip for better user experience
- Consolidate styling classes for better maintainability
build: update sharp dependencies to version 0.34.3
Update sharp image processing library dependencies to latest version 0.34.3 across all platforms (darwin, linux, win32) to ensure consistent behavior and security fixes
Implement API schemas and handlers for OCR providers endpoints
Add TODO comments for future migration tasks
Fix endpoint path in OcrImageSettings component
- Remove unnecessary state propagation between components
- Store image provider ID in preferences instead of redux
- Add null checks for provider existence
- Update tab navigation to use new ui components
Add new tabs component using @radix-ui/react-tabs as base implementation. Includes Tabs, TabsList, TabsTrigger and TabsContent subcomponents with styling utilities.
* feat(models): add doubao_after_251015 model type and support
Add new model type 'doubao_after_251015' with reasoning effort levels and update regex patterns to handle version 251015 and later
* fix(sdk): add warning for reasoning_effort field and update reasoning logic
Add warning comment about reasoning_effort field being overwritten for openai-compatible providers
Update reasoning effort logic to handle Doubao seed models after 251015 and standardize field naming
* fix(reasoning): update Doubao model regex patterns and tests
Update regex patterns for Doubao model validation to correctly handle version constraints
Add comprehensive test cases for model validation functions
Move availability checks to service instantiation
Update registry to store service instances directly
Simplify registration logic by removing redundant bind calls
- Replaced usePreference with useSettings in LaunchpadPage for improved state management.
- This change aligns with recent updates to enhance consistency across components.
- Introduced a new RadioGroup component using Radix UI for better UI consistency.
- Updated MCPProviderSettings to utilize the new RadioGroup and adjusted button styles for improved UX.
- Added Radix UI radio group dependency to package.json and yarn.lock.
- Replaced useSettings with usePreference in AgentItem and LaunchpadPage for better state management.
- Adjusted Chat component's Main element to include width styling for improved layout consistency.
* fix: improve server startup and error handling logic
Refactored ApiServer to clean up failed server instances and ensure proper handling of server state. Updated loggerService import to use shared logger and improved error handling during server startup.
* Update server.ts
- Added new features including session settings management, full-text search for notes, and integration with DiDi MCP server.
- Improved agent model selection and added support for Mistral AI and NewAPI providers.
- Enhanced UI/UX with navbar layout consistency and chat component responsiveness.
- Fixed various bugs related to assistant creation, streaming issues, and message layout.
* refactor(AgentModal): simplify trigger prop structure and mark Agents as deprecated
- Replace trigger prop with children for simpler component usage
- Add deprecation notice to Agents component
* fix(AgentModal): set empty default model instead of 'claude-4-sonnet'
The default model should be empty to require explicit selection rather than defaulting to a specific model
* fix(AgentModal): wrap children in conditional check to prevent undefined errors
* refactor(agent-modal): simplify modal control by removing trigger props
Remove the trigger props pattern from AgentModal component and use explicit isOpen/onClose control. This makes the component's behavior more predictable and aligns with the usage pattern in the Agents page where modal state is managed externally.
Also remove unused ReactNode import and clean up related comments.
* refactor(UnifiedAddButton): replace useState with useDisclosure for agent modal
Use useDisclosure hook for better state management of agent modal
- Updated Navbar styles to improve margin handling for macOS.
- Refactored Chat component to streamline layout and enhance responsiveness, including adjustments to main height calculations and navbar integration.
- Cleaned up commented code and improved the structure of the ChatNavbar for better clarity and maintainability.
- Enhanced styling in various components for consistent appearance and behavior across different screen sizes.
* Revert "fix: make anthropic model provided by cherryin visible to agent (#10695)"
This reverts commit 7b3b73d390.
* fix: agent supported model filter
* fix: resolve gpt-5-codex streaming response issue
- Add patch for @opeoginni/github-copilot-openai-compatible to fix text part ID mismatch
- Fix text-end event to use currentTextId instead of value.item.id for proper ID matching
- Add COPILOT_DEFAULT_HEADERS to OpenAI client for GitHub Copilot compatibility
🤖 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>
* fix(home/Tabs): remove redundant isTopicView check in tab rendering
* refactor(runtime): rename activeSessionId to activeSessionIdMap for clarity
Update variable name to better reflect its purpose as a mapping structure
* refactor(agent): add CreateAgentSessionResponse type and schema
Add new type and schema for create session response to better reflect API contract
* fix(useSessions): return null instead of undefined on session creation error
Returning null provides better type safety and aligns with the response type Promise<CreateAgentSessionResponse | null>
* refactor(useSessions): add return type to deleteSession callback
* fix(useSessions): return session data or null from getSession
Ensure getSession callback always returns a value (session data or null) to handle error cases properly and improve type safety
* feat(hooks): add useActiveSession hook and handle null agentId in useSessions
Add new hook to get active session from runtime and sessions data. Update useSessions to handle null agentId cases by returning early and adding null checks.
* feat(hooks): add useActiveAgent hook to get active agent
Expose active agent data by combining useRuntime and useAgent hooks
* fix(agents): remove fake agent id handling and improve null checks
- Replace fake agent id with null in HomePage
- Remove fake id check in useAgent hook and throw error for null id
- Simplify agent session initialization by removing fake id checks
* refactor(hooks): replace useAgent with useActiveAgent for active agent state
* feat(home): add session settings tab component
Replace AgentSettingsTab with SessionSettingsTab to better handle session-specific settings. The new component includes essential and advanced settings sections with a more settings button.
* refactor(settings): consolidate agent and session essential settings into single component
Replace AgentEssentialSettings and SessionEssentialSettings with a unified EssentialSettings component that handles both agent and session types. This reduces code duplication and improves maintainability.
* style(SelectAgentModelButton): improve model name display with truncation
Add overflow-x-hidden to container and truncate to model name span to prevent text overflow
* refactor(AgentSettings): replace Ellipsis with truncate for text overflow
Use CSS truncate instead of Ellipsis component for better performance and consistency
* refactor(chat-navbar): replace useAgent and useSession with useActiveAgent and useActiveSession
Simplify component logic by using dedicated hooks for active agent and session
* feat(ChatNavbar): add session settings button to breadcrumb
Add clickable session label chip that opens session settings popup when active session exists
* refactor(agents): improve session update hook and type definitions
- Extract UpdateAgentBaseOptions type to shared types file
- Update useUpdateSession to return both updateSession and updateModel functions
- Modify components to use destructured updateSession from hook
- Add null check for agentId in useUpdateSession
- Add success toast option to session updates
* refactor(components): rename agent prop to agentBase for clarity
Update component name and prop to better reflect its purpose and improve code readability
* refactor(ChatNavbar): rename SelectAgentModelButton to SelectAgentBaseModelButton and update usage
Update component name to better reflect its purpose and adjust props to use activeSession instead of activeAgent for consistency
* feat(i18n): add null id error message for agent retrieval
Add error message for when agent ID is null across all supported languages
* refactor(hooks): simplify agent and session hooks by returning destructured values
Remove unnecessary intermediate variables and directly return hook results
Update useSession to handle null agentId and sessionId cases
* feat(i18n): add null session ID error message for all locales
* refactor(home): rename SelectAgentModelButton to SelectAgentBaseModelButton
The component was renamed to better reflect its purpose of selecting base models for agents. The functionality remains unchanged.
* refactor(session): rename useUpdateAgent to useUpdateSession for clarity
* refactor(home-tabs): replace useUpdateAgent with useUpdateSession hook
Update session settings tab to use the new useUpdateSession hook which requires activeAgentId
* style(AgentSettings): remove unnecessary gap class from ModelSetting
* refactor(agents): improve error handling and remove duplicate code
- Replace formatErrorMessageWithPrefix with getErrorMessage for better error handling
- Move updateSession logic to useUpdateSession hook to avoid duplication
* fix(ChatNavbar): prevent model update when activeAgent is missing
Add activeAgent to dependency array and check its existence before updating model to avoid potential errors
* feat(home/Tabs): add loading and error states for session settings
Add Skeleton loader and Alert component to handle loading and error states when fetching session data in the settings tab
* fix(home/Tabs): add h-full class to Skeleton for proper height
* fix(AssistantsTab): remove weird effect hook for agent selection
* refactor(chat-navbar): clean up unused code and update session handling
remove commented out code in ChatNavbar.tsx and update ChatNavbarContent to use active agent/session hooks
* style(home): remove negative margin from model name span
* refactor(Agents): mark Agents component as deprecated
* refactor: remove unused Agents and Assistants code
---------
Co-authored-by: dev <verc20.dev@proton.me>
feat: add Greek language option to GeneralSettings component
- Added support for Greek (Ελληνικά) language in the language selection dropdown of the GeneralSettings component.
* new build-in ocr provider intel ov
Signed-off-by: Ma, Kejiang <kj.ma@intel.com>
Signed-off-by: Kejiang Ma <kj.ma@intel.com>
* updated base on PR's commnets
Signed-off-by: Kejiang Ma <kj.ma@intel.com>
* feat(OcrImageSettings): use swr to fetch available providers
Add loading state and error handling when fetching available OCR providers. Display an alert when provider loading fails, showing the error message. Also optimize provider filtering logic using useMemo.
* refactor(ocr): rename providers to listProviders for consistency
Update method name to better reflect its functionality and maintain naming consistency across the codebase
---------
Signed-off-by: Ma, Kejiang <kj.ma@intel.com>
Signed-off-by: Kejiang Ma <kj.ma@intel.com>
Co-authored-by: icarus <eurfelux@gmail.com>
fix: prevent default behavior for Cmd/Ctrl+F in WebviewService (#10800)
Updated the keyboard handler in WebviewService to always prevent the default action for the Cmd/Ctrl+F shortcut, ensuring it overrides the guest page's native find dialog. This change allows the renderer to manage the behavior of Escape and Enter keys based on the visibility of the search bar.
* feat: update and download ovms to 2025.3 official release from official site.
Signed-off-by: Kejiang Ma <kj.ma@intel.com>
* fix UI text
Signed-off-by: Kejiang Ma <kj.ma@intel.com>
---------
Signed-off-by: Kejiang Ma <kj.ma@intel.com>
* feat: notes full text search initial commit
* fix: update highlight overlay when scroll
* fix: reset note search result properly
* refactor: extract scrollToLine logic from CodeEditor into a custom hook
* fix: hide match overlay when overlap
* fix: truncate line with ellipsis around search match for better visibility
* fix: unified note search match highlight style
* feat: add built-in DiDi MCP server integration
- Add DiDi MCP server implementation with ride-hailing services
- Support map search, price estimation, order management, and driver tracking
- Add multilingual translations for DiDi MCP server descriptions
- Available only in mainland China, requires DIDI_API_KEY environment variable
* fix: resolve code formatting issues in DiDi MCP server
fixes code formatting issues in the DiDi MCP server implementation to resolve CI format check failures.
---------
Co-authored-by: BillySong <billysongli@didiglobal.com>
fix: update default enableTopP setting to false in AssistantModelSettings and DefaultAssistantSettings
- Changed default value of enableTopP from true to false in AssistantModelSettings and DefaultAssistantSettings components.
- Updated related logic to ensure consistent behavior across settings.
* fix: show ChatNavbar in both LeftNavbar and TopNavbar layouts
* Revert "fix: show ChatNavbar in both LeftNavbar and TopNavbar layouts"
This reverts commit 7f205bf241.
* refactor: extract ChatNavBarContent from ChatNavBar
* fix: add navbar content to top nav in left nav mode
* fix: add nodrag to navbar container
* fix: lint error
* fix: ChatNavbarContainer layout
* fix: adjust NavbarLeftContainer min-width for macOS compatibility
---------
Co-authored-by: kangfenmao <kangfenmao@qq.com>
Updated formatCitationsFromBlock to verify that 'knowledge' and 'memories' are arrays before accessing their length and mapping over them. This prevents potential runtime errors if these properties are not arrays.
Updated ModernAiProvider to regenerate config on every request, ensuring API key rotation is effective. Refactored BaseApiClient to use an API key getter for dynamic key retrieval, supporting key rotation when multiple keys are configured.
* fix(minapps): can't open links in external broswer when using tab navigation
* fix(minapps): stabilize webview navigation and add logging
* fix(minapps): debounce nav updates and robust webview attach
* fix(translate): auto copy failed
Because translatedContent may be stale
* refactor(translate): improve copy functionality dependency handling
Update copy callback dependencies to include setCopied and ensure proper memoization
Fix onCopy and translateText dependencies to include copy function
- Updated tsconfig files to standardize module resolution paths for the UI package.
- Modified component import paths in components.json to align with the new structure.
- Refactored import statements in various UI components to use the updated paths from '@cherrystudio/ui'.
- Added new exports for UI components in the index file to enhance accessibility.
* feat: add support for New API providerType
* feat: support New API as a generic painting provider
* refactor: update styling in painting pages to use Tailwind classes
- Replaced inline styles with Tailwind CSS classes for margin adjustments in AihubmixPage, DmxapiPage, SiliconPage, TokenFluxPage, and ZhipuPage.
- Enhanced consistency and maintainability of the codebase by standardizing styling approach across components.
- Minor refactor in ProviderSelect component to support className prop for better styling flexibility.
* refactor(apiServer): move api server types to dedicated module
Restructure api server type definitions by moving them from index.ts to a dedicated apiServer.ts file. This improves code organization and maintainability by grouping related types together.
* feat(api-server): add api server management hooks and integration
Extract api server management logic into reusable hook and integrate with settings page
* feat(api-server): improve api server status handling and error messages
- add new error messages for api server status
- optimize initial state and loading in useApiServer hook
- centralize api server enabled check via useApiServer hook
- update components to use new api server status handling
* fix(agents): update error message key for agent server not running
* fix(i18n): update api server status messages across locales
Remove redundant 'notRunning' message in en-us locale
Add consistent 'not_running' error message in all locales
Add missing 'notEnabled' message in several locales
* refactor: update api server type imports to use @types
Move api server related type imports from renderer/src/types to @types package for better code organization and maintainability
* docs(IpcChannel): add comment about unused api-server:get-config
Add TODO comment about data inconsistency in useApiServer hook
* refactor(assistants): pass apiServerEnabled as prop instead of using hook
Move apiServerEnabled from being fetched via useApiServer hook to being passed as a prop through component hierarchy. This improves maintainability by making dependencies more explicit and reducing hook usage in child components.
* style(AssistantsTab): add consistent margin-bottom to alert components
* feat(useAgent): add api server status checks before fetching agent
Ensure api server is enabled and running before attempting to fetch agent data
- Major features introduced: Agent System, Agent Management, and Unified UI.
- Added detailed agent features and UI/UX improvements.
- Included bug fixes and technical updates, such as React upgrade and enhanced Claude Code service.
- Updated version in package.json to 1.7.0-beta.1.
* Add syntax highlighting to AI SDK error cause display
- Parse and format error cause as JSON with syntax highlighting
- Use CodeStyleProvider context for consistent code styling
- Maintain plain text fallback for non-JSON content
* fix patch
* chore: yarn lock
* feat: provider-specific-error
* chore
* chore
* fix: handle JSON parsing errors in AiSdkErrorBase component
* fix: improve error message formatting in AiSdkToChunkAdapter
* fix: remove unused MarkdownContainer and update AiSdkErrorBase to use styled div
* new middleware to add 'no_think'
Signed-off-by: Kejiang Ma <kj.ma@intel.com>
* translate comments to English
Signed-off-by: Kejiang Ma <kj.ma@intel.com>
---------
Signed-off-by: Kejiang Ma <kj.ma@intel.com>
- Added a new typecheck command for the UI package in package.json to ensure type safety.
- Updated tsconfig.web.json to include UI paths for better module resolution.
- Modified the type-check command in the UI package to specify the tsconfig.json file.
- Adjusted the include paths in the UI tsconfig.json to focus on specific component directories.
- Added new UI components including Button, Command, Dialog, Popover, and Dropzone using Radix UI.
- Introduced global styles with Tailwind CSS for consistent theming and design.
- Updated existing components to utilize new utility functions for class name management.
- Enhanced Tooltip component with inline-block display for better layout.
- Updated package dependencies in package.json and yarn.lock to include new Radix and Tailwind packages.
- Changed imports to use 'type' for type-only imports in various files, improving clarity and potentially optimizing the build process.
- Adjusted imports in files related to agents, models, and types to ensure consistency in type usage.
* refactor: migrate tooltip components to @cherrystudio/ui
- Replace all antd Tooltip + InfoCircleOutlined patterns with InfoTooltip component
- Replace all antd Tooltip + QuestionCircleOutlined patterns with HelpTooltip component
- Migrate all WarnTooltip imports to @cherrystudio/ui
- Add onClick support to InfoTooltip and HelpTooltip components
- Remove local tooltip components from renderer
- Update eslint config to restrict antd Tooltip imports
- Clean up unused imports and styled components
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: replace tooltip
* fix: yarn format
* fix: type check
* Update QuickModelPopup.tsx
* fix: yarn test
* fix: ci error
* Update TabContainer.tsx
* fix: ci error
* fix: ci error
* fix: issue
* fix: ci
* fix: again
* refactor(ui): replace Tooltip title prop with content for consistency
* refactor(Tooltip): improve Tooltip component by extending props and simplifying implementation
- Extend TooltipProps from HeroUITooltipProps instead of redefining
- Remove redundant props and use spread operator for classNames
- Export TooltipProps type for better type support
* refactor(HelpTooltip): rename title prop to content and simplify component
Update HelpTooltip component to use TooltipProps interface and rename title prop to content for consistency
Update all instances where HelpTooltip is used to reflect the prop name change
* refactor(IconTooltips): consolidate tooltip components into unified module
Move HelpTooltip, InfoTooltip, and WarnTooltip into a single IconTooltips directory with shared types
Update exports in components index to use new module structure
* refactor(tooltip): update InfoTooltip prop from title to content and simplify component
Consolidate tooltip props interface and update all instances to use content prop instead of title for consistency. Remove redundant interface definitions and simplify InfoTooltip component implementation.
* refactor(ui): rename WarnTooltip prop from title to content for consistency
Update all instances of WarnTooltip component to use content prop instead of title for better consistency with Tooltip component interface. Also simplify the component props by extending IconTooltipProps type.
* fix(tooltip): update tooltip usage
- Replace deprecated props like `mouseEnterDelay` and `mouseLeaveDelay` with `delay` and `closeDelay`
- Rename `arrow` prop to `showArrow` for better semantics
- Update styling props to use `classNames` instead of inline styles
- Remove unnecessary props like `fresh` and `destroyOnHidden`
* refactor(components): remove redundant placement="top" from Tooltip components
The placement="top" prop was removed from all Tooltip components since it's the default value and redundant. This change improves code cleanliness without affecting functionality.
* fix(HeaderNavbar): add tooltip placement for sidebar toggle buttons
* fix(ui): add delay to tooltip components for better user experience
* refactor(tooltip): adjust tooltip behavior and styling across components
- Remove default delay values from base Tooltip component
- Add delay and closeDelay props to specific tooltip instances
- Fix tooltip compatibility issue with Antd Dropdown
- Adjust tooltip placement and styling in various components
* fix(ui): set closeDelay to 0 for Tooltip components to improve responsiveness
Prevent tooltip delay from causing poor user experience by making them close immediately when mouse leaves the element
* refactor(ui): remove redundant tooltip placement prop
The 'placement="top"' prop was removed from Tooltip components as it's the default value and doesn't need to be explicitly set.
* fix(ui): adjust tooltip delays for better user experience
- Set consistent default delay of 1000ms for window controls
- Increase delay for sidebar toggle tooltips to 2000ms
- Adjust various message action tooltip delays between 600-1200ms
* fix(SelectModelPopup): add delay props to provider settings tooltip
Add delay and closeDelay props to Tooltip component to improve user experience by preventing accidental triggers
* style(HelpTooltip): add cursor help style to improve UX
* fix(components): add tooltip delay and placement props for better UX
Add delay prop to CustomTag and ModelIdWithTags tooltips to prevent flickering
Set placement prop for LocalBackupManager tooltip to top-start
Add closeDelay prop to HelpTooltip in SaveToKnowledgePopup for immediate closing
* refactor(ModelSelectButton): simplify tooltip props by using TooltipProps type
Replace individual tooltip placement props with TooltipProps type from ui library for better maintainability
* fix(ui): remove tooltip close delay for better user experience
* docs(tooltip): add jsdoc comments explaining tooltip wrapper behavior
* refactor(Tooltip): clarify showArrow prop
* fix(Inputbar): set closeDelay to 0 for pause tooltip to improve UX
Prevent tooltip from staying visible after interaction by removing the close delay
* style(InputbarTools): improve tooltip consistency and css formatting
- Add closeDelay to new topic tooltip for consistency
- Remove redundant line breaks in tooltip props
- Format css transition properties for better readability
* chore: add tailwindCSS class attributes to vscode settings
* fix(tooltips): improve tooltip behavior and styling across components
- Add closeDelay=0 to most tooltips for instant closing
- Add custom styling to CitationTooltip and ChatFlowHistory tooltips
- Adjust delay times for navigation tooltips
- Remove conflicting Tooltip wrappers around Popconfirm actions
* refactor(ui): adjust tooltip delays and placements across components
- Remove redundant isOpen prop from CustomNode tooltip
- Standardize tooltip delays and placements in MessageGroupMenuBar, MessageTokens, ChatNavbar
- Simplify tooltip wrapper structure in HeaderNavbar
- Add consistent tooltip delays in MessageGroupModelList
- Set tooltip placements in MinimalToolbar
* refactor(Tooltip): enhance tooltip structure and props
- Add className prop to Tooltip component for better customization
- Wrap children in a div with relative positioning to improve layout
* refactor(Tooltip): enhance props structure for improved customization
- Update Tooltip component to allow optional classNames with a placeholder property
- Modify child wrapper to utilize classNames for better styling control
* refactor(IconTooltips): consolidate icon props into single iconProps object
Replace individual icon styling props (iconColor, iconSize, iconStyle) with a unified iconProps object using LucideProps type. This simplifies the component API and improves maintainability by using a standardized props structure across all icon tooltip components.
* feat(JoplinSettings): add help button to open Joplin documentation
Add a help button in Joplin settings that opens the official Joplin documentation in a minapp popup when clicked. This provides users with quick access to Joplin's help resources.
* feat(NotionSettings): add help link click handler for notion title
Add click handler to open help documentation when clicking on Notion title in settings
* feat(S3Settings): add help link to S3 settings title
Add click handler to open documentation for S3 settings when title is clicked
* feat(settings): add help button for siyuan integration
Add click handler to open help documentation for siyuan integration settings
* feat(yuque-settings): add help button to open yuque token guide
Add a help button in Yuque settings that opens a minapp popup with Yuque's token guide. This helps users easily access documentation for generating API tokens.
* fix(ui): adjust tooltip delay settings for better user experience
Set closeDelay to 0 for reset button tooltip to prevent lingering
Add delay of 500ms for api key list tooltip to avoid accidental triggers
* fix(ModelList): set closeDelay to 0 for all Tooltip components
Prevent tooltips from staying open longer than necessary by immediately closing them on mouse leave
* fix(ui): improve tooltip placement and delay settings
adjust tooltip placement and delay for better user experience
* refactor(tests): update tooltip mock implementation and snapshots
- Consolidate tooltip mock to handle both title and content props
- Remove deprecated placement attributes from snapshots
- Clean up test tooltip content assertions
* refactor: remove unnecessary whitespace and simplify tooltip components
clean up code by removing redundant whitespace and simplifying tooltip component usage across multiple files
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: icarus <eurfelux@gmail.com>
Co-authored-by: MyPrototypeWhat <daoquqiexing@gmail.com>
- Included a new source path for the UI package in the Tailwind CSS configuration to enhance styling capabilities.
- This addition allows for better integration of UI components with Tailwind's utility classes, improving overall design consistency.
- Changed the `name` prop to directly use `providerName` for better readability.
- Updated the `getInitials` prop to use `getFirstCharacter` for improved clarity in the component's functionality.
These changes enhance the maintainability and understanding of the ProviderAvatar component.
- Refactored ProviderAvatar to use the name prop for better clarity.
- Updated ModelAvatar to apply consistent styling using Tailwind CSS for width and height.
- Adjusted useOcrProvider hook to standardize Avatar component usage with dynamic sizing.
These changes enhance the overall consistency and maintainability of the Avatar components across the application.
- Introduced a new SearchableSelector component for improved item selection with search functionality.
- Updated the Selector component to streamline item selection and added type exports for better type safety.
- Refactored the preferenceSchemas to use the new MathEngine type for better clarity.
- Added comprehensive README documentation for the Selector component detailing usage and features.
- Updated various components and stories to utilize the new Selector and SearchableSelector components.
- Deleted the ProviderAvatar component and its associated utility functions and stories to streamline the codebase.
- Updated index.ts to remove the export of ProviderAvatar, ensuring a cleaner component structure.
- Deleted the ProviderLogo styled component from CodeToolsPage, AihubmixPage, and PreprocessProviderSettings to streamline the codebase and eliminate redundancy.
- Introduced a new EmojiAvatar component for enhanced avatar functionality.
- Updated index.ts to export the new EmojiAvatar alongside existing components.
- Removed the old display/EmojiAvatar component to streamline the codebase.
- Adjusted various components to utilize the new Avatar structure and styling.
- Added a new DescriptionSwitch component to enhance the Switch functionality with a description feature.
- Updated the exports in index.ts to include the new DescriptionSwitch alongside existing components.
- Refactored the SettingsTab to utilize DescriptionSwitch for improved UI consistency.
- Removed the InfoPopover component as part of the cleanup process.
* fix(eslint): add Button to restricted antd imports
* feat(ui): add Button component with Storybook stories
Implement a reusable Button component wrapping HeroUIButton with proper TypeScript props.
Add comprehensive Storybook stories demonstrating all button variants, colors, sizes and states.
* refactor(components): update ActionIconButton implementation and usage
Replace onClick with onPress prop and move icon into icon prop
Update component to use @cherrystudio/ui Button instead of antd
Simplify props interface and add displayName
* refactor(ui): migrate antd buttons to @cherrystudio/ui components
update button components across multiple files to use @cherrystudio/ui's Button component
replace antd button props with equivalent @cherrystudio/ui props
* refactor(InputEmbeddingDimension): replace antd Button with custom Button component
Update the Button component to use the custom @cherrystudio/ui Button with updated props for better consistency and maintainability
* refactor(components): migrate buttons from antd to @cherrystudio/ui
Update button components in LocalBackupModals and LocalBackupManager to use @cherrystudio/ui instead of antd
Add flex styling to modal footers for better button alignment
* refactor(ProviderSetting): migrate Button components from antd to @cherrystudio/ui
Update Button components to use @cherrystudio/ui implementation with new props like variant, color, and startContent
Replace onClick handlers with onPress and adjust disabled states
* refactor(ui): migrate antd buttons to cherrystudio ui buttons
Update button components across multiple files to use @cherrystudio/ui Button instead of antd Button
Standardize button props and behavior while maintaining existing functionality
* refactor(NutstorePathSelector): update button props to use cherrystudio ui
Replace antd Button with cherrystudio ui Button component and update props
* refactor(S3BackupManager): migrate antd buttons to @cherrystudio/ui
Update button components from antd to @cherrystudio/ui library
Change button props to match new library's API (variant, color, onPress, etc)
Adjust table props for consistency with new component library
* refactor(TranslateButton): replace styled Button with cherrystudio Button component
The custom styled Button was replaced with the cherrystudio Button component to maintain consistency across the UI and reduce custom styling code. The functionality remains the same but uses the library's built-in props for styling.
* refactor(WebdavBackupManager): replace antd buttons with cherrystudio ui buttons
Update button components to use cherrystudio ui library for consistency
* refactor(ui): migrate buttons from antd to @cherrystudio/ui
Update button components across multiple editor components to use @cherrystudio/ui's Button component instead of antd's. This includes updating props like size, variant, and event handlers to match the new component's API.
* refactor(components): migrate buttons from antd to @cherrystudio/ui
Update button components in HtmlArtifactsCard and HtmlArtifactsPopup to use @cherrystudio/ui's Button component instead of antd's Button. This includes updating props like icon to startContent, onClick to onPress, and type to variant/color.
* refactor(ui): migrate button components from antd to hero ui
- replace antd Button with hero ui Button component
- update button props interface to extend hero ui props
- adjust button props in OAuthButton and MinappPopupContainer
* refactor(MultiSelectionPopup): migrate button components to @cherrystudio/ui
Update button props to match new component library requirements
* refactor(ApiKeyItem): migrate antd buttons to cherrystudio ui components
Update button components in ApiKeyItem to use cherrystudio ui library instead of antd
* refactor(ApiKeyListPopup): update button props to use new UI library syntax
Update button components to use the new syntax from @cherrystudio/ui library, replacing antd Button props with the new variant, color, and isDisabled props. Also adjust icon placement and button types to match the new library's API.
* refactor(SelectModelButton): replace antd Button with custom Button component
Simplify button implementation by using custom Button component from ui library instead of antd. Remove unused styled component and event handling.
* refactor(Preview): migrate ImageToolButton to use @cherrystudio/ui
Update ImageToolButton component to use Button from @cherrystudio/ui instead of antd
Change onClick prop to onPress to match new Button component API
Update related usage in ImageToolbar component
* refactor(ui): migrate buttons from antd to cherrystudio ui components
Update button components across multiple files to use cherrystudio's Button component instead of antd's. This includes updating props like onClick to onPress and adjusting button styling props to match the new component's API.
* refactor(ui): migrate antd buttons to @cherrystudio/ui buttons
Update button components from antd to @cherrystudio/ui library
Adjust button props to match new component API
* refactor(components): update prop names and component usage
- Rename onClick to onPress in ImageToolButton test props
- Update isLoading to loading in S3BackupManager table props
- Change ghost to variant in ProviderSetting button props
- Replace antd Button with cherrystudio Button in PreferenceBasicTests
* refactor(ImageToolButton): migrate from antd to @cherrystudio/ui
* refactor(FilesPage): migrate Button components from antd to @cherrystudio/ui
* refactor(SearchMessage): migrate Button components from antd to @cherrystudio/ui
* refactor(TopicMessages): migrate Button components from antd to @cherrystudio/ui
* refactor(TopicsHistory): migrate Button components from antd to @cherrystudio/ui
* refactor(ChatNavigation): migrate Button components from antd to @cherrystudio/ui
* refactor(CitationsList): migrate Button components from antd to @cherrystudio/ui
* refactor(MessageGroupMenuBar): migrate Button components from antd to @cherrystudio/ui
* refactor: reorganize button imports and adjust class order
Consolidate Button imports from @cherrystudio/ui to be grouped with other imports
Standardize className order for consistency across components
* refactor(SelectModelPopup): replace HStack with Flex component for layout
* feat: migrate PrivacyPopup from antd Button to @cherrystudio/ui Button
- Replace antd Button import with @cherrystudio/ui Button
- Update onClick to onPress event handler
- Update type="primary" to variant="solid" color="primary"
- Maintain existing functionality while following Hero UI API
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: migrate NewTopicButton from antd Button to @cherrystudio/ui Button
- Replace antd Button import with @cherrystudio/ui Button
- Update size="small" to size="sm"
- Update icon prop to startContent for Hero UI API
- Update onClick to onPress event handler
- Maintain existing styled-components with StyledButton wrapper
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: migrate MessageMcpTool Buttons from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update two Button components with Hero UI API:
- size="small" to size="sm"
- onClick to onPress
- variant="filled" to variant="solid"
- Move icons to startContent prop
- Maintain Dropdown.Button as antd component (not migrated)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: migrate SettingsTab Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update settings icon button with Hero UI API:
- type="text" to variant="light"
- size="small" to size="sm"
- icon prop to isIconOnly with child content
- onClick to onPress event handler
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: migrate AssistantTagsPopup Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update delete tag button with Hero UI API:
- type="text" to variant="light"
- danger prop to color="danger"
- icon prop to isIconOnly with child content
- onClick to onPress event handler
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: migrate UpdateAppButton from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update styled Button component with Hero UI API:
- onClick to onPress event handler
- icon prop to startContent
- color="orange" to color="warning" (closest equivalent)
- variant="outlined" to variant="bordered"
- size="small" to size="sm"
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(NewTopicButton): replace styled-components with cn utility
Simplify component styling by removing styled-components in favor of the cn utility
* refactor: organize imports and remove unused event handlers
remove duplicate Button imports and clean up stopPropagation handlers
* feat: migrate KnowledgeContent Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update settings icon Button with Hero UI API:
- type="text" to variant="light"
- size="small" to size="sm"
- icon prop to isIconOnly with child content
- onClick to onPress event handler
- Update ResponsiveButton styled component selector:
- .ant-btn-icon + span to [data-slot="icon"] + [data-slot="label"]
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: migrate KnowledgeDirectories Buttons from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update three Button components with Hero UI API:
- Refresh button: type="text" to variant="light", icon to isIconOnly, onClick to onPress
- Delete button: type="text" danger to variant="light" color="danger", icon to isIconOnly, onClick to onPress
- Add directory button: type="primary" to variant="solid" color="primary", icon to startContent, disabled to isDisabled
- Remove stopPropagation from add directory button as not needed with onPress
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: migrate KnowledgeFiles Buttons from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update three Button components with Hero UI API:
- Add file button: type="primary" to variant="solid" color="primary", icon to startContent, disabled to isDisabled
- Refresh button: type="text" to variant="light", icon to isIconOnly, onClick to onPress
- Delete button: type="text" danger to variant="light" color="danger", icon to isIconOnly, onClick to onPress
- Remove stopPropagation from add file button as not needed with onPress
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: migrate KnowledgeNotes Buttons from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update three Button components with Hero UI API:
- Add note button: type="primary" to variant="solid" color="primary", icon to startContent, disabled to isDisabled
- Edit button: type="text" to variant="light", icon to isIconOnly, onClick to onPress
- Delete button: type="text" danger to variant="light" color="danger", icon to isIconOnly, onClick to onPress
- Remove stopPropagation from add note button as not needed with onPress
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: migrate KnowledgeSitemaps Buttons from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update three Button components with Hero UI API:
- Add sitemap button: type="primary" to variant="solid" color="primary", icon to startContent, disabled to isDisabled
- Refresh button: type="text" to variant="light", icon to isIconOnly, onClick to onPress
- Delete button: type="text" danger to variant="light" color="danger", icon to isIconOnly, onClick to onPress
- Remove stopPropagation from add sitemap button as not needed with onPress
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: migrate KnowledgeUrls Buttons from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update three Button components with Hero UI API:
- Add URL button: type="primary" to variant="solid" color="primary", icon to startContent, disabled to isDisabled
- Refresh button: type="text" to variant="light", icon to isIconOnly, onClick to onPress
- Delete button: type="text" danger to variant="light" color="danger", icon to isIconOnly, onClick to onPress
- Remove stopPropagation from add URL button as not needed with onPress
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: migrate KnowledgeVideos Buttons from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update three Button components with Hero UI API:
- Add video button: type="primary" to variant="solid" color="primary", icon to startContent, disabled to isDisabled
- Refresh button: type="text" to variant="light", icon to isIconOnly, onClick to onPress
- Delete button: type="text" danger to variant="light" color="danger", icon to isIconOnly, onClick to onPress
- Remove stopPropagation from add video button as not needed with onPress
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: migrate MinAppsPage Buttons from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update two settings Button components with Hero UI API:
- type="text" to variant="light"
- icon prop to isIconOnly with child content
- onClick to onPress event handler
- Maintain className="nodrag" for draggable interface
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: migrate MiniAppSettings Buttons from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update two Button components with Hero UI API:
- Swap button: onClick to onPress event handler
- Reset button: onClick to onPress event handler
- Buttons use default Hero UI styling without additional props
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: migrate NewAppButton from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update two Button components with Hero UI API:
- Upload button: icon to startContent
- Save button: type="primary" htmlType="submit" to variant="solid" color="primary" type="submit"
- Maintain form submission functionality with type="submit"
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: standardize button imports from @cherrystudio/ui
* refactor(KnowledgeContent): replace icon prop with startContent in Button
Improve consistency with component library by using startContent prop instead of children for icons
* refactor(KnowledgeVideos): update button components to use startContent prop
Use startContent prop for icons in buttons to improve consistency with the design system
* refactor(MinAppsPage): improve button component structure by using startContent prop
* feat: migrate AihubmixPage Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update Button props with Hero UI API:
- size="small" to size="sm"
- icon to startContent
- onClick to onPress
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: migrate DmxapiPage Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update Button props with Hero UI API:
- size="small" to size="sm"
- icon to startContent
- onClick to onPress
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: migrate NewApiPage Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update Button props with Hero UI API:
- size="small" to size="sm"
- icon to startContent
- onClick to onPress
- type="primary" to variant="solid" color="primary"
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: migrate SiliconPage Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update Button props with Hero UI API:
- size="small" to size="sm"
- icon to startContent
- onClick to onPress
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: migrate TokenFluxPage Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update Button props with Hero UI API:
- size="small" to size="sm"
- icon to startContent
- onClick to onPress
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: migrate ZhipuPage Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update Button props with Hero UI API:
- type="text" to variant="light"
- icon to startContent
- onClick to onPress
- disabled to isDisabled
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: migrate Artboard Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update Button props with Hero UI API:
- onClick to onPress for NavigationButton and CancelButton
- type="link" to variant="light"
- Maintain styled-components usage for NavigationButton and CancelButton
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: migrate DynamicFormRender Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update Button props with Hero UI API:
- icon to startContent
- onClick to onPress
- size="small" to size="sm"
- danger to color="danger"
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: convert Button inline styles to Tailwind CSS
- Replace style={{borderTopLeftRadius: 0, borderBottomLeftRadius: 0, height: '32px'}} with className="rounded-l-none h-8"
- Replace style={{flexShrink: 0, minWidth: 'auto', padding: '0 8px'}} with className="shrink-0 min-w-0 px-2"
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: migrate ImageUploader Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update Button props with Hero UI API:
- size="small" to size="sm"
- onClick to onPress
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(Artboard): replace inline styles with tailwind classes
Use tailwind classes for consistent styling of navigation buttons instead of inline styles
* feat: migrate AboutSettings Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update Button props with Hero UI API:
- onClick to onPress for all Button components
- loading to isLoading for CheckUpdateButton
- disabled to isDisabled for CheckUpdateButton
- Maintain CheckUpdateButton styled component
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: migrate AssistantMemorySettings Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update Button props with Hero UI API:
- type="text" to variant="light" + isIconOnly
- icon to startContent
- onClick to onPress
- size="small" to size="sm"
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: migrate AssistantModelSettings Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update Button props with Hero UI API:
- icon to startContent
- onClick to onPress
- variant="filled" to variant="solid"
- danger + type="primary" to color="danger" variant="solid"
- Add isIconOnly for icon-only buttons
- Maintain ModelSelectButton styled component
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: migrate AssistantPromptSettings Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update Button props with Hero UI API:
- type="primary" to variant="solid" color="primary"
- icon to startContent
- onClick to onPress
- Convert inline styles to Tailwind CSS:
- style={{fontSize: 18, padding: '4px', minWidth: '28px', height: '28px'}} to className="text-lg p-1 min-w-7 h-7"
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: consolidate Button imports from @cherrystudio/ui
Move all Button imports from @cherrystudio/ui to be grouped with other imports from the same package for better consistency and maintainability
* feat: migrate AssistantRegularPromptsSettings Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update Button props with Hero UI API:
- type="text" to variant="light"
- icon to startContent
- onClick to onPress
- Add isIconOnly for icon-only buttons
- danger to color="danger"
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: migrate DataSettings Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Update Button props with Hero UI API:
- onClick to onPress for all buttons
- icon to startContent for backup/restore buttons
- danger to color="danger" for reset button
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(NutstoreSettings): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handlers
- Update type/danger props to variant/color system
- Convert loading to isLoading prop
- Convert disabled to isDisabled prop
- Update ghost prop to variant="ghost"
- Add isIconOnly for folder icon button
- Migrate startContent pattern for icons
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(S3Settings): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handlers
- Convert icon props to startContent pattern
- Convert loading to isLoading prop
- Convert disabled to isDisabled prop
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(SiyuanSettings): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handler
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(WebDavSettings): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handlers
- Convert icon props to startContent pattern
- Convert loading to isLoading prop
- Convert disabled to isDisabled prop
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(YuqueSettings): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handler
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(DisplaySettings): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handlers
- Convert icon props to startContent pattern
- Convert variant="text" to variant="light"
- Add isIconOnly for icon-only buttons
- Replace inline styles with Tailwind CSS classes
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(PreprocessProviderSettings): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handler
- Convert type="text" to variant="light"
- Convert size="small" to size="sm"
- Convert icon to startContent pattern
- Add isIconOnly for icon-only button
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(NotionSettings): replace antd Button with cherrystudio Button and update prop
Update the Button import to use cherrystudio's component instead of antd's
* refactor(settings): migrate Button props to use startContent and isDisabled
Update Button components in LocalBackupSettings to use startContent instead of icon and isDisabled instead of disabled for consistency with the updated UI library
* refactor(JoplinSettings): replace Button import and update onPress prop
Use Button component from @cherrystudio/ui instead of antd
Update onClick to onPress for consistency with component API
* refactor(MarkdownExportSettings): replace antd Button with cherrystudio Button in markdown export
Update the Button component import and props to use the cherrystudio UI library version instead of antd for consistency
* refactor: organize imports in settings components
Move Button import from cherrystudio/ui to be grouped with other imports from the same package for better consistency and readability
* refactor(AddMcpServerModal): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert icon prop to startContent pattern
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(BuiltinMCPServerList): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handler
- Convert type="text" to variant="light"
- Convert size="small" to size="sm"
- Convert icon to startContent pattern
- Convert disabled to isDisabled prop
- Add isIconOnly for icon-only button
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(InstallNpxUv): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handlers
- Convert type="primary" to variant="solid" color="primary"
- Convert type="link" to variant="light"
- Convert shape="circle" to radius="full"
- Convert size="small" to size="sm"
- Convert loading/disabled to isLoading/isDisabled
- Convert icon to startContent pattern
- Add isIconOnly for icon-only button
- Convert green color to success color
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(McpServerCard): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handlers (removing e.stopPropagation)
- Convert type="text" to variant="light"
- Convert size="small" to size="sm"
- Convert shape="circle" to radius="full"
- Convert danger to color="danger"
- Convert icon to startContent pattern
- Add isIconOnly for icon-only buttons
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(MCPSettings): reorder Button imports for consistency
Move Button imports to be grouped with other UI component imports for better readability and maintainability
* refactor(McpServersList): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handlers
- Convert type="default" to variant="solid"
- Convert shape="round" to radius="full"
- Convert icon to startContent pattern
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(McpServerCard): remove unused event parameter from click handlers
The event parameter was not being used in handleOpenUrl and onClickDetails handlers, so it was removed to simplify the code.
* refactor(McpServerCard): remove data-no-dnd attribute from Button
* refactor(McpSettings): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handlers
- Convert danger to color="danger"
- Convert type="text" to variant="light"
- Convert type="primary" to variant="solid" color="primary"
- Convert shape="round" to radius="full"
- Convert loading/disabled to isLoading/isDisabled
- Convert icon to startContent pattern
- Add isIconOnly for icon-only button
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(McpSettingsNavbar): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handler
- Convert type="text" to variant="light"
- Convert size="small" to size="sm"
- Convert icon to startContent pattern
- Replace inline styles with Tailwind CSS classes
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(NpxSearch): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handler
- Convert type="text" to variant="light"
- Convert size="small" to size="sm"
- Convert icon to startContent pattern
- Add isIconOnly for icon-only button
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(SyncServersPopup): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handlers
- Convert type="default" to variant="solid"
- Convert type="primary" to variant="solid" color="primary"
- Convert loading/disabled to isLoading/isDisabled
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(MCPSettings/index): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert type="default" to variant="solid"
- Convert shape="circle" to radius="full"
- Convert icon to startContent pattern
- Add isIconOnly for icon-only button
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(MemorySettings): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handlers
- Convert type="text" to variant="light"
- Convert type="primary" to variant="solid" color="primary"
- Convert size="large" to size="lg"
- Convert size="small" to size="sm"
- Convert loading/disabled to isLoading/isDisabled
- Convert danger to color="danger"
- Convert icon to startContent pattern
- Add isIconOnly for icon-only buttons
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(UserSelector): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handler
- Convert type="default" to variant="solid"
- Convert icon to startContent pattern
- Add isIconOnly for icon-only button
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(DefaultAssistantSettings): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handler
- Convert type="text" to variant="light"
- Convert icon to startContent pattern
- Add isIconOnly for icon-only button
- Replace inline styles with Tailwind CSS classes
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(QuickModelPopup): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handler
- Change icon prop to startContent
- Update type="text" to variant="light"
- Add isIconOnly prop for icon-only button
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(NotesSettings): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handler for all buttons
- Change type="default" to variant="solid"
- Change type="primary" to color="primary"
- Update loading to isLoading prop
- Update disabled to isDisabled prop
- Change icon prop to startContent
- Replace inline style with Tailwind CSS class (ml-2)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(AnthropicSettings): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handler
- Change type="primary" to color="primary"
- Update loading to isLoading prop
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(ModelEditContent): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handler for all buttons
- Change size="small" to size="sm"
- Update icon prop to startContent for save and reset buttons
- Change iconPosition="end" to endContent for more settings toggle
- Update type="text" to variant="light" and add isIconOnly for reset button
- Change type="primary" to color="primary"
- Replace htmlType="submit" with type="submit"
- Update variant="filled" to variant="solid"
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(ModelTypeSelector): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handler
- Change size="small" to size="sm"
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(GithubCopilotSettings): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handler for all buttons
- Change type="primary" to color="primary"
- Change type="primary" danger to color="danger"
- Update size="small" to size="sm"
- Update loading to isLoading prop
- Update disabled to isDisabled prop
- Change icon prop to startContent for copy button
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(AddModelPopup): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Change type="primary" to color="primary"
- Replace htmlType="submit" with type="submit"
- Change size="middle" to size="md"
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(ModelList): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handler for all buttons
- Change type="text" to variant="light" and add isIconOnly for icon button
- Change type="primary" to color="primary"
- Change type="default" to variant="solid"
- Update disabled to isDisabled prop
- Change icon prop to startContent for all buttons
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(ModelListGroup): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handler
- Change type="text" to variant="light"
- Update disabled to isDisabled prop
- Change icon prop to startContent
- Remove e.stopPropagation() as no longer needed
- Add isIconOnly prop for icon-only button
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(ModelListItem): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handler for both buttons
- Change type="text" to variant="light"
- Update disabled to isDisabled prop
- Change icon prop to startContent for both buttons
- Add isIconOnly prop for icon-only buttons
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(NewApiAddModelPopup): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Change type="primary" to color="primary"
- Replace htmlType="submit" with type="submit"
- Change size="middle" to size="md"
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(NewApiBatchAddModelPopup): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Change type="primary" to color="primary"
- Replace htmlType="submit" with type="submit"
- Change size="middle" to size="md"
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(ProviderList): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handler
- Update disabled to isDisabled prop
- Change icon prop to startContent
- Keep existing style attributes for custom styling
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(ProviderOAuth): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handler for both buttons
- Change shape="round" to radius="full"
- Change icon prop to startContent for both buttons
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(UrlSchemaInfoPopup): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handler
- Change type="link" to variant="light"
- Change size="small" to size="sm"
- Change icon prop to startContent
- Add isIconOnly prop for icon-only button
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(QuickAssistantSettings): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handler for both styled buttons
- Change type="primary" to color="primary"
- Change type="default" to color="default"
- Update styled component to use new Button from @cherrystudio/ui
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(QuickPhraseSettings): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handler for all buttons
- Change type="text" to variant="light"
- Change icon prop to startContent for all buttons
- Change danger prop to color="danger"
- Add isIconOnly prop for all icon-only buttons
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(SelectionAssistantSettings): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handler for both buttons
- Change type="link" to variant="light"
- Change icon prop to startContent
- Keep existing style attributes for custom styling
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(ActionsListItem): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handler for all buttons
- Change type="link" to variant="light"
- Change size="small" to size="sm"
- Change danger prop to color="danger"
- Add isIconOnly prop for all icon-only buttons
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(MacProcessTrustHintModal): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handler for both buttons
- Change type="link" to variant="light"
- Change type="primary" to color="primary"
- Keep existing style attributes for custom styling
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(SelectionActionSearchModal): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handler
- Change type="link" to variant="light"
- Change size="small" to size="sm"
- Keep existing style attributes for custom styling
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(SelectionFilterListModal): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handler for both modal buttons
- Change type="primary" to color="primary"
- Keep existing key attributes for modal footer
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(SettingsActionsListHeader): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handlers
- Update icon prop to startContent with Plus icon
- Change disabled to isDisabled
- Add color="primary" for primary button style
- Update styled ResetButton to use variant="light"
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(ShortcutSettings): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handlers for all buttons
- Update icon prop to startContent for icon buttons
- Change disabled to isDisabled
- Convert size="small" to size="sm"
- Replace shape="circle" with isIconOnly for circular buttons
- Migrate reset undo button, clear button, and reset all button
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(ApiServerSettings): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handlers for all buttons
- Update icon prop to startContent for documentation and copy buttons
- Change type="primary" to color="primary"
- Convert type="link" to variant="light" for regenerate button
- Change disabled to isDisabled for input button and regenerate button
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(CustomLanguageModal): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handlers for modal footer buttons
- Change type="primary" to color="primary" for save button
- Convert icon prop to startContent with isIconOnly for emoji button
- Migrate cancel, save, and emoji picker buttons to Hero UI API
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(CustomLanguageSettings): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handlers for all buttons
- Update icon prop to startContent for edit, delete, and add buttons
- Change type="primary" to color="primary" for add button
- Convert danger prop to color="danger" for delete button
- Migrate table action buttons and primary add button to Hero UI API
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(AddSubscribePopup): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert type="primary" to color="primary" for submit button
- Change htmlType="submit" to type="submit" following Hero UI API
- Migrate form submit button from antd to Hero UI
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(BlacklistSettings): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handlers for all buttons
- Change type="primary" to color="primary" for subscribe buttons
- Convert ghost prop to variant="ghost"
- Change disabled to isDisabled for all button states
- Migrate save, add subscribe, update subscribe, and delete buttons
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(WebSearchProviderSetting): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handlers for API key list and check buttons
- Change type="text" to variant="light" for API key list button
- Convert icon prop to startContent with isIconOnly for list button
- Update size="small" to size="sm"
- Change ghost prop to variant="ghost" and type to color for check button
- Convert disabled to isDisabled for API checking state
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(TranslateSettings): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress for more settings button
- Simple migration for modal footer button
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(MigrateApp): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handlers for all migration buttons
- Change type="primary" to color="primary" for primary buttons
- Convert disabled to isDisabled for migration in progress button
- Change size="small" to size="sm" for debug button
- Convert type="dashed" to variant="bordered" for styled buttons
- Migrate all buttons in migration workflow stages
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(SelectionActionApp): migrate Button from antd to @cherrystudio/ui
- Replace antd Button import with @cherrystudio/ui Button
- Convert onClick to onPress handlers for all window control buttons
- Change type="text" to variant="light" for all title bar buttons
- Update icon prop to startContent for pin, opacity, minimize, and close buttons
- Add isIconOnly prop for all icon-only buttons in the title bar
- Migrate styled WinButton component to use Hero UI Button as base
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* style(ActionIconButton): remove fixed dimensions and add size prop
Simplify button styling by removing fixed height/width and using size="sm" prop instead
* refactor(AssistantPromptSettings): migrate from antd Popover to hero-ui components
Replace antd Popover with hero-ui Popover and Tooltip components for better consistency
Rename EmojiButtonWrapper to EmojiDeleteButtonWrapper for clarity
* style(AssistantModelSettings): add size prop to delete button in model settings
* style(settings): standardize button sizes and replace Space.Compact with Flex
Consistently apply 'sm' size to buttons across settings components and replace deprecated Space.Compact with Flex component for better layout consistency
* refactor(ApiServerSettings): replace custom buttons with standard Button component
remove custom styled InputButton and RegenerateButton components in favor of using the standard Button component with appropriate props
* style(ProviderSetting): make settings button icon-only for consistency
* style(ui): update icon styling and button props
remove global lucide icon color override
update button components to use consistent props
* style(ProviderList): adjust button size to match design
* feat(theme): add foreground color calculation for primary theme
Calculate and set foreground color based on primary theme color to ensure proper contrast
* style(KnowledgeFiles): make button size consistent with other buttons
* test: update test snapshots for button components
Update test snapshots to reflect changes in button styling and accessibility attributes. The changes include updated class names, ripple effects, and focus states.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
Co-authored-by: MyPrototypeWhat <daoquqiexing@gmail.com>
- Added tests mock path to tsconfig.node.json for improved test coverage.
- Refactored AppUpdater to use preferenceService for language retrieval instead of configManager.
- Updated AppUpdater tests to mock preferenceService and ensure correct language handling in release notes.
- Changed import statements to use type imports for better clarity in MessageMcpTool component.
* style(eslint): reorganize eslint config comments and rules
Move comments to consistent positions above their corresponding rules
Update antd import restriction to include 'message' component
* fix(eslint): reorganize eslint config to enable custom rules
* fix(eslint): update antd import restriction to include message
Prevent direct imports of both Flex and message from antd, enforcing usage of custom components
* feat(migration): add toast utilities to migrate and test apps
Initialize toast utilities on window object for both migration and test applications to enable toast notifications
* build(ui): add path aliases for types and utils modules
* refactor(toast): move toast utilities to ui package for better reusability
Centralize toast utilities in the @cherrystudio/ui package to improve code organization and reuse across multiple components. This change includes:
- Moving toast implementation to ui package
- Updating all imports to use the new location
- Adding proper type definitions
* refactor: replace antd message with window.toast for consistency
Replace all instances of antd's message component with window.toast throughout the application to maintain consistent notification behavior. Also add an ignore rule for dataRefactorTest files in eslint config.
- Simplified Selector component usage in SettingsTab by removing deprecated props and updating to the new API.
- Added size and label props to enhance accessibility and user experience.
- Ensured consistent handling of selected keys and selection change events across multiple instances of Selector.
* refactor(eslint): reorganize eslint config for better maintainability
Move ignores section and oxlint configs to be grouped with other configurations
* fix(eslint): update antd import restriction to include Switch
Add Switch to restricted imports from antd to enforce using custom components
* feat(ui): add Switch component wrapper and update imports
Add a wrapper for the Switch component from @heroui/react and export it through @cherrystudio/ui. Update eslint rules to prevent direct imports from @heroui/react and update imports in TranslateSettings to use the new wrapper
* refactor(ui): replace antd Switch with custom Switch component
Migrate all instances of antd Switch component to the custom Switch component from @cherrystudio/ui. This includes updating props from `checked` to `isSelected` and `onChange` to `onValueChange` to match the new component's API. Also updates size prop from `small` to `sm` where applicable.
The change ensures consistency across the UI and reduces dependency on antd components. All affected files have been updated to use the new Switch component with proper prop mappings.
* feat(ui): enhance Switch component with loading state
Add loading state support to Switch component by showing a spinner when isLoading is true and disabling interaction during loading. Update all Switch component usages to use the new isLoading prop instead of loading.
* fix(Switch): prevent thumbIcon override when isLoading is true
Implement type constraints to disallow thumbIcon when isLoading is true
Add ref forwarding support and export enhanced props type
* fix(settings): update Switch component props to use consistent naming
Change deprecated 'defaultChecked' and 'disabled' props to 'defaultSelected' and 'isDisabled' respectively to match component library updates
* refactor(Switch): simplify type definition by removing redundant ref prop
* refactor(Switch): simplify props type definition for loading state
Remove complex union type in favor of simpler interface extending SwitchProps
* docs(ui): add jsdoc for CustomizedSwitch component
Add documentation for the CustomizedSwitch component to clarify its purpose and the isLoading prop usage
* fix(eslint): comment out heroui import restriction rule
Temporarily disable the heroui import restriction to allow direct imports while wrapped components are being updated
* style: fix formatting and spacing in settings components
- Refactored the Selector component stories to use a more concise JSX format, improving readability.
- Ensured consistent formatting across size variations for better maintainability.
- Replaced the existing Selector component with a new implementation using HeroUI's Select and SelectItem.
- Updated the props structure to support items and selection change handling.
- Added a new story file for the Selector component, showcasing various use cases including single and multiple selection modes, size variations, and disabled states.
- Improved type definitions for better clarity and usability.
* refactor(components): rename HStack and VStack to RowFlex and ColFlex for clarity
rename HStack to RowFlex and VStack to ColFlex across all components to better reflect their purpose as flex containers with row and column directions. This improves code readability and maintainability while keeping the same functionality. All references to these components have been updated accordingly.
* refactor(layout): migrate layout components from .ts to .tsx
The layout components have been moved from TypeScript (.ts) to TypeScript with JSX (.tsx) to better support JSX syntax and improve type safety. The functionality remains unchanged.
* refactor(Layout): convert styled Box component to functional component
Improve maintainability by converting styled-component to a functional component with explicit style props. This provides better type safety through CSSProperties interface and makes the component easier to debug.
* refactor(Layout): restructure Box component and convert styled components to functional
- Replace styled-components with functional components for Stack and Center
- Rename style variable to _style in Box component to avoid naming conflict
- Add style prop to Box component to allow external style overrides
* refactor(components): rename HSpaceBetweenStack to SpaceBetweenRowFlex for clarity
* refactor(Layout): pass through props in Stack components
Allow additional props to be passed to Stack and its variants for better flexibility. Convert RowFlex from styled component to regular component for consistency.
* refactor(Layout): convert SpaceBetweenRowFlex from styled to component
Improve maintainability by converting styled component to a regular component that explicitly passes justifyContent prop
* refactor(Layout): convert ColFlex to component and type RowFlex props
Improve type safety by explicitly omitting flexDirection from StackProps and convert ColFlex from styled component to regular component for consistency
* refactor(Layout): convert BaseTypography from styled to component
Improve type safety and maintainability by converting styled component to regular React component with TypeScript interface
* refactor(Layout): remove unused BaseTypography component
* refactor(Layout): remove unused Container component and interface
* refactor(layout): rename Stack to Flex and use CSSProperties types
The Stack component was renamed to Flex to better reflect its purpose and align with common naming conventions. The interface properties were also updated to use CSSProperties types for better type safety and consistency with CSS standards.
* refactor(Layout): move FlexProps interface and comment out unused ButtonProps
Clean up component interfaces by moving FlexProps closer to its usage and commenting out unused ButtonProps interface to reduce clutter
* refactor(layout): standardize flex props from alignItems/justifyContent to align/justify
The changes standardize the flex-related props in the Layout component and across multiple files from using alignItems/justifyContent to the shorter align/justify. This improves consistency and reduces verbosity in the codebase while maintaining the same functionality.
All instances of alignItems have been replaced with align and justifyContent with justify in Flex, RowFlex, ColFlex and related components. The changes are purely syntactic and do not affect the actual layout behavior.
This refactoring makes the code more maintainable by using a consistent naming convention for flex properties throughout the application.
* refactor(Layout): extend BoxProps with React div props
* feat(Layout): add flexWrap prop to Flex component interface
Add flexWrap property to FlexProps interface to support CSS flex-wrap functionality. Also replace antd Flex with custom Flex component in TagFilterSection.
* refactor(components): replace antd Flex with custom Layout components
Consolidate Flex component usage across multiple files by replacing antd's Flex with custom Layout components (Flex, ColFlex, RowFlex) for better maintainability and consistency
* refactor(components): migrate antd Flex tu custom Flex
* refactor(components): update layout component usage for consistency
replace RowFlex with ColFlex where appropriate and align prop names
* refactor(tests): rename HStack to RowFlex in test components
Update test snapshots and mock components to reflect the component name change from HStack to RowFlex
Remove unused data-vertical attribute from preview container
* refactor(Layout): pass through props and merge styles in Box and Flex components
Improve component flexibility by allowing additional props to pass through and properly merging style objects in both Box and Flex components
* refactor(Layout): make Flex component props optional with undefined defaults
* test: update TagFilterSection snapshot to include wrap style
* perf(Layout): optimize Box component style calculation with useMemo
* docs: fix typo in Layout component comment
* refactor(Layout): update BoxProps to use CSSProperties types
Standardize prop types by using CSSProperties for style-related props to improve type safety and consistency with React's style system
* feat(Layout): add wrap prop to Flex component
* style(TagFilterSection): update snapshot styling to use flex-wrap property
* refactor(Layout): simplify layout components by using Tailwind CSS classes
Remove custom style calculations and props in favor of Tailwind utility classes
* refactor: replace inline styles with Tailwind CSS classes for consistent styling
style: update spacing and alignment utilities across components
* refactor(tests): update test snapshots to use tailwind classes
Replace inline styles with tailwind classes in test snapshots and update test assertions to match. This improves consistency with the codebase's styling approach.
* style: adjust spacing and gaps in UI components for consistency
* style: replace inline styles with tailwind classes for consistency
Refactor various components to use tailwind classes instead of inline styles to maintain consistency and improve readability. Changes include:
- Replacing style attributes with tailwind classes for spacing, margins, and padding
- Standardizing gap sizes across components
- Using tailwind for width, height, and other layout properties
- Updating test files to match new class names
* style(settings): replace inline styles with tailwind classes for consistency
Refactor settings components to use tailwind gap utility instead of inline styles for better maintainability and consistency across the codebase
* refactor(styles): replace inline styles with tailwind classes for consistency
* feat(eslint): add rule to restrict antd Flex imports
Enforce using custom Layout components instead of antd's Flex by adding a restricted import rule
* refactor: migrate flex layout from antd props to tailwind classes
- Replace antd Flex component props with tailwind classes for consistency
- Update gap and alignment values to use tailwind's spacing scale
- Remove unused antd Flex imports to clean up dependencies
* style(settings): adjust spacing and layout in various settings components
- Add gap spacing between elements in multiple settings components
- Remove redundant flex class in some components
- Standardize gap sizes across related components
* refactor(ui): replace inline styles with tailwind classes for consistency
Replace various inline style attributes with equivalent tailwind classes across multiple components to maintain consistent styling approach. Changes include margin, padding, width, and flex properties.
- Convert style attributes to tailwind classes
- Standardize spacing values using tailwind's spacing scale
- Improve maintainability by using utility classes
* style(ui): adjust spacing in model list group header
* style(css): wrap base styles in @layer for better organization
* style(css): fix indentation and nesting in global styles
* style(settings): adjust spacing in model list and convert subtitle to cn
Refactor SettingSubtitle to use cn utility for better className handling
Add gap spacing between model list items for improved layout
* style(css): move some styles from base layer to outer in index.css
* refactor(components): replace HStack with RowFlex for consistency
Update layout components to use RowFlex instead of HStack to maintain consistent naming
* style: reorder imports in useAppInit and BaseApiClient files
* fix(MinAppTabsPool): wrong import path
* refactor: update style file extensions from scss to css
Update file extensions and comments to reflect the change from SCSS to CSS stylesheets
* feat(layout): add Flex component and its variants
Introduce new Flex component with Box, RowFlex, SpaceBetweenRowFlex, ColFlex and Center variants to provide reusable layout components
* refactor: migrate layout components to @cherrystudio/ui package
This commit updates all imports of layout components (Box, Flex, RowFlex, ColFlex, etc.) from '@renderer/components/Layout' to '@cherrystudio/ui' across the codebase. The change also includes updating related test files and eslint configuration to reflect this migration. This refactoring aims to centralize layout components in a shared package for better maintainability and consistency.
* docs(eslint): update comment and restricted imports rule
Update comment to clarify the purpose of the rule and add a TODO note for future migration
* docs(ui): update migration status for layout components
Mark Layout/* components as migrated and refactored in both Chinese and English documentation
* docs: update migration status for Layout components
- Refactored CustomCollapse to utilize Accordion and AccordionItem from HeroUI, simplifying props and improving functionality.
- Updated ToolsCallingIcon to accept TooltipProps for better customization.
- Revised stories for CustomCollapse to reflect new prop structure and added examples for various use cases.
- Cleaned up unnecessary props and improved documentation in story files.
- Added @storybook/addon-themes to package.json and yarn.lock for theme support in Storybook.
- Updated CustomCollapse component to utilize HeroUI's Accordion and AccordionItem for improved functionality and styling.
- Removed the ReasoningIcon component as it was deemed unnecessary.
- Enhanced ProviderAvatar component to ensure consistent className handling.
- Added new stories for FileIcons, SvgSpinners180Ring, and ToolsCallingIcon to showcase their usage and variations.
* style(linter): enable consistent-type-imports rule in typescript
* chore: add biome to lint script for improved code formatting
* chore: add oxlint-specific lint script for faster linting
* refactor: use type-only imports for better type safety and clarity
- Increased the refactored component count to 18 and reduced pending migrations to 184 in the migration status files.
- Improved the Ellipsis, ListItem, MaxContextCount, and ThinkingEffect components by simplifying their structure and enhancing styling.
- Updated the tsconfig.json to adjust the root directory for better project organization.
- Removed unnecessary alias configurations in tsdown.config.ts for cleaner setup.
- Added new stories for Ellipsis and ListItem components to improve documentation and showcase their usage.
- Renamed "State Management" to "Data Management" in CLAUDE.md for clarity.
- Enhanced data management section with detailed descriptions of Cache System, Preference System, and User Data API.
- Updated README.md in shared/data to reflect new directory structure and provide clearer organization of type definitions and schemas.
- Added guidelines for selecting appropriate data access patterns based on data characteristics.
- Refactored EmojiIcon, ExpandableText, and ProviderAvatar components for better readability and consistency.
- Simplified JSX structure and improved styling in ExpandableText and EmojiAvatar stories.
- Enhanced code formatting in various files for improved maintainability.
- Added type="button" to button elements in DividerWithText and Icon stories for better accessibility and to prevent unintended form submissions.
- Improved code consistency across button components in the UI stories.
- Updated migration status to reflect the migration of additional components, reducing the total migrated count to 34 and increasing the refactored count to 14.
- Enhanced component files by refactoring several components to improve structure and styling, including CopyButton, CustomTag, and IndicatorLight.
- Added new stories for components such as CopyButton, CustomCollapse, and DividerWithText to improve documentation and showcase usage.
- Adjusted TypeScript configuration to include story files for better type checking.
- Refactored tests in MainTextBlock and ThinkingBlock to utilize the usePreference hook for managing user settings.
- Updated snapshots in DraggableVirtualList test to reflect changes in class names.
- Enhanced export tests to ensure proper handling of markdown formatting and citation footnotes.
- Mocked additional dependencies globally for improved test reliability.
- Reformatted keywords and files array in package.json for better readability.
- Updated migration status to reflect the migration of additional components, increasing the total migrated count to 46 and reducing pending migrations to 190.
- Added new components to the migration status table, including ErrorBoundary and ProviderAvatar, while removing deprecated components like ErrorTag, SuccessTag, and WarnTag.
- Added "@typescript-eslint/visitor-keys@npm:8.43.0" to yarn.lock.
- Refactored getVirtualIndexes in DraggableVirtualList to use item.index.
- Replaced useSettings with usePreference for codeFancyBlock in SettingsTab.
- Updated Switch component to use setCodeFancyBlock directly.
- Added "packages/ui/scripts/**" to .oxlintrc.json for linting.
- Excluded ".claude/**" from biome.jsonc.
- Refactored API path types in apiPaths.ts for better clarity.
- Updated error handling in errorCodes.ts to ensure stack trace is always available.
- Modified preferenceSchemas.ts to include new features and updated generated timestamp.
- Cleaned up tsconfig.json for better organization.
- Adjusted CustomTag component to improve rendering logic.
- Enhanced CodeEditor utility functions for better type safety.
- Improved Scrollbar story for better readability.
- Refactored CacheService to streamline comments and improve documentation.
- Updated useCache and useSharedCache hooks for better clarity and functionality.
- Cleaned up selectionStore and settings.ts by commenting out deprecated actions.
- Updated DataApiHookTests for better optimistic update handling.
* refactor(CodeEditor): decouple CodeEditor and global settings
* refactor: improve language extension fallbacks
* refactor: make a copy of CodeEditor in the ui package
* refactor: update ui CodeEditor and language list
* refactor: use CodeEditor from the ui package
* feat: add a story for CodeEditor
- Updated package.json to version 2.0.0-alpha, reflecting significant changes.
- Refactored cache management by integrating useCache hooks across various components, enhancing state management and performance.
- Replaced useRuntime references with useMinapps in multiple components to streamline minapp state handling.
- Improved type safety in cache schemas and updated related components to utilize new types.
- Removed deprecated runtime actions and streamlined the codebase for better maintainability.
- Added Storybook scripts for development and building the UI components.
- Updated package.json to include new dependencies for Storybook and styled-components.
- Revised README to reflect changes in Tailwind CSS configuration, transitioning to v4 and removing the tailwind.config.js file.
- Enhanced the tsdown configuration to mark additional peer dependencies as external.
- Removed outdated Tailwind CSS configuration file to streamline the setup.
- Updated README.md to reflect the expanded testing framework for CacheService, including detailed test modules and scenarios.
- Added CacheService tests for direct API, hooks, advanced features, and stress testing.
- Refactored TestApp to incorporate CacheService tests alongside existing PreferenceService tests, improving organization and accessibility.
- Adjusted component styling to support dark mode and ensure consistent UI across test components.
- Updated migration status documentation to reflect the migration of 43 components, with 193 pending.
- Enhanced the component status table with new entries for MaxContextCount, CollapsibleSearchBar, ImageToolButton, and InfoPopover.
- Added implementations for the new components, improving the UI library's functionality.
- Updated index.ts to export the newly added components for better accessibility.
- Updated migration status documentation to reflect the migration of 38 components, with 198 pending.
- Enhanced the component status table with new entries for ListItem and EditableNumber.
- Added ListItem and EditableNumber components with their respective implementations and styles.
- Updated index.ts to export the newly added components for improved accessibility.
- Updated migration status documentation to reflect the migration of 36 components, with 200 pending.
- Enhanced the component status table with new entries for CustomCollapse, EmojiAvatar, ResetIcon, OcrIcon, ToolIcon, WrapIcon, UnWrapIcon, HelpTooltip, Selector, and WarnTooltip.
- Updated index.ts to export the newly added components for improved accessibility.
- Updated migration status documentation to reflect the migration of 26 components, with 210 pending.
- Enhanced the component status table with detailed descriptions and categorized components.
- Introduced new components: CustomTag, ErrorTag, SuccessTag, WarnTag, CopyIcon, DeleteIcon, EditIcon, and RefreshIcon.
- Updated index.ts to export the newly added components for improved accessibility.
- Moved CacheService functionality to a new implementation in @data/CacheService, enhancing modularity.
- Updated all references across the codebase to utilize the new cacheService instance.
- Removed the old CacheService files from both main and renderer directories to streamline the codebase.
- Introduced migration status documentation in both English and Chinese to track the progress of the UI component library migration.
- Added new UI components including CopyButton, DividerWithText, EmojiIcon, IndicatorLight, Spinner, TextBadge, and various display and icon components.
- Updated the index.ts file to export the newly added components for easier access.
- Enhanced the directory structure and component classification guidelines for better organization and clarity.
- Introduced a new TypeScript definition file (index.ts) to support the newly added UI component library.
- This file will facilitate better type checking and autocompletion for developers using the library.
- Introduced a new UI component library for Cherry Studio, including various components such as buttons, inputs, and layout elements.
- Updated configuration files to include the new library and its dependencies.
- Enhanced the project structure to support modular imports and TypeScript definitions for better development experience.
- Changed the import of navbar position hook from useSettings to useNavbarPosition for better clarity.
- Updated style imports from index.scss to index.css for consistency across components.
- Created a CODEOWNERS file to specify ownership for migrations and data directories.
- Assigned ownership to @0xfullex for the specified paths to streamline code review and management.
- Updated preferences configuration with new user theme options including font family and code font family.
- Added new preferences for chat and export menus.
- Adjusted default preferences to include new settings for user theme.
- Enhanced useUserTheme hook to manage new font family preferences.
- Eliminated AbortSignal handling from ApiClient interface and DataApiService to streamline request processing.
- Updated IpcAdapter to remove event sender logic for responses, aligning with the new direct IPC approach.
- Adjusted tests to reflect the removal of cancellation capabilities, emphasizing that direct IPC requests cannot be cancelled.
- Cleaned up related code and comments to enhance clarity and maintainability.
- Introduced new IPC channels for Data API requests and responses in IpcChannel.
- Added swr library to package.json for improved data fetching capabilities.
- Updated preload API to include Data API related methods for handling requests and subscriptions.
- Removed deprecated pending_default_values.ts file as part of data refactor.
- Removed deprecated selection IPC channels from IpcChannel.
- Replaced string literals with enums for SelectionTriggerMode and SelectionFilterMode in preference management.
- Updated the SelectionService and selectionStore to utilize the new enum types for better type safety and clarity.
- Marked selectionStore as deprecated for future removal after data refactoring.
- Replaced instances of useSettings with usePreference for better preference handling across various components.
- Updated function signatures to support async operations where necessary.
- Adjusted imports to utilize shared configuration for prompts, enhancing consistency in prompt management.
- Improved error handling and logging in AI-related functionalities.
- Replaced useSettings with usePreference in PinnedMinapps and useMinappPopup components for better preference handling.
- Added external dependency for Electron in electron.vite.config.ts and set output format to CommonJS.
- Updated preferences types in preferences.ts to use PreferenceTypes for better type safety.
- Added new preference keys related to notes features in preferences.ts.
- Enhanced documentation in PreferenceService.ts and usePreference.ts to clarify usage and update strategies.
- Improved caching and subscription mechanisms in PreferenceService for better performance and reliability.
- Introduced a detailed SettingsState interface, incorporating various user preferences such as showAssistants, language settings, proxy configurations, and more.
- Updated initialState to reflect the new comprehensive settings structure, ensuring all preferences are initialized correctly.
- Cleaned up commented-out code and organized settings for improved clarity and maintainability.
- Enhanced type safety by integrating new types for various settings, aligning with recent refactoring efforts in preference management.
- Updated various components to utilize the usePreference hook, replacing previous useSettings references for improved consistency and maintainability.
- Introduced new preference types for ChatMessageStyle, ChatMessageNavigationMode, and MultiModelMessageStyle to enhance type safety.
- Refactored preference handling in multiple files, ensuring a more streamlined approach to managing user preferences.
- Cleaned up unused code and comments related to previous settings for better clarity and maintainability.
- Updated auto-generated preference mappings to reflect recent changes in preference structure.
- Commented out the UpgradeChannel enum in constant.ts and moved it to preferenceTypes.ts for better organization.
- Updated various components to utilize the new UpgradeChannel type from preferenceTypes, enhancing type safety and consistency.
- Refactored preference handling across multiple files to streamline the use of the usePreference hook, replacing previous settings references.
- Cleaned up unused code and comments related to previous settings for improved maintainability.
- Updated auto-generated preference mappings to reflect recent changes in preference structure.
- Updated preference handling to utilize the usePreference hook across various components, improving consistency and maintainability.
- Introduced new preference types for ProxyMode and MultiModelFoldDisplayMode to enhance type safety.
- Refactored components to replace useSettings with usePreference, streamlining preference management.
- Cleaned up unused code and comments related to previous settings for better clarity.
- Updated auto-generated preference mappings to reflect recent changes in preference structure.
- Updated preferences to include new confirmation settings for message actions, allowing users to customize action confirmations.
- Refactored components to utilize the usePreference hook for improved preference handling, replacing previous useSettings references.
- Introduced new types for AssistantIconType and SidebarIcon to enhance type safety.
- Cleaned up unused code and comments related to previous settings for better maintainability.
- Updated auto-generated preference mappings to reflect recent changes in preference structure.
- Updated preference keys from 'app.theme.*' to 'ui.*' for better organization and clarity.
- Introduced new preferences for assistant tab sorting and visibility.
- Refactored components to utilize the updated preference keys, improving consistency across the codebase.
- Cleaned up unused code and comments related to previous settings for maintainability.
- Updated auto-generated preference mappings to reflect the new structure.
- Updated preferences to utilize the new SendMessageShortcut type for better type safety.
- Refactored components to use the usePreference hook instead of useSettings for improved preference handling.
- Added new preferences for target language and send message shortcut in various components.
- Cleaned up unused code and comments related to settings for better maintainability.
- Updated auto-generated preference mappings to reflect recent changes in preference structure.
- Commented out the App_SetDisableHardwareAcceleration IPC channel and related code for hardware acceleration settings.
- Updated preferences to utilize the new WindowStyle type for window style settings.
- Refactored components to use the usePreference hook instead of useSettings for better preference management.
- Cleaned up unused code and comments related to hardware acceleration and window style for improved maintainability.
- Commented out the App_SetLanguage IPC channel and related language management code.
- Updated preferences to use LanguageVarious type for language settings.
- Removed the locales utility file and adjusted imports to utilize preferenceService for language management.
- Cleaned up unused code and comments related to language handling for improved maintainability.
- Removed the App_SetTheme IPC channel and related theme management code.
- Updated imports to use preferenceTypes for theme and selection action items.
- Refactored preference service to preload preferences and adjusted related components.
- Cleaned up unused code and comments related to theme management.
- Enhanced the organization of preference-related types and actions for better maintainability.
Replaced the ActionItem type with SelectionActionItem in the processAction method for better type safety. Removed unused imports related to ActionItem in ActionTranslate component.
- Updated the preferences configuration to use `defaultActionItems` instead of an empty array for `feature.selection.action_items`, enhancing default behavior.
- Removed the `useSelectionAssistant` hook as it was no longer needed, streamlining the codebase.
- Changed sandbox mode from true to false in SelectionService to improve security and functionality.
- Removed unnecessary blank line in entryPoint.tsx for cleaner code.
- Updated ActionTranslate component to use the new SelectionActionItem type for better type safety.
- Introduced new types for selection management: `SelectionActionItem`, `SelectionFilterMode`, and `SelectionTriggerMode` to improve type safety across the application.
- Updated `PreferencesType` to utilize these new types, ensuring better consistency and clarity in preference definitions.
- Refactored `SelectionService` and related components to adopt the new types, enhancing the handling of selection actions and preferences.
- Cleaned up deprecated types and improved the overall structure of preference management, aligning with recent updates in the preference system.
- Introduced `PreferenceNotifier` class to replace `EventEmitter`, enhancing performance and memory efficiency for preference change notifications.
- Refactored `PreferenceService` to utilize the new notifier for managing subscriptions and notifications.
- Updated `SelectionService` to adopt the new subscription model, improving the handling of preference changes and ensuring proper cleanup of listeners.
- Enhanced subscription statistics and debugging capabilities within the notifier.
- Updated `PreferenceService` to notify change listeners immediately upon fetching uncached values.
- Refactored subscription logic to simplify auto-subscribing to preference keys.
- Modified `usePreference` and `useMultiplePreferences` hooks to improve handling of default values and subscription behavior.
- Enhanced `SelectionAssistantSettings` to include detailed logging of preference states for better debugging.
- Introduced `PreferenceUpdateOptions` interface to configure update behavior.
- Enhanced `set` and `setMultiple` methods in `PreferenceService` to support both optimistic and pessimistic update strategies, allowing for immediate UI feedback or database-first updates.
- Updated `usePreference` and `useMultiplePreferences` hooks to accept options for flexible update strategies.
- Improved handling of concurrent updates with request queues and rollback mechanisms for optimistic updates.
- Enhanced documentation in hooks to clarify usage of update strategies.
- Updated the preferences configuration with new shortcut definitions and types for better management.
- Introduced a method to get and subscribe to preference changes in the PreferenceService, improving reactivity.
- Refactored SelectionService to utilize the new preference management system, enhancing code clarity and maintainability.
- Updated SelectionAssistantSettings to use the new preference hooks for managing selection settings.
- Adjusted the generated preferences file to reflect the latest configuration changes.
- Moved IPC handler logic for preference operations from ipc.ts to PreferenceService.
- Introduced a unified method for registering IPC handlers, improving code organization and maintainability.
- Enhanced preference change notification system with optimized performance and added support for main process listeners.
This commit updates the dataRefactorTest README to include new features such as real-time UI linkage for theme, language, and zoom preferences, as well as interactive slider controls for various settings. The TestApp component is modified to support dynamic window identification and theme monitoring. Additionally, the PreferenceBasicTests, PreferenceMultipleTests, and PreferenceServiceTests components are enhanced with slider functionality for numerical preferences, improving the testing capabilities for cross-window synchronization and user experience.
This commit refactors the PreferenceService to improve type safety for preference handling and updates the listener management system. It renames methods for clarity, ensuring that preference changes are properly notified to all relevant listeners. Additionally, the usePreference hook is updated to align with these changes, enhancing the overall consistency and reliability of preference management in the application.
This commit updates the PreferenceService by adding public access modifiers to several methods, improving code clarity and consistency. It also refines the caching logic to eliminate unnecessary type assertions and streamline the handling of preference values. Additionally, minor formatting adjustments are made for better readability across the service and related hooks.
This commit refactors the PreferenceService to use named exports for better consistency and updates the DbService import accordingly. It introduces a testing mechanism for the PreferenceService by creating test windows to facilitate cross-window preference synchronization testing. Additionally, improvements are made to the usePreference hook for better performance and stability, ensuring efficient preference management in the application.
This commit introduces a new alias '@data' in the Electron Vite configuration for easier access to the data directory. Additionally, the TypeScript configuration is updated to include path mapping for '@data/*', enhancing module resolution. Several test files related to the PreferenceService have been removed, streamlining the test suite and focusing on essential functionality.
This commit introduces a new IPC channel and handler for fetching all user preferences at once, enhancing the efficiency of preference management. The PreferenceService is updated with a getAll method to retrieve all preferences from the memory cache, and the renderer-side PreferenceService is adjusted to support this new functionality. Additionally, type safety improvements are made across the preference handling code, ensuring better consistency and reducing potential errors.
This commit refines the preference management system by introducing type safety for preference keys and values, ensuring better consistency across the application. It updates IPC handlers for getting and setting preferences to utilize the new types, improving code clarity and reducing potential errors. Additionally, the PreferenceService is adjusted to align with these changes, enhancing the overall robustness of preference operations.
This commit introduces new IPC channels for getting, setting, and subscribing to preferences, enhancing the application's ability to manage user preferences. It also updates the preferences interface to use a consistent naming convention and refactors the preference seeding and migration processes to align with these changes. Additionally, the PrefService has been removed as it is no longer needed.
This commit introduces a new transaction method in DbService to manage database operations with automatic rollback on error and commit on success. It enhances the PreferencesMigrator to support batch migration operations, improving the efficiency of migrating preferences from multiple sources. Additionally, the migration UI is updated to reflect progress during backup and migration stages, providing clearer feedback to users.
This commit introduces new IPC channels for sending and retrieving Redux persist data during the migration process. It enhances the DataRefactorMigrateService with methods to cache and manage Redux data, ensuring a smoother migration experience. Additionally, the MigrateApp component is updated to extract Redux data from localStorage and send it to the main process, improving the overall migration flow and user experience.
This commit updates the migration window dimensions for improved usability, sets explicit entry points for preload scripts, and enhances the overall layout of the migration interface. It introduces new styles for buttons and alerts, improves the structure of the migration steps, and refines the user experience with clearer feedback and options during the migration process.
This commit modifies the migration window dimensions and properties for improved usability, allowing for resizing and maximizing. It also introduces new icons for different migration stages, updates localized messages for clarity, and enhances the overall layout of the migration interface, including adjustments to the alert messages and step indicators for better user guidance during the migration process.
This commit introduces additional stages to the migration process, including 'backup_required', 'backup_progress', and 'backup_confirmed', improving user guidance during data migration. It also adds new IPC channels for proceeding to backup and retrying migration, along with enhanced error handling and logging throughout the migration flow. The user interface has been updated to reflect these changes, providing clearer feedback and options during the migration process.
This commit introduces new IPC channels for starting the migration flow, restarting the application, and closing the migration window. It also updates the migration logic to improve user interaction and error handling during the migration process. Additionally, the migration interface has been enhanced with a step indicator and localized messages for better user experience.
This commit renames the data migration files for clarity, changing `dataMigrate.html` to `dataRefactorMigrate.html` and updating the corresponding service imports. It also enhances the migration logic by implementing a new `app_state` table structure and removing deprecated migration files, streamlining the overall migration process.
This commit refines the data migration process by ensuring that migration checks occur before window creation and improves the logging of migration events. It also consolidates IPC handlers specific to migration within the MigrateService, allowing for better management of migration-related tasks. Additionally, the HTML for the data migration interface has been updated to enhance security policies.
This commit introduces a new data migration service with various IPC channels for migration tasks, including checking if migration is needed, starting the migration, and tracking progress. Additionally, the database architecture section has been added to the documentation, detailing the use of SQLite with Drizzle ORM, migration standards, and JSON field handling. Legacy migration files for ElectronStore and Redux have been removed as they are now deprecated.
This commit introduces an auto-generated preferences configuration file, replacing the previous manual definitions. The new structure is based on the latest classification.json and includes comprehensive settings for various application features. The auto-generation process ensures that the preferences are up-to-date and consistent with the defined classifications.
- Added `get-tsconfig` dependency version 4.10.1 to yarn.lock.
- Updated schema path in sqlite-drizzle.config.ts from './src/main/db/schema/*' to './src/main/db/schemas/*'.
- Removed unused files: columnHelpers.ts, preference.ts, seed/index.ts, and seed/preferenceSeed.ts to clean up the codebase.
- Added better-sqlite3, drizzle-orm, drizzle-kit, and their respective type definitions.
- Updated various esbuild-related packages to their latest versions.
- Enhanced package management for improved compatibility and performance.
2025-05-20 12:40:17 +08:00
1251 changed files with 64341 additions and 18374 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.
- **Loaders**: Support for various file formats (PDF, DOCX, EPUB, etc.)
### Build System
- **Electron-Vite**: Development and build tooling (v4.0.0)
- **Rolldown-Vite**: Using experimental rolldown-vite instead of standard vite
- **Workspaces**: Monorepo structure with `packages/` directory
- **Multiple Entry Points**: Main app, mini window, selection toolbar
- **Styled Components**: CSS-in-JS styling with SWC optimization
### Testing Strategy
- **Vitest**: Unit and integration testing
- **Playwright**: End-to-end testing
- **Component Testing**: React Testing Library
- **Coverage**: Available via `yarn test:coverage`
### Key Patterns
- **IPC Communication**: Secure main-renderer communication via preload scripts
- **Service Layer**: Clear separation between UI and business logic
- **Plugin Architecture**: Extensible via MCP servers and middleware
- **Multi-language Support**: i18n with dynamic loading
- **Theme System**: Light/dark themes with custom CSS variables
### UI Design
The project is in the process of migrating from antd & styled-components to HeroUI. Please use HeroUI to build UI components. The use of antd and styled-components is prohibited.
- **ORM**: Drizzle ORM with comprehensive migration system
- **Schemas**: Located in `src/main/data/db/schemas/` directory
#### Database Standards
- **Table Naming**: Use singular form with snake_case (e.g., `topic`, `message`, `app_state`)
- **Schema Exports**: Export using `xxxTable` pattern (e.g., `topicTable`, `appStateTable`)
- **Field Definition**: Drizzle auto-infers field names, no need to add default field names
- **JSON Fields**: For JSON support, add `{ mode: 'json' }`, refer to `preference.ts` table definition
- **JSON Serialization**: For JSON fields, no need to manually serialize/deserialize when reading/writing to database, Drizzle handles this automatically
- **Timestamps**: Use existing `crudTimestamps` utility
- **Migrations**: Generate via `yarn run migrations:generate`
## Data Access Patterns
The application uses three distinct data management systems. Choose the appropriate system based on data characteristics:
### Cache System
- **Purpose**: Temporary data that can be regenerated
- **Lifecycle**: Component-level (memory), window-level (shared), or persistent (survives restart)
- **Use Cases**: API response caching, computed results, temporary UI state
- **APIs**: `useCache`, `useSharedCache`, `usePersistCache` hooks, or `cacheService`
### Preference System
- **Purpose**: User configuration and application settings
- **Lifecycle**: Permanent until user changes
- **Use Cases**: Theme, language, editor settings, user preferences
- **APIs**: `usePreference`, `usePreferences` hooks, or `preferenceService`
### User Data API
- **Purpose**: Core business data (conversations, files, notes, etc.)
@@ -65,7 +65,28 @@ The Test Plan aims to provide users with a more stable application experience an
### 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/YOUR_ORG/YOUR_REPO/issues/10162) (please replace with your actual repo link).
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!
This project employs a **User-Segmented Dual Licensing** model.
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
**Core Principle:**
Preamble
* **Individual Users and Organizations with 10 or Fewer Individuals:** Governed by default under the **GNU Affero General Public License v3.0 (AGPLv3)**.
* **Organizations with More Than 10 Individuals:** **Must** obtain a **Commercial License**.
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
Definition: "10 or Fewer Individuals"
Refers to any organization (including companies, non-profits, government agencies, educational institutions, etc.) where the total number of individuals who can access, use, or in any way directly or indirectly benefit from the functionality of this software (Cherry Studio) does not exceed 10. This includes, but is not limited to, developers, testers, operations staff, end-users, and indirect users via integrated systems.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
---
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
**1. Open Source License: AGPLv3 - For Individuals and Organizations of 10 or Fewer**
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
* If you are an individual user, or if your organization meets the "10 or Fewer Individuals" definition above, you are free to use, modify, and distribute Cherry Studio under the terms of the **AGPLv3**. The full text of the AGPLv3 can be found in the LICENSE file at [https://www.gnu.org/licenses/agpl-3.0.html](https://www.gnu.org/licenses/agpl-3.0.html).
* **Core Obligation:** A key requirement of the AGPLv3 is that if you modify Cherry Studio and make it available over a network, or distribute the modified version, you must provide the **complete corresponding source code** under the AGPLv3 license to the recipients. Even if you qualify under the "10 or Fewer Individuals" rule, if you wish to avoid this source code disclosure obligation, you will need to obtain a Commercial License (see below).
* Please read and understand the full terms of the AGPLv3 carefully before use.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
**2. Commercial License - For Organizations with More Than 10 Individuals, or Users Needing to Avoid AGPLv3 Obligations**
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
* **Mandatory Requirement:** If your organization does **not** meet the "10 or Fewer Individuals" definition above (i.e., 11 or more individuals can access, use, or benefit from the software), you **must** contact us to obtain and execute a Commercial License to use Cherry Studio.
* **Voluntary Option:** Even if your organization meets the "10 or Fewer Individuals" condition, if your intended use case **cannot comply with the terms of the AGPLv3** (particularly the obligations regarding **source code disclosure**), or if you require specific commercial terms **not offered** by the AGPLv3 (such as warranties, indemnities, or freedom from copyleft restrictions), you also **must** contact us to obtain and execute a Commercial License.
* **Common scenarios requiring a Commercial License include (but are not limited to):**
* Your organization has more than 10 individuals who can access, use, or benefit from the software.
* (Regardless of organization size) You wish to distribute a modified version of Cherry Studio but **do not want** to disclose the source code of your modifications under AGPLv3.
* (Regardless of organization size) You wish to provide a network service (SaaS) based on a modified version of Cherry Studio but **do not want** to provide the modified source code to users of the service under AGPLv3.
* (Regardless of organization size) Your corporate policies, client contracts, or project requirements prohibit the use of AGPLv3-licensed software or mandate closed-source distribution and confidentiality.
* The Commercial License grants you rights exempting you from AGPLv3 obligations (like source code disclosure) and may include additional commercial assurances.
* **Obtaining a Commercial License:** Please contact the Cherry Studio development team via email at **bd@cherry-ai.com** to discuss commercial licensing options.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
**3. Contributions**
The precise terms and conditions for copying, distribution and
modification follow.
* We welcome community contributions to Cherry Studio. All contributions submitted to this project are considered to be offered under the **AGPLv3** license.
* By submitting a contribution to this project (e.g., via a Pull Request), you agree to license your code under the AGPLv3 to the project and all its downstream users (regardless of whether those users ultimately operate under AGPLv3 or a Commercial License).
* You also understand and agree that your contribution may be included in distributions of Cherry Studio offered under our commercial license.
TERMS AND CONDITIONS
**4. Other Terms**
0. Definitions.
* The specific terms and conditions of the Commercial License are governed by the formal commercial license agreement signed by both parties.
* The project maintainers reserve the right to update this licensing policy (including the definition and threshold for user count) as needed. Updates will be communicated through official project channels (e.g., code repository, official website).
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
@@ -286,6 +287,14 @@ We believe the Enterprise Edition will become your team's AI productivity engine
</picture>
</a>
# 📜 License
The Cherry Studio Community Edition is governed by the standard GNU Affero General Public License v3.0 (AGPL-3.0), available at https://www.gnu.org/licenses/agpl-3.0.html.
Use of the Cherry Studio Community Edition for commercial purposes is permitted, subject to full compliance with the terms and conditions of the AGPL-3.0 license.
Should you require a commercial license that provides an exemption from the AGPL-3.0 requirements, please contact us at bd@cherry-ai.com.
> This technical documentation was automatically generated by Claude Code based on analysis of the current OCR implementation in the codebase. The content reflects the architecture as of the current branch state.
# OCR Architecture
## Overview
Cherry Studio's OCR (Optical Character Recognition) system is a modular, extensible architecture designed to support multiple OCR providers and file types. The architecture follows a layered approach with clear separation of concerns between data access, business logic, and provider implementations.
## Architecture Layers
The OCR architecture follows a layered approach where data interactions occur through RESTful APIs, while IPC serves as part of the API layer, allowing the renderer to interact directly with the business layer:
- **AI Enhancement**: Post-processing and accuracy improvements
## Development Guidelines
### Adding New Providers
1. Create provider service extending `OcrBaseService`
2. Define provider-specific configuration schema
3. Register provider in `OcrService`
4. Add configuration UI components
5. Include comprehensive tests
> [!WARNING]
> Provider services should never directly access the data layer. All data operations must go through the OCR Service layer to maintain proper separation of concerns.
### Configuration Changes
1. Update provider configuration schema
2. Add migration logic for existing configurations
3. Update UI validation and error handling
4. Test with various configuration scenarios
> [!WARNING]
> Always validate configuration changes before saving to the database. Use Zod schemas for runtime validation to prevent corrupted provider configurations.
### Testing
- **Unit Tests**: Provider implementation testing
- **Integration Tests**: End-to-end OCR workflows
- **Performance Tests**: Resource usage and timing
This directory contains shared type definitions and schemas for the Cherry Studio data management systems. These files provide type safety and consistency across the entire application.
## 📁 Directory Structure
```
packages/shared/data/
├── api/ # Data API type system
│ ├── index.ts # Barrel exports for clean imports
│ ├── apiSchemas.ts # API endpoint definitions and mappings
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.