Updated the Inputbar and AgentSessionInputbar components to use the new cacheService for managing draft persistence and mentioned models, ensuring consistency across the application.
docs: update CLAUDE.md with PR workflow details
Add critical section about Pull Request workflow requirements including reading the template, following all sections, never skipping, and proper formatting
* fix(ApiService): handle stream errors properly in checkApi
Ensure stream errors are properly caught and thrown when checking API availability
* docs(types): add type safety comment for ResponseError
Add FIXME comment highlighting weak type safety in ResponseError type
* feat(dom): extend scrollIntoView with Chromium-specific options
Add ChromiumScrollIntoViewOptions interface to support additional scroll container options
* refactor(hooks): optimize timer and scroll position hooks
- Use useMemo for scrollKey in useScrollPosition to avoid unnecessary recalculations
- Refactor useTimer to use useCallback for all functions to prevent unnecessary recreations
- Reorganize function order and improve cleanup logic in useTimer
* fix: stabilize home scroll behavior
* Update src/renderer/src/pages/home/Messages/ChatNavigation.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix(utils/dom): add null check for element in scrollIntoView
Prevent potential runtime errors by gracefully handling falsy elements with a warning log
* fix(hooks): use ref for scroll key to avoid stale closure
* fix(useScrollPosition): add cleanup for scroll handler to prevent memory leaks
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix(i18n): remove image-generation translations and clarify endpoint type
Update English locale to specify OpenAI for image generation
Add comments to clarify image-generation endpoint type relationship
* fix(i18n): correct portuguese translations in pt-pt.json
fix(reasoning): handle reasoning effort none case properly
separate undefined and none reasoning effort cases
clean up redundant model checks and add fallback logging
Fix the issue where doubao provider could not infer models using the name field.
Refactored `isDeepSeekHybridInferenceModel` to use `withModelIdAndNameAsId`
utility function to check both model.id and model.name, avoiding duplicate
calls in `isReasoningModel`.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
- Convert all image formats to PNG before writing to clipboard to ensure compatibility
- Refactor handleCopyImage to unify image source handling (Base64, File, URL)
- Add convertImageToPng utility function using canvas API for robust conversion
- Remove fallback logic that attempted to write unsupported JPEG format
* refactor(api): extract version regex into constant for reuse
Move the version matching regex pattern into a module-level constant to improve code reuse and maintainability. The functionality remains unchanged.
* refactor(api): rename regex constant and use dynamic regex construction
Use a string pattern for version regex to allow dynamic construction and improve maintainability. Rename constant to better reflect its purpose.
* feat(api): add getLastApiVersion utility function
Implement a utility function to extract the last API version segment from URLs. This is useful for handling cases where multiple version segments exist in the path and we need to determine the most specific version being used.
Add comprehensive test cases covering various URL patterns and edge cases.
* feat(api): add utility to remove trailing API version from URLs
Add withoutTrailingApiVersion function to clean up URLs by removing version segments
at the end of paths. This helps standardize API endpoint URLs when version is not needed.
* refactor(api): rename isSupportedAPIVerion to supportApiVersion for clarity
* fix(gemini): handle api version dynamically for non-vertex providers
Use getLastApiVersion utility to determine the latest API version for non-vertex providers instead of hardcoding to v1beta
* feat(api): add function to extract trailing API version from URL
Add getTrailingApiVersion utility function to specifically extract API version segments
that appear at the end of URLs. This complements existing version-related utilities
and helps handle cases where we only care about the final version in the path.
* refactor(gemini): use getTrailingApiVersion instead of getLastApiVersion
The function name was changed to better reflect its purpose of extracting the trailing API version from the URL. The logic was also simplified and made more explicit.
* refactor(api): remove unused getLastApiVersion function
The function was removed as it was no longer needed, simplifying the API version handling to only use trailing version detection. The trailing version regex was extracted to a constant for reuse.
- Add data-classify tools for data inventory extraction and code generation
- Include consolidated Chinese documentation (README.md)
- Update generated file path references
This temporary directory will be removed after V2 refactor is complete.
- Replace direct Redux state access for memory preferences with preferenceService calls in multiple components.
- Introduce new preference mappings for memory settings, including 'feature.memory.auto_dimensions'.
- Remove deprecated preference mappings and update default preferences accordingly.
- Regenerate preference schemas to reflect the latest changes in memory configuration.
* feat(options): implement deep merging for provider options
Add deep merge functionality to preserve nested properties when combining provider options. The new implementation handles object merging recursively while maintaining type safety.
* refactor(tsconfig): reorganize include paths in tsconfig files
Clean up and reorder include paths for better maintainability and consistency between tsconfig.node.json and tsconfig.web.json
* test: add aiCore test configuration and script
Add new test configuration for aiCore package and corresponding test script in package.json to enable running tests specifically for the aiCore module.
* fix: format
* fix(aiCore): resolve test failures and update test infrastructure
- Add vitest setup file with global mocks for @cherrystudio/ai-sdk-provider
- Fix context assertions: use 'model' instead of 'modelId' in plugin tests
- Fix error handling tests: update expected error messages to match actual behavior
- Fix streamText tests: use 'maxOutputTokens' instead of 'maxTokens'
- Fix schemas test: update expected provider list to match actual implementation
- Fix mock-responses: use AI SDK v5 format (inputTokens/outputTokens)
- Update vi.mock to use importOriginal for preserving jsonSchema export
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(aiCore): add alias mock for @cherrystudio/ai-sdk-provider in tests
The vi.mock in setup file doesn't work for source code imports.
Use vitest resolve.alias to mock the external package properly.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(aiCore): disable unused-vars warnings in mock file
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(aiCore): use import.meta.url for ESM compatibility in vitest config
__dirname is not available in ESM modules, use fileURLToPath instead.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(aiCore): use absolute paths in vitest config for workspace compatibility
- Use path.resolve for setupFiles and all alias paths
- Extend aiCore vitest.config.ts from root workspace config
- Change aiCore test environment to 'node' instead of 'jsdom'
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* docs(factory): improve mergeProviderOptions documentation
Add detailed explanation of merge behavior with examples
* test(factory): add tests for mergeProviderOptions behavior
Add test cases to verify mergeProviderOptions correctly handles primitive values, arrays, and nested objects during merging
* refactor(tests): clean up mock responses test fixtures
Remove unused mock streaming chunks and error responses to simplify test fixtures
Update warning details structure in mock complete responses
* docs(test): clarify comment in generateImage test
Update comment to use consistent 'model id' terminology instead of 'modelId'
* test(factory): verify array replacement in mergeProviderOptions
---------
Co-authored-by: suyao <sy20010504@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
* feat: enhance support for AWS Bedrock and Azure OpenAI providers
* fix: resolve PR review issues for AWS Bedrock support
- Fix header.ts logic bug: change && to || for Vertex/Bedrock provider check
- Fix regex in reasoning.ts to match AWS Bedrock model format (anthropic.claude-*)
- Add test coverage for AWS Bedrock format in isClaude4SeriesModel
- Add Bedrock provider tests including anthropicBeta parameter
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* fix(provider): update service tier support logic for OpenAI and Azure providers
* fix(settings): enhance OpenAI settings visibility logic with verbosity support
Previously, JSON-type custom parameters were incorrectly parsed and stored
as objects in the UI layer, causing API requests to fail when getCustomParameters()
attempted to JSON.parse() an already-parsed object.
Changes:
- AssistantModelSettings.tsx: Remove JSON.parse() in onChange handler, store as string
- reasoning.ts: Add comments explaining JSON parsing flow
- BaseApiClient.ts: Add comments for legacy API clients
* feat(test): e2e framework
Add Playwright-based e2e testing framework for Electron app with:
- Custom fixtures for electronApp and mainWindow
- Page Object Model (POM) pattern implementation
- 15 example test cases covering app launch, navigation, settings, and chat
- Comprehensive README for humans and AI assistants
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(tests): update imports and improve code readability
- Changed imports from 'import { Page, Locator }' to 'import type { Locator, Page }' for better type clarity across multiple page files.
- Reformatted waitFor calls in ChatPage and HomePage for improved readability.
- Updated index.ts to correct the export order of ChatPage and SidebarPage.
- Minor adjustments in electron.fixture.ts and electron-app.ts for consistency in import statements.
These changes enhance the maintainability and clarity of the test codebase.
* chore: update linting configuration to include tests directory
- Added 'tests/**' to the ignore patterns in .oxlintrc.json and eslint.config.mjs to ensure test files are not linted.
- Minor adjustment in electron.fixture.ts to improve the fixture definition.
These changes streamline the linting process and enhance code organization.
* fix(test): select main window by title to fix flaky e2e tests on Mac
On Mac, the app may create miniWindow for QuickAssistant alongside mainWindow.
Using firstWindow() could randomly select the wrong window, causing test failures.
Now we wait for the window with title "Cherry Studio" to ensure we get the main window.
Also removed unused electron-app.ts utility file.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* refactor(models): improve verbosity level handling for GPT-5 models
Replace hardcoded verbosity configuration with validator functions
Add support for GPT-5.1 series models
* test(models): restructure model utility tests into logical groups
Improve test organization by grouping related test cases under descriptive describe blocks for better maintainability and readability. Each model utility function now has its own dedicated test section with clear subcategories for different behaviors.
* fix: add null check for model in getModelSupportedVerbosity
Handle null model case defensively by returning default verbosity
* refactor(config): remove redundant as const from MODEL_SUPPORTED_VERBOSITY array
* refactor(models): simplify validator function in MODEL_SUPPORTED_VERBOSITY
* test(model utils): add tests for undefined/null input handling
* fix(models): handle undefined/null input in getModelSupportedVerbosity
Remove ts-expect-error comments and update type signature to explicitly handle undefined/null inputs. Also add support for GPT-5.1 series models.
* test(models): add test case for gpt-5-pro variant model
- Add `chcp 65001` to Windows batch file to switch CMD.exe to UTF-8 code page,
fixing CLI tool launch failure when working directory contains Chinese or
other non-ASCII characters
- Add directory existence validation before launching terminal to provide
immediate error feedback instead of delayed failure
Closes#11483🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
When updating assistant preset settings, if agent.settings was undefined,
it was assigned the DEFAULT_ASSISTANT_SETTINGS object directly. Since this
object is defined with `as const`, it is readonly and subsequent property
assignments would fail with "Cannot assign to read only property".
Fixed by creating a shallow copy of DEFAULT_ASSISTANT_SETTINGS instead of
referencing it directly.
Closes#11490🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
Move color and font-size styles from p selector to container level
in UpdateNotesWrapper. This ensures all content (including li elements
not wrapped in p tags) uses consistent color.
The issue occurred because .replace(/\n/g, '\n\n') creates a "loose list"
in Markdown where most list items get wrapped in <p> tags, but the last
item (without trailing newline) may not, causing it to inherit a different
color from the parent .markdown class.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
- Updated version to 1.7.0-rc.3 in package.json
- Added new features including support for Silicon provider and AIHubMix
- Consolidated bug fixes related to providers, models, UI, and settings
- Improved SDK integration with upgraded dependencies
* Initial plan
* feat: Add proper Poe API reasoning parameters support for GPT-5 and other models
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
* test: Add comprehensive tests for Poe API reasoning support
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
* fix: Add missing isGPT5SeriesModel import in reasoning.ts
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
* fix: Use correct extra_body format for Poe API reasoning parameters
Per Poe API documentation, custom bot parameters like reasoning_effort
and thinking_budget should be passed directly in extra_body, not as
nested structures.
Changed from:
- reasoning_effort: 'low' -> extra_body: { reasoning_effort: 'low' }
- thinking: { type: 'enabled', budget_tokens: X } -> extra_body: { thinking_budget: X }
- extra_body: { google: { thinking_config: {...} } } -> extra_body: { thinking_budget: X }
Updated tests to match the corrected implementation.
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
* fix: Update reasoning parameters and improve type definitions for GPT-5 support
* fix lint
* docs
* fix(reasoning): handle edge cases for models without token limit configuration
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
Co-authored-by: suyao <sy20010504@gmail.com>
* fix(anthropic): prevent duplicate /v1 in API endpoints
Anthropic SDK automatically appends /v1 to endpoints, so we should not add it in our formatting. This change ensures URLs are correctly formatted without duplicate path segments.
* fix(anthropic): strip /v1 suffix in getSdkClient to prevent duplicate in models endpoint
The issue was:
- AI SDK (for chat) needs baseURL with /v1 suffix
- Anthropic SDK (for listModels) automatically appends /v1 to all endpoints
Solution:
- Keep /v1 in formatProviderApiHost for AI SDK compatibility
- Strip /v1 in getSdkClient before passing to Anthropic SDK
- This ensures chat works correctly while preventing /v1/v1/models duplication
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(anthropic): correct preview URL to match actual request behavior
The preview now correctly shows:
- Input: https://api.siliconflow.cn/v2
- Preview: https://api.siliconflow.cn/v2/messages (was incorrectly showing /v2/v1/messages)
- Actual: https://api.siliconflow.cn/v2/messages
This matches the actual behavior where getSdkClient strips /v1 suffix before
passing to Anthropic SDK, which then appends /v1/messages.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(anthropic): strip all API version suffixes, not just /v1
The Anthropic SDK always appends /v1 to endpoints, regardless of the baseURL.
Previously we only stripped /v1 suffix, causing issues with custom versions like /v2.
Now we strip all version suffixes (/v1, /v2, /v1beta, etc.) before passing to Anthropic SDK.
Examples:
- Input: https://api.siliconflow.cn/v2/
- After strip: https://api.siliconflow.cn
- Actual request: https://api.siliconflow.cn/v1/messages✅🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(anthropic): correct preview to show AI SDK behavior, not Anthropic SDK
The preview was showing the wrong URL because it was reflecting Anthropic SDK behavior
(which strips versions and uses /v1), but checkApi and chat use AI SDK which preserves
the user's version path.
Now preview correctly shows:
- Input: https://api.siliconflow.cn/v2/
- AI SDK (checkApi/chat): https://api.siliconflow.cn/v2/messages✅
- Preview: https://api.siliconflow.cn/v2/messages✅
Note: Anthropic SDK (for listModels) still strips versions to use /v1/models,
but this is not shown in preview since it's a different code path.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(checkApi): remove unnecessary legacy fallback
The legacy fallback logic in checkApi was:
1. Complex and hard to maintain
2. Never actually triggered in practice for Modern SDK supported providers
3. Could cause duplicate API requests
Since Modern AI SDK now handles all major providers correctly,
we can simplify by directly throwing errors instead of falling back.
This also removes unused imports: AiProvider and CompletionsParams.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(anthropic): restore version stripping in getSdkClient for Anthropic SDK
The Anthropic SDK (used for listModels) always appends /v1 to endpoints,
so we need to strip version suffixes from baseURL to avoid duplication.
This only affects Anthropic SDK operations (like listModels).
AI SDK operations (chat/checkApi) use provider.apiHost directly via
providerToAiSdkConfig, which preserves the user's version path.
Examples:
- AI SDK (chat): https://api.siliconflow.cn/v1 -> /v1/messages ✅
- Anthropic SDK (models): https://api.siliconflow.cn/v1 -> strip v1 -> /v1/models ✅🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(anthropic): ensure AI SDK gets /v1 in baseURL, strip for Anthropic SDK
The correct behavior is:
1. formatProviderApiHost: Add /v1 to apiHost (for AI SDK compatibility)
2. AI SDK (chat/checkApi): Use apiHost with /v1 -> /v1/messages ✅
3. Anthropic SDK (listModels): Strip /v1 from baseURL -> SDK adds /v1/models ✅
4. Preview: Show AI SDK behavior (main use case) -> /v1/messages ✅
Examples:
- Input: https://api.siliconflow.cn
- Formatted: https://api.siliconflow.cn/v1 (added by formatApiHost)
- AI SDK: https://api.siliconflow.cn/v1/messages✅
- Anthropic SDK: https://api.siliconflow.cn (stripped) + /v1/models ✅
- Preview: https://api.siliconflow.cn/v1/messages✅🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(ai): simplify AiProviderNew initialization and improve docs
Update AiProviderNew constructor to automatically format URLs by default
Add comprehensive documentation explaining constructor behavior and usage
* chore: remove unused play.ts file
* fix(anthropic): strip api version from baseURL to avoid endpoint duplication
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat: add silicon provider support for Anthropic API compatibility
* fix: update handling of ANTHROPIC_BASE_URL for silicon provider compatibility
* fix: update anthropicApiHost for silicon provider to use the correct endpoint
* fix: remove silicon from CLAUDE_OFFICIAL_SUPPORTED_PROVIDERS
* chore: add comment to clarify silicon model fallback logic in CLAUDE_OFFICIAL_SUPPORTED_PROVIDERS
- Bumped @types/react from ^19.0.12 to ^19.2.7
- Bumped @types/react-dom from ^19.0.4 to ^19.2.3
- Updated csstype dependency from ^3.0.2 to ^3.2.2 in yarn.lock
These updates ensure compatibility with the latest React types and improve type definitions.
* fix: add claude-opus-4-5 pattern to THINKING_TOKEN_MAP
Adds missing regex pattern for claude-opus-4-5 models (e.g., claude-opus-4-5-20251101)
to the THINKING_TOKEN_MAP configuration. Without this pattern, the model was not
recognized, causing findTokenLimit() to return undefined and leading to an
AI_InvalidArgumentError when using Google Vertex AI Anthropic provider.
The fix adds the pattern 'claude-opus-4-5.*$': { min: 1024, max: 64_000 } to
match the existing claude-4 thinking token configuration.
Fixes AI_InvalidArgumentError: invalid anthropic provider options caused by
budgetTokens receiving NaN instead of a number.
Signed-off-by: Shuchen Luo (personal linux) <nemo0806@gmail.com>
* refactor: make THINKING_TOKEN_MAP constant private
* fix(reasoning): update claude model token limit regex patterns
- Consolidate claude model regex patterns to be more consistent
- Add comprehensive test cases for various claude model variants
- Ensure case insensitivity and proper handling of edge cases
* fix: format
* feat(models): extend claude model regex patterns to support AWS and GCP formats
Update regex patterns in THINKING_TOKEN_MAP to support additional Claude model ID formats used in AWS Bedrock and GCP Vertex AI
Add comprehensive test cases for new model ID formats and reorganize test suite
* fix: format
---------
Signed-off-by: Shuchen Luo (personal linux) <nemo0806@gmail.com>
Co-authored-by: icarus <eurfelux@gmail.com>
- Updated links in CONTRIBUTING.md and README.md to point to the correct Chinese documentation paths.
- Removed outdated files including the English and Chinese versions of the branching strategy, contributing guide, and test plan documents.
- Cleaned up references to non-existent documentation in the project structure to streamline the contributor experience.
* Initial plan
* fix(aiCore): extract AI SDK standard params from custom params for Gemini
Custom parameters like topK, frequencyPenalty, presencePenalty,
stopSequences, and seed should be passed as top-level streamText()
parameters, not in providerOptions. This fixes the issue where these
parameters were being ignored by the AI SDK's @ai-sdk/google module.
Changes:
- Add extractAiSdkStandardParams function to separate standard params
- Update buildProviderOptions to return both providerOptions and standardParams
- Update buildStreamTextParams to spread standardParams into params object
- Update tests to reflect new return structure
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
* refactor(aiCore): remove extractAiSdkStandardParams function and its tests, streamline parameter extraction logic
* chore: type
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
Co-authored-by: suyao <sy20010504@gmail.com>
- Introduced a new ESLint rule to enforce a specific naming convention for schema keys: `namespace.sub.key_name`.
- Updated cache and preference schema files to include documentation on the naming convention and examples of valid/invalid keys.
- Modified existing keys in cache schemas to comply with the new convention.
* fix: update provider-utils and add patch for header merging logic
* fix: enhance header merging logic to deduplicate values
* fix: handle null values in header merging logic
* chore: update ai-sdk dependencies and remove obsolete patches
- Updated @ai-sdk/amazon-bedrock from 3.0.56 to 3.0.61
- Updated @ai-sdk/anthropic from 2.0.45 to 2.0.49
- Updated @ai-sdk/gateway from 2.0.13 to 2.0.15
- Updated @ai-sdk/google from 2.0.40 to 2.0.43
- Updated @ai-sdk/google-vertex from 3.0.72 to 3.0.79
- Updated @ai-sdk/openai from 2.0.71 to 2.0.72
- Updated @ai-sdk/provider-utils from patch version to 3.0.17
- Removed obsolete patches for @ai-sdk/openai and @ai-sdk/provider-utils
- Added reasoning_content field to OpenAIChat response and chunk schemas
- Enhanced OpenAIChatLanguageModel to handle reasoning content in responses
* chore
* feat(settings): show OpenAI settings for supported service tier providers
Add support for displaying OpenAI settings when provider supports service tiers.
This includes refactoring the condition check and fixing variable naming consistency.
* fix(settings): set openAI verbosity to undefined by default
* fix(store): bump version to 178 and disable verbosity for groq provider
Add migration to remove verbosity from groq provider and implement provider utility to check verbosity support
Update provider types to include verbosity support flag
* feat(provider): add verbosity option support for providers
Add verbosity parameter support in provider API options settings
* fix(aiCore): check provider support for verbosity before applying
Add provider validation and check for verbosity support to prevent errors when unsupported providers are used with verbosity settings
* feat(settings): add Groq settings group component and translations
add new GroqSettingsGroup component for managing Groq provider settings
update translations for Groq settings in both zh-cn and en-us locales
refactor OpenAISettingsGroup to separate Groq-specific logic
* feat(i18n): add groq settings and verbosity support translations
add translations for groq settings title and verbosity parameter support in multiple languages
* refactor(settings): simplify service tier mode fallback logic
Remove conditional service tier mode fallback and use provider-specific defaults directly
* fix(provider): remove redundant system provider check in verbosity support
* test(provider): add tests for verbosity support detection
* fix(OpenAISettingsGroup): add endpoint_type check for showSummarySetting condition
Add model.endpoint_type check to properly determine when to show summary setting for OpenAI models
* refactor(selector): simplify selector option types and add utility functions
remove undefined and null from selector option types
add utility functions to convert between option values and real values
update groq and openai settings groups to use new utilities
add new translation for "ignore" option
* fix(ApiOptionsSettings): correct checked state for verbosity toggle
* feat(i18n): add "ignore" translation for multiple languages
* refactor(groq): remove unused model prop and related checks
Clean up GroqSettingsGroup component by removing unused model prop and unnecessary service tier checks
refactor(models): improve text delta support check for qwen-mt models
Replace direct qwen-mt model check with regex pattern matching
Add comprehensive test cases for isNotSupportTextDeltaModel
Update all references to use new function name
The previous implementation used `a = preset` inside forEach, which only
reassigns the local variable and doesn't actually update the array element.
Changed to use findIndex + direct array assignment to properly update
the preset in the state.
Fixes#11451🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
* fix: respect enableMaxTokens setting when maxTokens is not configured
When enableMaxTokens is disabled, getMaxTokens() should return undefined
to let the API use its own default value, instead of forcing 4096 tokens.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(modelParameters): handle max tokens when feature is disabled
Check if max tokens feature is enabled before returning undefined to ensure proper API behavior
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: icarus <eurfelux@gmail.com>
* feat: update Google and OpenAI SDKs with new features and fixes
- Updated Google SDK to ensure model paths are correctly formatted.
- Enhanced OpenAI SDK to include support for image URLs in chat responses.
- Added reasoning content handling in OpenAI chat responses and chunks.
- Introduced Azure Anthropic provider configuration for Claude integration.
* fix: azure error
* fix: lint
* fix: test
* fix: test
* fix type
* fix comment
* fix: redundant
* chore resolution
* fix: test
* fix: comment
* fix: comment
* fix
* feat: 添加 OpenRouter 推理中间件以支持内容过滤
* refactor: improve model filtering with todo for robust conversion
* refactor(aiCore): add AiSdkConfig type and update provider config handling
- Introduce new AiSdkConfig type in aiCoreTypes for better type safety
- Update provider factory and config to use AiSdkConfig consistently
- Simplify getAiSdkProviderId return type to string
- Add config validation in ModernAiProvider
* refactor(aiCore): move ai core types to dedicated module
Consolidate AI core type definitions into a dedicated module under aiCore/types. This improves code organization by keeping related types together and removes circular dependencies between modules. The change includes:
- Moving AiSdkConfig to aiCore/types
- Updating all imports to reference the new location
- Removing duplicate type definitions
* refactor(provider): add return type to createAiSdkProvider function
* feat(messages): add filter for error-only messages and their related pairs
Add new filter function to remove assistant messages containing only error blocks along with their associated user messages, identified by askId. This improves conversation quality by cleaning up error-only responses.
* refactor(ConversationService): improve message filtering pipeline readability
Break down complex message filtering chain into clearly labeled steps
Add comments explaining each filtering step's purpose
Maintain same functionality while improving code maintainability
* test(messageUtils): add test cases for message filter utilities
* docs(messageUtils): correct jsdoc for filterUsefulMessages
* refactor(ConversationService): extract message filtering logic into pipeline method
Move message filtering steps into a dedicated static method to improve testability and maintainability. Add comprehensive tests to verify pipeline behavior.
* refactor(ConversationService): add logging and improve message filtering readability
Add logger service to track message pipeline output
Split filterUserRoleStartMessages into separate variable for better debugging
* refactor(types): consolidate OpenAI types and improve type safety
- Move OpenAI-related types to aiCoreTypes.ts
- Rename FetchChatCompletionOptions to FetchChatCompletionRequestOptions
- Add proper type definitions for service tiers and verbosity
- Improve type guards for service tier checks
* refactor(api): rename options parameter to requestOptions for consistency
Update parameter name across multiple files to use requestOptions instead of options for better clarity and consistency in API calls
* refactor(aiCore): simplify OpenAI summary text handling and improve type safety
- Remove 'off' option from OpenAISummaryText type and use null instead
- Add migration to convert 'off' values to null
- Add utility function to convert undefined to null
- Update Selector component to handle null/undefined values
- Improve type safety in provider options and reasoning params
* fix(i18n): Auto update translations for PR #10964
* feat(utils): add notNull function to convert null to undefined
* refactor(utils): move defined and notNull functions to shared package
Consolidate utility functions into shared package to improve code organization and reuse
* Revert "fix(i18n): Auto update translations for PR #10964"
This reverts commit 68bd7eaac5.
* feat(i18n): add "off" translation and remove "performance" tier
Add "off" translation for multiple languages and remove "performance" service tier option from translations
* Apply suggestion from @EurFelux
* docs(types): clarify handling of undefined and null values
Add comments to explain that undefined is treated as default and null as explicitly off in OpenAIVerbosity and OpenAIServiceTier types. Also update type safety for OpenAIServiceTiers record.
* fix(migration): update migration version from 167 to 171 for removed type
* chore: update store version to 172
* fix(migrate): update migration version number from 171 to 172
* fix(i18n): Auto update translations for PR #10964
* refactor(types): improve type safety for verbosity handling
add NotUndefined and NotNull utility types to better handle null/undefined cases
clarify verbosity types in aiCoreTypes and update related utility functions
* refactor(types): replace null with undefined for verbosity values
Standardize on undefined instead of null for verbosity values to align with OpenAI API docs and improve type consistency
* refactor(aiCore): update OpenAI provider options type import and usage
* fix(openai): change summaryText default from null to 'auto'
Update OpenAI settings to use 'auto' as default summaryText value instead of null for consistency with API behavior. Remove 'off' option and add 'concise' option while maintaining type safety.
* refactor(OpenAISettingsGroup): extract service tier options type for better maintainability
* refactor(types): make SystemProviderIdTypeMap internal type
* docs(provider): clarify OpenAIServiceTier behavior for undefined vs null
Explain that undefined and null values for serviceTier should be treated differently since they affect whether the field appears in the response
* refactor(utils): rename utility functions for clarity
Rename `defined` to `toNullIfUndefined` and `notNull` to `toUndefinedIfNull` to better reflect their functionality
* refactor(aiCore): extract service tier logic and improve type safety
Extract service tier validation logic into separate functions for better reusability
Add proper type annotations for provider options
Pass service tier parameter through provider option builders
* refactor(utils): comment out unused utility functions
Keep commented utility functions for potential future use while cleaning up current codebase
* fix(migration): update migration version number from 172 to 177
* docs(aiCoreTypes): clarify parameter passing behavior in OpenAI API
Update comments to consistently use 'undefined' instead of 'null' when describing parameter passing behavior in OpenAI API requests, as they share the same meaning in this context
---------
Co-authored-by: GitHub Action <action@github.com>
* refactor: optimize DatabaseManager and fix libsql crash issues
Major improvements:
- Created DatabaseManager singleton to centralize database connection management
- Auto-initialize database in constructor (no manual initialization needed)
- Removed all manual initialize() and ensureInitialized() calls (47 occurrences)
- Simplified initialization logic (removed retry loops that could cause crashes)
- Removed unused close() and reinitialize() methods
- Reduced code from ~270 lines to 172 lines (-36%)
Key changes:
1. DatabaseManager.ts (new file):
- Singleton pattern with auto-initialization
- State management (INITIALIZING, INITIALIZED, FAILED)
- Windows compatibility fixes (empty file detection, intMode: 'number')
- Simplified waitForInitialization() logic
2. BaseService.ts:
- Removed static initialize() and ensureInitialized() methods
- Simplified database/rawClient getters to use DatabaseManager
3. Service classes (AgentService, SessionService, SessionMessageService):
- Removed all initialize() methods
- Removed all ensureInitialized() calls
- Services now work out of the box
4. Main entry points (index.ts, server.ts):
- Removed explicit database initialization calls
- Database initializes automatically on first access
Benefits:
- Fixes Windows libsql crashes by removing dangerous retry logic
- Simpler API - no need to remember to call initialize()
- Better separation of concerns
- Cleaner codebase with 36% less code
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: wait for database initialization on app startup
Issue: "Database is still initializing" error on startup
Root cause: Synchronous database getter was called before async initialization completed
Solution:
- Explicitly wait for database initialization in main index.ts
- Import DatabaseManager and call getDatabase() to ensure initialization is complete
- This guarantees database is ready before any service methods are called
Changes:
- src/main/index.ts: Added explicit database initialization wait before API server check
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: use static import for getDatabaseManager
- Move import to top of file for better code organization
- Remove unnecessary dynamic import
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: streamline database access in service classes
- Replaced direct database access with asynchronous calls to getDatabase() in various service classes (AgentService, SessionService, SessionMessageService).
- Updated the main index.ts to utilize runAsyncFunction for API server initialization, ensuring proper handling of asynchronous database access.
- Improved code organization and readability by consolidating database access logic.
This change enhances the reliability of database interactions across the application and ensures that services are correctly initialized before use.
* refactor: remove redundant logging in ApiServer initialization
- Removed the logging statement for 'AgentService ready' during server initialization.
- This change streamlines the startup process by eliminating unnecessary log entries.
This update contributes to cleaner logs and improved readability during server startup.
* refactor: change getDatabase method to synchronous return type
- Updated the getDatabase method in DatabaseManager to return a synchronous LibSQLDatabase instance instead of a Promise.
- This change simplifies the database access pattern, aligning with the current initialization logic.
This refactor enhances code clarity and reduces unnecessary asynchronous handling in the database access layer.
* refactor: simplify sessionMessageRepository by removing transaction handling
- Removed transaction handling parameters from message persistence methods in sessionMessageRepository.
- Updated database access to use a direct call to getDatabase() instead of passing a transaction client.
- Streamlined the upsertMessage and persistExchange methods for improved clarity and reduced complexity.
This refactor enhances code readability and simplifies the database interaction logic.
---------
Co-authored-by: Claude <noreply@anthropic.com>
- Added an init method to DbService for database initialization, ensuring it is called before migrations.
- Updated the migrateDb and migrateSeed methods to check if the database is initialized, improving error handling.
- Called dbService.init() in the app's whenReady event to ensure proper database setup during startup.
Implement single instance IPC subscription pattern to resolve MaxListenersExceededWarning. Previously, each component using useApiServer would register a separate 'api-server:ready' listener, and React strict mode double rendering would quickly exceed the 10 listener limit.
Changes:
- Add module-level subscription manager with onReadyCallbacks Set
- Ensure only one IPC listener is registered regardless of component count
- Use useRef to maintain stable callback references
- Properly cleanup subscriptions when all components unmount
This maintains existing behavior while keeping listener count constant at 1.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
* feat: add endpoint type support for cherryin provider
* chore: bump @cherrystudio/ai-sdk-provider version to 0.1.1
* chore: bump ai-sdk-provider version to 0.1.3
* test(knowledge): fix tests for knowledge base form modal refactoring
Update all test files to match the new vertical layout structure with button-based advanced settings toggle. Remove obsolete tests for deleted features.
Changes:
- Rewrite KnowledgeBaseFormModal.test.tsx for new button-toggle structure
- Remove tests for preprocess and rerank features from GeneralSettingsPanel
- Update AdvancedSettingsPanel tests with required props
- Update all snapshots to reflect new component structure
- Format test files according to biome rules
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* test(knowledge): simplify KnowledgeBaseFormModal button tests
Simplify button interaction tests to avoid text matching issues. Focus on testing behavior rather than implementation details.
Changes:
- Simplify advanced settings toggle test
- Simplify footer buttons test to check button count instead of text content
- Remove fragile text-based button selection
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat: add Git Bash detection and requirement check for Windows agents
- Add System_CheckGitBash IPC channel for detecting Git Bash installation
- Implement detection logic checking common installation paths and PATH environment
- Display non-closable error alert in AgentModal when Git Bash is not found
- Disable agent creation/edit button until Git Bash is installed
- Add recheck functionality to verify installation without restarting app
Git Bash is required for agents to function properly on Windows systems.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* i18n: add Git Bash requirement translations for agent modal
- Add English translations for Git Bash detection warnings
- Add Simplified Chinese (zh-cn) translations
- Add Traditional Chinese (zh-tw) translations
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* format code
---------
Co-authored-by: Claude <noreply@anthropic.com>
- Deleted the DmxapiToImg SVG file and its corresponding React component to streamline the icon library.
- Updated index.ts and Logos.stories.tsx to remove references to DmxapiToImg, ensuring consistency across the codebase.
- Introduced a new Tabs component along with TabsList, TabsTrigger, and TabsContent for improved content organization.
- Updated package.json and yarn.lock to include @radix-ui/react-tabs dependency.
- Enhanced index.ts to export the new Tabs components for easier access in the UI library.
- Created stories for the Tabs component in Storybook to demonstrate various usage scenarios.
- Introduced a new method to configure Write-Ahead Logging (WAL) mode for better concurrency during database operations.
- Ensured WAL mode is set only once, with error handling to fall back to default settings if configuration fails.
- Updated the migrateDb method to call the new configuration method on the first database operation.
* feat: add ChatGPT conversation import feature
Introduces a new import workflow for ChatGPT conversations, including UI components, service logic, and i18n support for English, Simplified Chinese, and Traditional Chinese. Adds an import menu to data settings, a popup for file selection and progress, and a service to parse and store imported conversations as topics and messages.
* fix: ci failure
* refactor: import service and add modular importers
Refactored the import service to support a modular importer architecture. Moved ChatGPT import logic to a dedicated importer class and directory. Updated UI components and i18n descriptions for clarity. Removed unused Redux selector in ImportMenuSettings. This change enables easier addition of new importers in the future.
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix: improve ChatGPT import UX and set model for assistant
Added a loading state and spinner for file selection in the ChatGPT import popup, with new translations for the 'selecting' state in en-us, zh-cn, and zh-tw locales. Also, set the model property for imported assistant messages to display the GPT-5 logo.
---------
Co-authored-by: SuYao <sy20010504@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Added a new Breadcrumb.stories.tsx file to showcase the Breadcrumb component and its variations.
- Refactored existing stories for Button, Checkbox, Combobox, Kbd, Pagination, RadioGroup, Select, and Spinner components to import directly from @cherrystudio/ui instead of relative paths.
- Enhanced the organization and accessibility of component stories in the Storybook environment.
- Introduced a new Breadcrumb component along with BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, and BreadcrumbEllipsis.
- Updated index.ts to export the new Breadcrumb components for easier access in the UI library.
- Revised guidelines to specify the use of Tailwind CSS and Shadcn UI components from `@packages/ui` for new UI development.
- Updated project documentation to clarify the prohibition of `antd` and `styled-components` in favor of the new UI libraries.
- Added detailed JSDoc comments for better understanding of DbService methods and usage.
- Implemented error handling during database initialization and migration processes to ensure robustness.
- Introduced a method to check if the database is initialized before accessing it.
- Updated the migrateSeed method to throw errors on failure, improving error reporting.
- Deleted the DataRefactorMigrateService and associated HTML files, as they are no longer needed.
- Removed test components and files related to data refactor migration, streamlining the codebase.
- Updated configuration files to reflect the removal of the data refactor migration functionality.
- Replaced core types with shared types in migration files to ensure consistency across the application.
- Deleted obsolete core types file and updated imports in migrator and window components to reference the new shared types.
- Enhanced the migration process by streamlining type definitions and improving code maintainability.
- Added internationalization support to the MigrationApp component, enabling dynamic language changes.
- Updated button labels and informational texts to use translation keys for better localization.
- Introduced a language selector to allow users to switch between languages during the migration process.
- Ensured that the migration process waits for i18n initialization before rendering the main application.
- Added 'migration_completed' stage to the migration process for better tracking of completion.
- Updated relevant components and hooks to handle the new stage, including UI changes to confirm migration completion.
- Adjusted messages and progress indicators to reflect the new stage in the migration workflow.
- Integrated migration v2 functionality by importing necessary modules and registering IPC handlers.
- Updated the migration process to check for data migration needs and handle the migration window.
- Added new dependencies for stream-json and its types in package.json.
- Updated electron.vite.config.ts to include the new migration window HTML file.
* feat: add i18n support and local data to emoji picker
- Add emoji-picker-element-data package for offline-first emoji data
- Implement i18n translations for emoji picker UI (de, en, es, fr, ja, pt, ru, zh)
- Switch from CDN to local emoji data to improve performance and reliability
- Add locale mapping to match app language with emoji picker data
- Move emoji-picker-element import to EmojiPicker component for better encapsulation
- Use proper TypeScript types instead of 'any' for type safety
This improves user experience by providing localized emoji picker interface
and eliminating dependency on external CDN, ensuring the picker works offline.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: enable native language emoji search with CLDR data format
Switch from emojibase to CLDR format for emoji-picker-element data to support full multi-language search functionality. Users can now search for emojis in their native language (e.g., German users can search "Herz" for ❤️, Spanish users can search "corazón"). Also improves type safety by using the LanguageVarious type for locale mappings.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
- Exported the new Pagination component from the index file to make it available for use.
- Updated the PaginationLink styles to improve hover effects and active state visibility, enhancing user experience.
- Updated the @radix-ui/react-slot dependency in package.json and yarn.lock to version 1.2.4.
- Introduced a new Pagination component with associated subcomponents (PaginationContent, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PaginationEllipsis).
- Added stories for the Pagination component to demonstrate various use cases and configurations.
* refactor(AgentModal): simplify agent type handling and update default values
- Removed unused agent type options and related logic.
- Updated default agent name from 'Claude Code' to 'Agent'.
- Adjusted padding in button styles and textarea rows for better UI consistency.
- Cleaned up unnecessary imports and code comments for improved readability.
* refactor(AgentSettings): clean up and enhance name setting component
- Removed unused imports and commented-out code in AgentModal and EssentialSettings.
- Updated NameSetting to include an emoji avatar picker for enhanced user experience.
- Simplified the logic for updating the agent's name and avatar.
- Improved overall readability and maintainability of the code.
- Remove 'banner' prop from Alert components in InstallNpxUv
- Set SettingContainer background to 'inherit' in MCP settings
- Fixes the light background color issue in NpxUv interface
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
- Added a garbage collection mechanism in CacheService to automatically remove expired cache entries every 10 minutes.
- Introduced a cleanup interval in PreferenceService, adjusting the frequency to every 5 minutes for better resource management.
- Enhanced cleanup methods in both services to ensure proper resource release during shutdown.
* chore: update ai-core release scripts and bump version to 1.0.7
* chore: update ai-sdk-provider release script to include build step and enhance type exports in webSearchPlugin and providers
* chore: bump @cherrystudio/ai-core version to 1.0.8 and update dependencies in package.json and yarn.lock
* chore: bump @cherrystudio/ai-core version to 1.0.9 and @cherrystudio/ai-sdk-provider version to 0.1.2 in package.json and yarn.lock
---------
Co-authored-by: suyao <sy20010504@gmail.com>
* bump ai core version
* chore
* chore: add patch for @ai-sdk/openai and update peer dependencies in aiCore
* chore: update installation instructions in README to include @ai-sdk/google and @ai-sdk/openai
* chore: bump @cherrystudio/ai-core version to 1.0.6 in package.json and yarn.lock
---------
Co-authored-by: MyPrototypeWhat <daoquqiexing@gmail.com>
* feat(reasoning): add support for gemini-3-pro-preview model
Update regex pattern to include gemini-3-pro-preview as a supported thinking model
Add tests for new gemini-3 model support and edge cases
* fix(reasoning): update gemini model regex to include stable versions
Add support for stable versions of gemini-3-flash and gemini-3-pro in the model regex pattern. Update tests to verify both preview and stable versions are correctly identified.
* feat(providers): add vertexai provider check function
Add isVertexAiProvider function to consistently check for vertexai provider type and use it in websearch model detection
* feat(websearch): update gemini search regex to include v3 models
Add support for gemini 3.x models in the search regex pattern, including preview versions
* feat(vision): add support for gemini-3 models and add tests
Add regex pattern for gemini-3 models in visionAllowedModels
Create comprehensive test suite for isVisionModel function
* refactor(vision): make vision-related model constants private
Remove unused isNotSupportedImageSizeModel function and change exports to const declarations for internal use only
* chore(deps): update @ai-sdk/google to v2.0.36 and related dependencies
update @ai-sdk/google dependency from v2.0.31 to v2.0.36 to include fixes for model path handling and tool support for newer Gemini models
* chore: remove outdated @ai-sdk-google patch file
* chore: remove outdated @ai-sdk/google patch dependency
- Introduced a new Tooltip component along with TooltipProvider, TooltipTrigger, and TooltipContent for improved user interface interactions.
- Implemented NormalTooltip for easier usage with customizable content and positioning options.
- Integrated Radix UI's tooltip primitives for better accessibility and performance.
- Removed the InTooltip story from Kbd.stories.tsx to declutter the examples.
- Kept the Tooltip-related imports commented out for potential future use.
- Introduced a new Kbd component to display keyboard shortcuts, supporting both single keys and key combinations.
- Added KbdGroup for grouping multiple Kbd components together.
- Updated package.json to include @radix-ui/react-tooltip version 1.2.8.
- Created stories for Kbd component showcasing various use cases, including integration with Tooltip for enhanced user guidance.
- Added anthropicApiHost configuration for qiniu and longcat providers during state migration.
- Incremented version number in persistedReducer to 176.
- Ensured proper handling of reasoning_effort settings during migration.
* refactor(assistant): change default tool use mode to function and use default settings
Simplify reset logic by using DEFAULT_ASSISTANT_SETTINGS object instead of hardcoded values
* fix(ApiService): safely fallback to prompt tool use for unsupported models
Add check for function calling model support before using tool use mode to prevent errors with unsupported models.
feat(i18n): add input placeholder translations for multiple languages
- Introduced a new placeholder for the input field in various language files, providing guidance on message entry and command selection.
- Updated English, Chinese (Simplified and Traditional), German, Greek, Spanish, French, Japanese, Portuguese, and Russian translations to include the new input placeholder text.
- Adjusted the reference in the AgentSessionInputbar component to use the new translation key for consistency.
- Updated comments for brand logo icons to reflect the current count and recommended import path.
- Removed deprecated selector component exports to clean up the index file.
- Deleted the FilePngIcon and FileSvgIcon components from the icons directory due to low usage.
- Removed the ToolsCallingIcon component and its related stories, as it did not meet the UI library extraction criteria.
- Updated the index.ts file to reflect these removals and cleaned up the export list accordingly.
- Ensured that all related story files for the removed icons were also deleted to maintain a clean codebase.
* Initial plan
* feat: add verbosity parameter support for GPT-5 models in OpenAIAPIClient
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
* fix: ensure gpt-5-pro always uses 'high' verbosity
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
* refactor: move verbosity configuration to config/models as suggested
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
* refactor: encapsulate verbosity logic in getVerbosity method
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
* feat: add support for verbosity and reasoning options for GPT-5 Pro and GPT-5.1 models
* fix comment
* build: add @ai-sdk/google dependency
Add the @ai-sdk/google package to support Google AI SDK integration
* build: add @ai-sdk/anthropic dependency
* refactor(aiCore): update reasoning params handling for AI providers
- Add type imports for provider options
- Handle 'none' reasoning effort consistently across providers
- Improve type safety by using Pick with provider options
- Standardize disabled reasoning config for all providers
* fix: adjust none effort ratio from 0 to 0.01
Prevent potential division by zero errors by ensuring none effort ratio has a small positive value
* feat(reasoning): add support for GPT-5.1 series models
Handle 'none' reasoning effort for GPT-5.1 models and add model type check
* Update src/renderer/src/aiCore/utils/reasoning.ts
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com>
Co-authored-by: suyao <sy20010504@gmail.com>
Co-authored-by: icarus <eurfelux@gmail.com>
* build: update @cherrystudio/openai dependency from v6.5.0 to v6.9.0
* refactor(reasoning): replace 'off' with 'none' for reasoning effort option
Update reasoning effort option from 'off' to 'none' across multiple files for consistency
Add support for gpt5_1 model with reasoning effort options
* fix(openai): handle apply_patch_call and apply_patch_call_output in response conversion
Filter and properly handle apply_patch_call and apply_patch_call_output types in OpenAI response conversion. Ensure undefined/null values are handled appropriately and log warnings for missing required fields.
* feat(models): add gpt-5.1 model logo and configuration
* fix(providers): include cherryin in url context provider check
Add SystemProviderIds.cherryin to the list of providers that support URL context to ensure proper functionality
* feat(models): add logo images for gpt-5.1 model variants
* feat(model): add support for GPT-5.1 series models
- Add new model type check for GPT-5.1 series
- Update reasoning effort and verbosity checks to include GPT-5.1
- Add logging to provider options builder
* feat(models): add gpt5_1_codex model support
Add new model type 'gpt5_1_codex' to ThinkModelTypes and configure its reasoning effort levels
Update model type detection logic to handle gpt5_1_codex variant
* chore: update @opeoginni/github-copilot-openai-compatible to version 0.1.21
- Updated package version in package.json and yarn.lock.
- Refactored OpenAIBaseClient to enhance getBaseURL method and improve header management for SDK instances.
* format
Add comprehensive release notes highlighting:
- AI Agent system as the major new feature
- New AI providers support (Hugging Face, Mistral, Perplexity, SophNet)
- Knowledge base enhancements (OpenMinerU, full-text search)
- Image & OCR improvements (Intel OVMS, OpenVINO NPU)
- MCP management interface redesign with dual-column layout
- German language support
- Electron 38.7.0 upgrade and system improvements
- Important bug fixes
- Added `header` prop to display content above the list.
- Introduced `className` prop for additional styling on the container.
- Updated `Sessions` component to utilize `StyledVirtualList` with new props for improved layout and functionality.
- Deleted the DmxapiLogo SVG file from the icons directory.
- Updated the icon export list to reflect the removal of DmxapiLogo, reducing the total icon count from 81 to 80.
- Adjusted related stories to exclude DmxapiLogo from the showcased icons.
- Added '@cherrystudio/ui/icons' to the Electron Vite configuration for improved icon management.
- Updated TypeScript configuration to include type definitions for the new icon package.
- Removed unused dependencies from yarn.lock to streamline package management.
- Removed the ICON_IMPLEMENTATION_GUIDE.md file and several unused SVG icons from the `icons/` directory.
- Added new SVG icons to enhance the icon library, including various brand logos.
- Updated package.json to reflect the new version of the `tsx` dependency.
- Introduced a script for generating icons and improved the structure of the icons module for better organization and accessibility.
- Updated the stories for icons to showcase the new additions and ensure proper documentation.
* ♻️ refactor: implement config-based update system with version compatibility control
Replace GitHub API-based update discovery with JSON config file system. Support
version gating (users below v1.7 must upgrade to v1.7.0 before v2.0). Auto-select
GitHub/GitCode config source based on IP location. Simplify fallback logic.
Changes:
- Add update-config.json with version compatibility rules
- Implement _fetchUpdateConfig() and _findCompatibleChannel()
- Remove legacy _getReleaseVersionFromGithub() and GitHub API dependency
- Refactor _setFeedUrl() with simplified fallback to default feed URLs
- Add design documentation in docs/UPDATE_CONFIG_DESIGN.md
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(i18n): Auto update translations for PR #11147
* format code
* 🔧 chore: update config for v1.7.5 → v2.0.0 → v2.1.6 upgrade path
Update version configuration to support multi-step upgrade path:
- v1.6.x users → v1.7.5 (last v1.x release)
- v1.7.x users → v2.0.0 (v2.x intermediate version)
- v2.0.0+ users → v2.1.6 (current latest)
Changes:
- Update 1.7.0 → 1.7.5 with fixed feedUrl
- Set 2.0.0 as intermediate version with fixed feedUrl
- Add 2.1.6 as current latest pointing to releases/latest
This ensures users upgrade through required intermediate versions
before jumping to major releases.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* 🔧 chore: refactor update config with constants and adjust versions
Refactor update configuration system and adjust to actual versions:
- Add UpdateConfigUrl enum in constant.ts for centralized config URLs
- Point to test server (birdcat.top) for development testing
- Update AppUpdater.ts to use UpdateConfigUrl constants
- Adjust update-config.json to actual v1.6.7 with rc/beta channels
- Remove v2.1.6 entry (not yet released)
- Set package version to 1.6.5 for testing upgrade path
- Add update-config.example.json for reference
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* update version
* ✅ test: add comprehensive unit tests for AppUpdater config system
Add extensive test coverage for new config-based update system including:
- Config fetching with IP-based source selection (GitHub/GitCode)
- Channel compatibility matching with version constraints
- Smart fallback from rc/beta to latest when appropriate
- Multi-step upgrade path validation (1.6.3 → 1.6.7 → 2.0.0)
- Error handling for network and HTTP failures
Test Coverage:
- _fetchUpdateConfig: 4 tests (GitHub/GitCode selection, error handling)
- _findCompatibleChannel: 9 tests (channel matching, version comparison)
- Upgrade Path: 3 tests (version gating scenarios)
- Total: 30 tests, 100% passing
Also optimize _findCompatibleChannel logic with better variable naming
and log messages.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* ✅ test: add complete multi-step upgrade path tests (1.6.3 → 1.7.5 → 2.0.0 → 2.1.6)
Add comprehensive test suite for complete upgrade journey including:
- Individual step validation (1.6.3→1.7.5, 1.7.5→2.0.0, 2.0.0→2.1.6)
- Full multi-step upgrade simulation with version progression
- Version gating enforcement (block skipping intermediate versions)
- Verification that 1.6.3 cannot directly upgrade to 2.0.0 or 2.1.6
- Verification that 1.7.5 cannot skip 2.0.0 to reach 2.1.6
Test Coverage:
- 6 new tests for complete upgrade path scenarios
- Total: 36 tests, 100% passing
This ensures the version compatibility system correctly enforces
intermediate version upgrades for major releases.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* 📝 docs: reorganize update config documentation with English translation
Move update configuration design document to docs/technical/ directory
and add English translation for international contributors.
Changes:
- Move docs/UPDATE_CONFIG_DESIGN.md → docs/technical/app-update-config-zh.md
- Add docs/technical/app-update-config-en.md (English translation)
- Organize technical documentation in dedicated directory
Documentation covers:
- Config-based update system design and rationale
- JSON schema with version compatibility control
- Multi-step upgrade path examples (1.6.3 → 1.7.5 → 2.0.0 → 2.1.6)
- TypeScript type definitions and matching algorithms
- GitHub/GitCode source selection for different regions
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* format code
* ✅ test: add tests for latest channel self-comparison prevention
Add tests to verify the optimization that prevents comparing latest
channel with itself when latest is requested, and ensures rc/beta
channels are returned when they are newer than latest.
New tests:
- should not compare latest with itself when requesting latest channel
- should return rc when rc version > latest version
- should return beta when beta version > latest version
These tests ensure the requestedChannel !== UpgradeChannel.LATEST
check works correctly and users get the right channel based on
version comparisons.
Test Coverage: 39 tests, 100% passing
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* update github/gitcode
* format code
* update rc version
* ♻️ refactor: merge update configs into single multi-mirror file
- Merge app-upgrade-config-github.json and app-upgrade-config-gitcode.json into single app-upgrade-config.json
- Add UpdateMirror enum for type-safe mirror selection
- Optimize _fetchUpdateConfig to receive mirror parameter, eliminating duplicate IP country checks
- Update ChannelConfig interface to use Record<UpdateMirror, string> for feedUrls
- Rename documentation files from app-update-config-* to app-upgrade-config-*
- Update docs with new multi-mirror configuration structure
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* ✅ test: update AppUpdater tests for multi-mirror configuration
- Add UpdateMirror enum import
- Update _fetchUpdateConfig tests to accept mirror parameter
- Convert all feedUrl to feedUrls structure in test mocks
- Update test expectations to match new ChannelConfig interface
- All 39 tests passing
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* format code
* delete files
* 📝 docs: add UpdateMirror enum to type definitions
- Add UpdateMirror enum definition in both EN and ZH docs
- Update ChannelConfig to use Record<UpdateMirror, string>
- Add comments showing equivalent structure for clarity
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* 🐛 fix: return actual channel from _findCompatibleChannel
Fix channel mismatch issue where requesting rc/beta but getting latest:
- Change _findCompatibleChannel return type to include actual channel
- Return { config, channel } instead of just config
- Update _setFeedUrl to use actualChannel instead of requestedChannel
- Update all test expectations to match new return structure
- Add channel assertions to key tests
This ensures autoUpdater.channel matches the actual feed URL being used.
Fixes issue where:
- User requests 'rc' channel
- latest >= rc, so latest config is returned
- But channel was set to 'rc' with latest URL ❌
- Now channel is correctly set to 'latest' ✅
All 39 tests passing ✅🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* update version
* udpate version
* update config
* add no cache header
* update files
* 🤖 chore: automate app upgrade config updates
* format code
* update workflow
* update get method
* docs: document upgrade workflow automation
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: GitHub Action <action@github.com>
- Created ICON_IMPLEMENTATION_GUIDE.md to document icon usage and common issues.
- Added multiple new SVG icons to the `icons/` directory, enhancing the icon library.
- Updated tailwind.css for improved styling consistency across components.
* fix: update Azure OpenAI API version references to v1 in configuration and translations
* fix: support Azure OpenAI API v1 in client compatibility check
* fix: lint/ format
* fix: topic branch incomplete copy - split ID mapping into two passes
Fix the bug where topic branching would not copy all message relationships completely.The issue was that askId mapping lookup happened in the same loop as ID generation, causing later messages' askIds to fail mapping when they referenced messages that hadn't been processed yet.
Solution: Split into two passes:
1. First pass: Generate new IDs for all messages and build complete mapping
2. Second pass: Clone messages and blocks using the complete ID mapping
This ensures all message relationships (especially assistant message askId references)are properly maintained in the new topic.
* fix(notes): 保持 Ctrl+F ‘下一个’在编辑器容器内滚动,避免索引提前回到第一条
- 使用传入的滚动容器计算相对偏移并 target.scrollTo 居中
- 容器不可滚动时回退到 scrollIntoView,兼容其他页面
- 将 target 纳入依赖,确保引用最新容器
受影响文件:
- src/renderer/src/components/ContentSearch.tsx:165
* fix(search): improve notes content search next-scroll behavior
* Update dom.ts
---------
Co-authored-by: Pleasurecruise <3196812536@qq.com>
* fix(message): Incorrect navigation when creating new message with @
Update variable name from newAssistantStub to newAssistantMessageStub for clarity
Add dispatch calls to update message folding state
Remove unused message length tracking effect in MessageGroup
Fixes#10928
* refactor(MessageGroup): remove unused prevMessageLengthRef variable
Updated the sorting logic in getSorter to use the 'numeric' option in localeCompare for all name-based sorts. This ensures that note names containing numbers are sorted in a more natural, human-friendly order.
* feat(models): add MiniMax M2 models to default configuration
* fix(config): update minimax api host and add anthropic host
Update the API endpoint for MiniMax provider and add a new endpoint for Anthropic integration
* feat: add minimax to ANTHROPIC_COMPATIBLE_PROVIDER_IDS
* docs(ProviderSetting): add todo comment for reset button
* fix(store): update minimax provider config in migration 174
Add anthropicApiHost to minimax provider configuration during state migration
* fix(store): revert version and remove unused migration
Remove migration for version 175 and revert persisted reducer version to 174
- Deleted the outdated CONVERSION_LOG.md file to streamline documentation.
- Introduced new HSLA color files for primitive, semantic, and status colors, enhancing color management.
- Updated theme and token files to utilize Oklch color format for improved color representation.
- Refactored radius and color tokens for consistency and maintainability across the design system.
- Exported CheckedState type from the checkbox component for better type management.
- Added checkbox and combobox components to the main component index for easier access.
- Updated Storybook examples to utilize the CheckedState type for controlled checkbox states.
- Introduced a new checkbox component utilizing Radix UI, allowing for customizable sizes and states.
- Implemented styles using class-variance-authority for consistent design across different sizes (sm, md, lg).
- Added comprehensive Storybook stories demonstrating various use cases, including default, checked, disabled, and controlled states.
- Updated package.json and yarn.lock to include the new Radix UI checkbox dependency.
- Introduced size variants for RadioGroupItem using class-variance-authority for better customization.
- Updated RadioGroupItem to accept size prop and adjusted styles accordingly.
- Added comprehensive Storybook stories for various use cases, including default, disabled, and size variations, to demonstrate component functionality and usage.
- Introduced background parameters in Storybook preview configuration to support light and dark themes.
- Defined specific color values for each theme to enhance visual consistency during component development.
- Refactored the combobox and select components to utilize Tailwind CSS utility classes for consistent styling.
- Added 'text-foreground' class to enhance text visibility in both components.
- Streamlined the default styles for better maintainability and adherence to the new design system.
- Updated the Electron Vite configuration to dynamically import Tailwind CSS for improved performance.
- Removed the direct import of Tailwind CSS from the plugins array to streamline the build process.
- Integrated Tailwind CSS into the project by adding necessary imports and configurations.
- Updated CSS files to reflect the transition to Tailwind, including commenting out old styles and adjusting theme-related attributes.
- Changed theme mode handling in the ThemeProvider and CitationBlock components for consistency with the new class-based approach.
- Included a new source import statement for UI components to enhance styling capabilities.
- Maintained existing imports while ensuring compatibility with the updated structure.
- Simplified Tooltip component in ChatNavbar and Navbar by removing redundant 'placement' attribute.
- Ensured consistent behavior across both components while maintaining functionality.
- Replaced the configManager.getLanguage() method with getAppLanguage() for improved language handling.
- Adjusted imports to reflect the new language utility structure.
- Updated SettingsTab to utilize the new Select component instead of the deprecated Selector.
- Enhanced Select integration with SelectTrigger, SelectContent, SelectItem, and SelectValue for improved functionality.
- Removed Selector imports and related code to streamline the component structure.
- Adjusted styles and layout for better user experience in the settings interface.
- Adjusted border radius for SelectContent to 'rounded-2xs' for a more modern look.
- Enhanced SelectItem styles to include a background color for checked state.
- Updated CheckIcon color to 'text-primary' for better visibility in the SelectItem.
- Added a new Select component based on Radix UI, including SelectTrigger, SelectContent, SelectItem, and SelectValue.
- Implemented support for groups and separators within the Select component.
- Updated package.json to include @radix-ui/react-select as a dependency.
- Removed deprecated Selector and SearchableSelector components to streamline the codebase.
- Added stories for the Select component to showcase various use cases and configurations.
- Updated button variants for improved hover effects and accessibility, including aria-loading support.
- Refined combobox trigger styles for better visibility and consistency, including adjustments to error state styling and input placeholder appearance.
- Improved overall class management and organization for both components.
- Modified default combobox trigger styles for improved visibility and consistency.
- Updated background and text colors in the combobox options for better accessibility.
- Cleaned up unused CSS variables in tailwind.css, retaining only those necessary for theme usage.
- Enhanced comments for clarity in the CSS files.
- Added new CSS files for design tokens including colors, spacing, typography, and border radius.
- Updated theme.css to import the new tokens and ensure proper usage in the UI.
- Enhanced the theme structure to support light and dark modes with semantic color mappings.
- Introduced a build script to generate theme from tokens for easier management.
- Adjusted button outline variant for consistency in dark mode styling.
- Removed unnecessary background color from combobox trigger for cleaner appearance.
- Updated comments in the theme CSS file for clarity and consistency.
- Removed the 'no-restricted-imports' rule from ESLint configuration.
- Updated `AgentSessionInputbar` to use `icon` prop for `ActionIconButton`.
- Cleaned up imports in `AssistantsTab`, `SessionItem`, and `DataSettings` components.
- Adjusted button styling in `UnifiedAddButton` and `AboutSettings` for improved layout.
- Fixed test assertions in `WebviewSearch.test.tsx` for better accuracy.
- Removed unnecessary background color from default combobox trigger variant for cleaner styling.
- Added a white background to the combobox trigger for improved visibility.
- Updated comments in the CSS file to enhance clarity and consistency in English.
- Changed button size properties to use min-height for better layout consistency.
- Simplified combobox size properties by removing height specifications.
- Enhanced combobox option rendering with improved class management for better styling.
- Updated comments in ComboboxProps to English for clarity.
- Added new brand color tokens for Cherry Studio ranging from 50 to 950.
- Updated primary color references to use brand colors for improved consistency.
- Introduced hover states for primary and destructive colors to enhance UI interactivity.
- Introduced a new Combobox component that supports single and multiple selections, search functionality, and customizable rendering of options.
- Implemented variants for different states (default, error, disabled) and sizes (small, default, large).
- Added a demo and Storybook stories to showcase various use cases and states of the Combobox.
- Refactored import statements in CodeEditor, ThinkingEffect, ErrorBoundary, and Spinner story files for consistency and clarity.
- Changed button event handlers from `onPress` to `onClick` to align with standard React practices.
- Improved type imports for better organization and maintainability.
- Deleted the todocss.css file as it was no longer needed.
- Updated Storybook main.ts to include path aliasing for better module resolution.
- Removed deprecated stories and components, streamlining the codebase.
- Added new stories for CodeEditor, Ellipsis, ExpandableText, and other components to enhance documentation and showcase functionality.
- Added loading state support to the Button component, allowing for a spinner to be displayed when the button is in a loading state.
- Introduced props for custom loading icons and adjusted button behavior to disable when loading.
- Updated various components to utilize the new loading feature for better user experience during asynchronous actions.
- Removed deprecation comments from EditableNumber and Sortable components, as they were previously marked for removal due to low usage and dependency conflicts.
- Added deprecation comments to several components and icons due to low usage (≤2 times), indicating plans for removal in future versions.
- Components affected include EditableNumber, MaxContextCount, Sortable, ThinkingEffect, FileIcons, ToolIcon, and others.
- Suggested alternatives or direct usage of other components where applicable.
- Commented out the import of color.css in index.css.
- Commented out the universal selector in tailwind.css to prevent unintended styling, with a note for future removal after migration.
- Added detailed file overview comments to CacheService and DataApiService, clarifying their roles as infrastructure components rather than business services.
- Updated README.md to reflect the new structure and naming conventions, emphasizing the distinction between infrastructure and business logic components.
- Introduced a new TestService for API testing scenarios, providing mock data and various test cases.
- Created IBaseService interface to standardize service operations across the codebase.
- Improved organization of API handlers and services for better clarity and maintainability.
- Changed the variable for muted foreground color from `--cs-foreground-secondary` to `--cs-foreground-muted` for improved clarity and consistency in styling.
- Replaced the import of `theme.css` with `tailwindcss` for improved styling management.
- Adjusted the source path to include components specifically, enhancing clarity in file structure.
- Retained the import of `tw-animate-css` for animation support.
- Deleted the obsolete DESIGN_SYSTEM.md file to streamline documentation.
- Updated MIGRATION_STATUS.md to reflect the new design token namespace (`--cs-*`) and improved clarity on migration phases and principles.
- Revised README.md to correct the number of import methods and enhance usage instructions for the updated design system.
- Changed the main CSS file reference from `globals.css` to `theme.css` in `components.json` for better theme management.
- Introduced `index.css` to export only CSS variables, allowing npm users to utilize design tokens without overriding Tailwind defaults.
- Removed `globals.css` as it is no longer needed with the new structure.
- Updated `package.json` to reflect changes in CSS file paths.
- Enhanced `README.md` to clarify installation and configuration steps for the new styling approach.
- Added new design token files including design-tokens.css and theme.css to standardize styling across the UI.
- Introduced a conversion log (CONVERSION_LOG.md) detailing the migration from todocss.css to design-tokens.css, including variable updates and deprecations.
- Updated package.json to include new CSS files for easier imports.
- Enhanced README.md to provide clear guidelines on the design reference and usage of design tokens.
- Improved globals.css to integrate with the new design token structure and ensure consistency in styling.
- Expanded the migration status document to outline the comprehensive plan for transitioning from antd + styled-components to shadcn/ui + Tailwind CSS.
- Introduced detailed migration strategies, principles, and component classification guidelines.
- Added extraction criteria and migration steps to ensure a structured approach to component migration and optimization.
- Emphasized collaboration with UI designers for maintaining design consistency throughout the migration process.
- Reformatted color variable definitions in todocss.css to enhance readability by breaking long lines into multiple lines.
- Ensured consistency in the formatting of HSLA values across the file.
- Introduced a comprehensive design system document outlining integration strategies for Tailwind CSS v4, usage guidelines, and UI library balance strategies.
- Added todocss.css file containing typography, spacing, sizing, and color variables for the design system.
- Established naming conventions and core transformation rules for design tokens to enhance consistency and usability across the UI components.
- 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.
- 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.
- Updated the proxy bypass tooltip to use InfoTooltip component for better styling and functionality.
- Maintained existing behavior while enhancing the user interface.
* 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>
- 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.
- 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.
- 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
1142 changed files with 80654 additions and 12974 deletions
index 8cc6aaf0b25bcdf3c579ec95cde12d419fcb2a71..3b3b8beaea5ad2bbac26a15f792058306d0b059f 100755
index bf429a344b7d59f70aead16b639f949b07688a81..f77d50cc5d3fb04292cb3ac7fa7085d02dcc628f 100755
--- a/sdk.mjs
--- a/sdk.mjs
+++ b/sdk.mjs
+++ b/sdk.mjs
@@ -6213,7 +6213,7 @@ function createAbortController(maxListeners = DEFAULT_MAX_LISTENERS) {
@@ -6250,7 +6250,7 @@ function createAbortController(maxListeners = DEFAULT_MAX_LISTENERS) {
}
}
// ../src/transport/ProcessTransport.ts
// ../src/transport/ProcessTransport.ts
@@ -11,16 +11,20 @@ index 8cc6aaf0b25bcdf3c579ec95cde12d419fcb2a71..3b3b8beaea5ad2bbac26a15f79205830
import { createInterface } from "readline";
import { createInterface } from "readline";
// ../src/utils/fsOperations.ts
// ../src/utils/fsOperations.ts
@@ -6505,14 +6505,11 @@ class ProcessTransport {
@@ -6619,18 +6619,11 @@ class ProcessTransport {
const errorMessage = isNativeBinary(pathToClaudeCodeExecutable) ? `Claude Code native binary not found at ${pathToClaudeCodeExecutable}. Please ensure Claude Code is installed via native installer or specify a valid path with options.pathToClaudeCodeExecutable.` : `Claude Code executable not found at ${pathToClaudeCodeExecutable}. Is options.pathToClaudeCodeExecutable set?`;
const errorMessage = isNativeBinary(pathToClaudeCodeExecutable) ? `Claude Code native binary not found at ${pathToClaudeCodeExecutable}. Please ensure Claude Code is installed via native installer or specify a valid path with options.pathToClaudeCodeExecutable.` : `Claude Code executable not found at ${pathToClaudeCodeExecutable}. Is options.pathToClaudeCodeExecutable set?`;
index 433e2efc9cef156ff5444f0c4520362ed2ef9ea7..0167441bf928a92f59b5dbe70b2317a74dda74c9 100644
--- a/scheme.json
+++ b/scheme.json
@@ -1825,6 +1825,20 @@
"string"
]
},
+ "excludeReBuildModules": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The modules to exclude from the rebuild."
+ },
"executableArgs": {
"anyOf": [
{
@@ -1975,6 +1989,13 @@
],
"description": "The mime types in addition to specified in the file associations. Use it if you don't want to register a new mime type, but reuse existing."
},
+ "minimumSystemVersion": {
+ "description": "The minimum os kernel version required to install the application.",
+ "type": [
+ "null",
+ "string"
+ ]
+ },
"packageCategory": {
"description": "backward compatibility + to allow specify fpm-only category for all possible fpm targets in one place",
"type": [
@@ -2327,6 +2348,13 @@
"MacConfiguration": {
"additionalProperties": false,
"properties": {
+ "LSMinimumSystemVersion": {
+ "description": "The minimum version of macOS required for the app to run. Corresponds to `LSMinimumSystemVersion`.",
+ "type": [
+ "null",
+ "string"
+ ]
+ },
"additionalArguments": {
"anyOf": [
{
@@ -2527,6 +2555,20 @@
"string"
]
},
+ "excludeReBuildModules": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The modules to exclude from the rebuild."
+ },
"executableName": {
"description": "The executable name. Defaults to `productName`.",
"type": [
@@ -2737,7 +2779,7 @@
"type": "boolean"
},
"minimumSystemVersion": {
- "description": "The minimum version of macOS required for the app to run. Corresponds to `LSMinimumSystemVersion`.",
+ "description": "The minimum os kernel version required to install the application.",
"type": [
"null",
"string"
@@ -2959,6 +3001,13 @@
"MasConfiguration": {
"additionalProperties": false,
"properties": {
+ "LSMinimumSystemVersion": {
+ "description": "The minimum version of macOS required for the app to run. Corresponds to `LSMinimumSystemVersion`.",
+ "type": [
+ "null",
+ "string"
+ ]
+ },
"additionalArguments": {
"anyOf": [
{
@@ -3159,6 +3208,20 @@
"string"
]
},
+ "excludeReBuildModules": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The modules to exclude from the rebuild."
+ },
"executableName": {
"description": "The executable name. Defaults to `productName`.",
"type": [
@@ -3369,7 +3432,7 @@
"type": "boolean"
},
"minimumSystemVersion": {
- "description": "The minimum version of macOS required for the app to run. Corresponds to `LSMinimumSystemVersion`.",
+ "description": "The minimum os kernel version required to install the application.",
"type": [
"null",
"string"
@@ -6381,6 +6444,20 @@
"string"
]
},
+ "excludeReBuildModules": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The modules to exclude from the rebuild."
+ },
"executableName": {
"description": "The executable name. Defaults to `productName`.",
"type": [
@@ -6507,6 +6584,13 @@
"string"
]
},
+ "minimumSystemVersion": {
+ "description": "The minimum os kernel version required to install the application.",
+ "type": [
+ "null",
+ "string"
+ ]
+ },
"protocols": {
"anyOf": [
{
@@ -7153,6 +7237,20 @@
"string"
]
},
+ "excludeReBuildModules": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The modules to exclude from the rebuild."
+ },
"executableName": {
"description": "The executable name. Defaults to `productName`.",
"type": [
@@ -7376,6 +7474,13 @@
],
"description": "MAS (Mac Application Store) development options (`mas-dev` target)."
},
+ "minimumSystemVersion": {
+ "description": "The minimum os kernel version required to install the application.",
@@ -7,11 +7,22 @@ This file provides guidance to AI coding assistants when working with code in th
- **Keep it clear**: Write code that is easy to read, maintain, and explain.
- **Keep it clear**: Write code that is easy to read, maintain, and explain.
- **Match the house style**: Reuse existing patterns, naming, and conventions.
- **Match the house style**: Reuse existing patterns, naming, and conventions.
- **Search smart**: Prefer `ast-grep` for semantic queries; fall back to `rg`/`grep` when needed.
- **Search smart**: Prefer `ast-grep` for semantic queries; fall back to `rg`/`grep` when needed.
- **Build with Tailwind CSS & Shadcn UI**: Use components from `@packages/ui` (Shadcn UI + Tailwind CSS) for every new UI component; never add `antd` or `styled-components`.
- **Log centrally**: Route all logging through `loggerService` with the right context—no `console.log`.
- **Log centrally**: Route all logging through `loggerService` with the right context—no `console.log`.
- **Research via subagent**: Lean on `subagent` for external docs, APIs, news, and references.
- **Research via subagent**: Lean on `subagent` for external docs, APIs, news, and references.
- **Always propose before executing**: Before making any changes, clearly explain your planned approach and wait for explicit user approval to ensure alignment and prevent unwanted modifications.
- **Always propose before executing**: Before making any changes, clearly explain your planned approach and wait for explicit user approval to ensure alignment and prevent unwanted modifications.
- **Lint, test, and format before completion**: Coding tasks are only complete after running `yarn lint`, `yarn test`, and `yarn format` successfully.
- **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 Tailwind CSS and Shadcn UI. Please use components from `@packages/ui` 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.)
@@ -32,7 +32,7 @@ To help you get familiar with the codebase, we recommend tackling issues tagged
### Testing
### Testing
Features without tests are considered non-existent. To ensure code is truly effective, relevant processes should be covered by unit tests and functional tests. Therefore, when considering contributions, please also consider testability. All tests can be run locally without dependency on CI. Please refer to the "Testing" section in the [Developer Guide](docs/dev.md).
Features without tests are considered non-existent. To ensure code is truly effective, relevant processes should be covered by unit tests and functional tests. Therefore, when considering contributions, please also consider testability. All tests can be run locally without dependency on CI. Please refer to the "Testing" section in the [Developer Guide](docs/zh/guides/development.md).
### Automated Testing for Pull Requests
### Automated Testing for Pull Requests
@@ -60,7 +60,7 @@ Maintainers are here to help you implement your use case within a reasonable tim
### Participating in the Test Plan
### Participating in the Test Plan
The Test Plan aims to provide users with a more stable application experience and faster iteration speed. For details, please refer to the [Test Plan](docs/testplan-en.md).
The Test Plan aims to provide users with a more stable application experience and faster iteration speed. For details, please refer to the [Test Plan](docs/en/guides/test-plan.md).
@@ -19,7 +19,7 @@ Users are welcome to submit issues or provide feedback through other channels fo
### Participating in the Test Plan
### Participating in the Test Plan
Developers should submit `PRs` according to the [Contributor Guide](../CONTRIBUTING.md) (and ensure the target branch is `main`). The repository maintainers will evaluate whether the `PR` should be included in the Test Plan based on factors such as the impact of the feature on the application, its importance, and whether broader testing is needed.
Developers should submit `PRs` according to the [Contributor Guide](../../CONTRIBUTING.md) (and ensure the target branch is `main`). The repository maintainers will evaluate whether the `PR` should be included in the Test Plan based on factors such as the impact of the feature on the application, its importance, and whether broader testing is needed.
If the `PR` is added to the Test Plan, the repository maintainers will:
If the `PR` is added to the Test Plan, the repository maintainers will:
Currently, AppUpdater directly queries the GitHub API to retrieve beta and rc update information. To support users in China, we need to fetch a static JSON configuration file from GitHub/GitCode based on IP geolocation, which contains update URLs for all channels.
## Design Goals
1. Support different configuration sources based on IP geolocation (GitHub/GitCode)
2. Support version compatibility control (e.g., users below v1.x must upgrade to v1.7.0 before upgrading to v2.0)
4. Maintain compatibility with existing electron-updater mechanism
## Current Version Strategy
- **v1.7.x** is the last version of the 1.x series
- Users **below v1.7.0** must first upgrade to v1.7.0 (or higher 1.7.x version)
- Users **v1.7.0 and above** can directly upgrade to v2.x.x
## Automation Workflow
The `x-files/app-upgrade-config/app-upgrade-config.json` file is synchronized by the [`Update App Upgrade Config`](../../.github/workflows/update-app-upgrade-config.yml) workflow. The workflow runs the [`scripts/update-app-upgrade-config.ts`](../../scripts/update-app-upgrade-config.ts) helper so that every release tag automatically updates the JSON in `x-files/app-upgrade-config`.
- When GitHub marks the release as _prerelease_, the tag must include `-beta`/`-rc` (with optional numeric suffix). Otherwise the workflow exits early.
- When GitHub marks the release as stable, the tag must match the latest release returned by the GitHub API. This prevents out-of-order updates when publishing historical tags.
- If the guard clauses pass, the version is tagged as `latest` or `beta/rc` based on its semantic suffix and propagated to the script through the `IS_PRERELEASE` flag.
- When `is_prerelease=true`, the tag must carry a beta/rc suffix, mirroring the automatic validation.
- Manual runs still download the latest release metadata so that the workflow knows whether the tag represents the newest stable version (for documentation inside the PR body).
### Workflow Steps
1.**Guard + metadata preparation**– the `Check if should proceed` and `Prepare metadata` steps compute the target tag, prerelease flag, whether the tag is the newest release, and a `safe_tag` slug used for branch names. When any rule fails, the workflow stops without touching the config.
2.**Checkout source branches**– the default branch is checked out into `main/`, while the long-lived `x-files/app-upgrade-config` branch lives in `cs/`. All modifications happen in the latter directory.
3.**Install toolchain**– Node.js 22, Corepack, and frozen Yarn dependencies are installed inside `main/`.
4.**Run the update script**–`yarn tsx scripts/update-app-upgrade-config.ts --tag <tag> --config ../cs/app-upgrade-config.json --is-prerelease <flag>` updates the JSON in-place.
- The script normalizes the tag (e.g., strips `v` prefix), detects the release channel (`latest`, `rc`, `beta`), and loads segment rules from `config/app-upgrade-segments.json`.
- It validates that prerelease flags and semantic suffixes agree, enforces locked segments, builds mirror feed URLs, and performs release-availability checks (GitHub HEAD request for every channel; GitCode GET for latest channels, falling back to `https://releases.cherry-ai.com` when gitcode is delayed).
- After updating the relevant channel entry, the script rewrites the config with semver-sort order and a new `lastUpdated` timestamp.
5.**Detect changes + create PR**– if `cs/app-upgrade-config.json` changed, the workflow opens a PR `chore/update-app-upgrade-config/<safe_tag>` against `x-files/app-upgrade-config` with a commit message `🤖 chore: sync app-upgrade-config for <tag>`. Otherwise it logs that no update is required.
### Manual Trigger Guide
1. Open the Cherry Studio repository on GitHub → **Actions** tab → select **Update App Upgrade Config**.
2. Click **Run workflow**, choose the default branch (usually `main`), and fill in the `tag` input (e.g., `v2.1.0`).
3. Toggle `is_prerelease` only when the tag carries a prerelease suffix (`-beta`, `-rc`). Leave it unchecked for stable releases.
4. Start the run and wait for it to finish. Check the generated PR in the `x-files/app-upgrade-config` branch, verify the diff in `app-upgrade-config.json`, and merge once validated.
**Note**: Both mirrors provide the same configuration file hosted on the `x-files/app-upgrade-config` branch. The client automatically selects the optimal mirror based on IP geolocation.
-`lastUpdated`: Last update time of the configuration file (ISO 8601 format)
-`versions`: Version configuration object, key is the version number, sorted by semantic versioning
-`minCompatibleVersion`: Minimum compatible version that can upgrade to this version
-`description`: Version description
-`channels`: Update channel configuration
-`latest`: Stable release channel
-`rc`: Release Candidate channel
-`beta`: Beta testing channel
- Each channel contains:
-`version`: Version number for this channel
-`feedUrls`: Multi-mirror URL configuration
-`github`: electron-updater feed URL for GitHub mirror
-`gitcode`: electron-updater feed URL for GitCode mirror
-`metadata`: Stable mapping info for automation
-`segmentId`: ID from `config/app-upgrade-segments.json`
-`segmentType`: Optional flag (`legacy` | `breaking` | `latest`) for documentation/debugging
## TypeScript Type Definitions
```typescript
// Mirror enum
enumUpdateMirror{
GITHUB='github',
GITCODE='gitcode'
}
interfaceUpdateConfig{
lastUpdated: string
versions:{
[versionKey: string]:VersionConfig
}
}
interfaceVersionConfig{
minCompatibleVersion: string
description: string
channels:{
latest: ChannelConfig|null
rc: ChannelConfig|null
beta: ChannelConfig|null
}
metadata?:{
segmentId: string
segmentType?:'legacy'|'breaking'|'latest'
}
}
interfaceChannelConfig{
version: string
feedUrls: Record<UpdateMirror,string>
// Equivalent to:
// feedUrls: {
// github: string
// gitcode: string
// }
}
```
## Segment Metadata & Breaking Markers
- **Segment definitions** now live in `config/app-upgrade-segments.json`. Each segment describes a semantic-version range (or exact matches) plus metadata such as `segmentId`, `segmentType`, `minCompatibleVersion`, and per-channel feed URL templates.
- Each entry under `versions` carries a `metadata.segmentId`. This acts as the stable key that scripts use to decide which slot to update, even if the actual semantic version string changes.
- Mark major upgrade gateways (e.g., `2.0.0`) by giving the related segment a `segmentType: "breaking"` and (optionally) `lockedVersion`. This prevents automation from accidentally moving that entry when other 2.x builds ship.
- Adding another breaking hop (e.g., `3.0.0`) only requires defining a new segment in the JSON file; the automation will pick it up on the next run.
## Automation Workflow
Starting from this change, `.github/workflows/update-app-upgrade-config.yml` listens to GitHub release events (published + prerelease). The workflow:
1. Checks out the default branch (for scripts) and the `x-files/app-upgrade-config` branch (where the config is hosted).
2. Runs `yarn tsx scripts/update-app-upgrade-config.ts --tag <tag> --config ../cs/app-upgrade-config.json` to regenerate the config directly inside the `x-files/app-upgrade-config` working tree.
3. If the file changed, it opens a PR against `x-files/app-upgrade-config` via `peter-evans/create-pull-request`, with the generated diff limited to `app-upgrade-config.json`.
You can run the same script locally via `yarn update:upgrade-config --tag v2.1.6 --config ../cs/app-upgrade-config.json` (add `--dry-run` to preview) to reproduce or debug whatever the workflow does. Passing `--skip-release-checks` along with `--dry-run` lets you bypass the release-page existence check (useful when the GitHub/GitCode pages aren’t published yet). Running without `--config` continues to update the copy in your current working directory (main branch) for documentation purposes.
## Version Matching Logic
### Algorithm Flow
1. Get user's current version (`currentVersion`) and requested channel (`requestedChannel`)
2. Get all version numbers from configuration file, sort in descending order by semantic versioning
3. Iterate through the sorted version list:
- Check if `currentVersion >= minCompatibleVersion`
- Check if the requested `channel` exists and is not `null`
- If conditions are met, return the channel configuration
4. If no matching version is found, return `null`
### Pseudocode Implementation
```typescript
functionfindCompatibleVersion(
currentVersion: string,
requestedChannel: UpgradeChannel,
config: UpdateConfig
):ChannelConfig|null{
// Get all version numbers and sort in descending order
All special view components share a common architecture for consistent user experience and functionality. For detailed information about these components and their implementation, see [Image Preview Components Documentation](./ImagePreview-en.md).
All special view components share a common architecture for consistent user experience and functionality. For detailed information about these components and their implementation, see [Image Preview Components Documentation](./image-preview.md).
A New Era of Intelligence with Cherry Studio 1.7.1
New Features:
Today we're releasing Cherry Studio 1.7.1 — our most ambitious update yet, introducing Agent: autonomous AI that thinks, plans, and acts.
- Enhanced Input Bar: Completely redesigned input bar with improved responsiveness and functionality
- Better File Handling: Improved drag-and-drop and paste support for images and documents
- Smart Tool Suggestions: Enhanced quick panel with better item selection and keyboard shortcuts
Improvements:
For years, AI assistants have been reactive — waiting for your commands, responding to your questions. With Agent, we're changing that. Now, AI can truly work alongside you: understanding complex goals, breaking them into steps, and executing them independently.
- Smoother Input Experience: Better auto-resizing and text handling in chat input
- Enhanced AI Performance: Improved connection stability and response speed
- More Reliable File Uploads: Better support for various file types and upload scenarios
- Cleaner Interface: Optimized UI elements for better visual consistency
Bug Fixes:
This is what we've been building toward. And it's just the beginning.
- Fixed image selection issue when adding custom AI providers
- Fixed file upload problems with certain API configurations
🤖 Meet Agent
- Fixed input bar responsiveness issues
Imagine having a brilliant colleague who never sleeps. Give Agent a goal — write a report, analyze data, refactor code — and watch it work. It reasons through problems, breaks them into steps, calls the right tools, and adapts when things change.
- Fixed quick panel not working properly in some situations
- **Think → Plan → Act**: From goal to execution, fully autonomous
- **Deep Reasoning**: Multi-turn thinking that solves real problems
- **Tool Mastery**: File operations, web search, code execution, and more
- **Skill Plugins**: Extend with custom commands and capabilities
- **You Stay in Control**: Real-time approval for sensitive actions
- **Full Visibility**: Every thought, every decision, fully transparent
//FIXME: The prompt is move from memory-prompts.ts to here. 下面日期获取是固定的,这是个问题,需要做特殊处理
exportconstMEMORY_FACT_EXTRACTION_PROMPT=`You are a Personal Information Organizer, specialized in accurately storing facts, user memories, and preferences. Your primary role is to extract relevant pieces of information about the user from conversations and organize them into distinct, manageable facts. Your focus is exclusively on personal information. You must ignore general statements, common knowledge, or facts that are not personal to the user (e.g., "the sky is blue", "grass is green"). This allows for easy retrieval and personalization in future interactions. Below are the types of information you need to focus on and the detailed instructions on how to handle the input data.
Example(a)--ifthememorycontains"User likes to play cricket"andtheretrievedfactis"Loves to play cricket with friends",thenupdatethememorywiththeretrievedfacts.
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
* 1. Memory cache (cross-component within renderer)
* 2. Shared cache (cross-window via IPC)
* 3. Persist cache (cross-window with localStorage persistence)
*/
/**
* Cache entry with optional TTL support
*/
exportinterfaceCacheEntry<T=any>{
value: T
expireAt?: number// Unix timestamp
}
/**
* Cache synchronization message for IPC communication
*/
exportinterfaceCacheSyncMessage{
type:'shared'|'persist'
key: string
value: any
ttl?: number
}
/**
* Batch cache synchronization message
*/
exportinterfaceCacheSyncBatchMessage{
type:'shared'|'persist'
entries: Array<{
key: string
value: any
ttl?: number
}>
}
/**
* Cache subscription callback
*/
exporttypeCacheSubscriber=()=>void
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.