This commit updates the AssistantsTab component to only display group titles for tagged assistants, excluding the 'untagged' category. This change enhances the UI by reducing clutter and improving clarity in the display of assistant groups.
* chore: update OpenAI package to version 5.1.0 and adjust related patches
- Updated OpenAI dependency from version 4.96.0 to 5.1.0 in package.json and yarn.lock.
- Removed obsolete patch for OpenAI 4.96.0 and added new patch for OpenAI 5.1.0.
- Adjusted types for image handling in OpenAIResponseProvider to use Uploadable instead of FileLike.
- Minor code refactoring for better clarity and maintainability.
* refactor(OpenAIResponseProvider): remove logging for image generation process
This commit restructures the localization strings for Notion settings in the Japanese language file, moving them from a nested structure to a more accessible format. This change improves clarity and maintainability of the localization data.
* Add support for TokenFlux image generation service
This commit integrates TokenFlux as a new painting provider with dynamic
form generation based on model schemas, real-time generation polling,
and full painting history management.
Key features:
- Dynamic form rendering from JSON schema input parameters
- Model selection with pricing display
- Real-time generation status polling
- Integration with existing painting workflow and file management
- Provider-specific painting state management
The implementation follows existing patterns from other painting pages
while adding TokenFlux-specific functionality like schema-based form
generation and asynchronous polling for generation results.
* Add image upload support and comparison view to TokenFlux
Implements file upload handling for image parameters with base64
conversion, random seed generation, and side-by-side comparison
layout when input images are present.
* Refactor TokenFlux to use service class and components
Extract form rendering logic to DynamicFormRender component and API
logic to TokenFluxService class. Simplifies the main component by
removing duplicate code for model fetching, image generation polling,
and form field rendering.
* Refactor TokenFlux to fix state management and polling
- Change painting field from modelId to model for consistency
- Fix updatePaintingState to use functional state updates
- Add automatic polling for in-progress generations on mount
- Group models by provider in the selection dropdown
- Separate prompt from other input params in form data handling
- Improve error handling in the paintings store
* Auto-select first model when models are loaded
* Add image generation UI localization strings
Add translation keys for model selection, input parameters, image
labels, pricing display, and form validation across all supported
locales (en-us, ja-jp, ru-ru, zh-cn, zh-tw). Update TokenFluxPage
component to use localized strings instead of hardcoded English text.
* fix: Add a right border to the first child of the ImageComparisonSection
* style: Remove padding from UploadedImageContainer in TokenFluxPage
* feat: Implement caching for TokenFlux model fetching and update image upload handling
* feat: Enhance localization support by adding language context handling in TokenFluxPage
* refactor: Simplify layout structure in TokenFluxPage by removing unnecessary SectionGroup components and improving section title styling
---------
Co-authored-by: kangfenmao <kangfenmao@qq.com>
* feat(markdown-export): add option to show model name in export
* refactor(export): Refactor the Obsidian export modal to Ant Design style
* refactor(obsidian-export): export to obsidian using markdown interface & support COT
* feat(markdown-export): optimize COT export style, support export model & provider name
Add a new setting to toggle displaying the model provider alongside the
model name in markdown exports. Update the export logic to include the
provider name when enabled, improving context and clarity of exported
messages. Also fix invalid filename character removal regex for Mac.
* feat(export): add option to export reasoning in Joplin notes
Introduce a new setting to toggle exporting reasoning details when
exporting topics or messages to Joplin. Update the export function to
handle raw messages and convert them to markdown with or without
reasoning based on the setting. This improves the export feature by
allowing users to include more detailed context in their Joplin notes.
* feat(export): update i18n for new export options
* fix(settings): remove duplicate showModelNameInMarkdown state
* feat(export): add CoT export for notion & optmize notion export
* feat(export): update Notion settings i18n
* fix(utils): correct citation markdown formatting
Swap citation title and URL positions in markdown links to ensure
the link text displays the title (or URL if title is missing) and
the link points to the correct URL. This improves citation clarity.
* feat(Translation): enhance translation functionality and UI improvements
- Added secondary text color variables in color.scss for better UI contrast.
- Updated translation configuration to include language codes for better language handling.
- Enhanced translation UI with new language selection options and improved loading indicators.
- Implemented smart translation tips in multiple language JSON files for user guidance.
- Refactored translation logic to streamline message processing and error handling.
* feat(Translation): expand language options and update localization files
- Added new languages (Polish, Turkish, Thai, Vietnamese, Indonesian, Urdu, Malay) to translation options in translate.ts.
- Updated localization JSON files (en-us, ja-jp, ru-ru, zh-cn, zh-tw) to include translations for the new languages.
- Enhanced language detection logic in translate.ts to support new language codes.
* refactor(IpcChannel): rename theme change event and streamline theme handling
- Updated the IpcChannel enum to rename 'theme:change' to 'theme:updated' for clarity.
- Refactored theme handling in ipc.ts to utilize a new ThemeService, simplifying theme updates and event broadcasting.
- Adjusted various components to consistently use the updated theme variable naming convention.
* refactor(Theme): standardize theme handling across components
- Updated theme retrieval to use 'actualTheme' instead of 'theme' for consistency.
- Changed default theme setting from 'auto' to 'system' in ConfigManager and related components.
- Adjusted theme handling in various components to reflect the new naming convention and ensure proper theme application.
* fix(Theme): improve theme handling and migration logic
- Added a console log for debugging theme transitions in ThemeProvider.
- Updated ThemeService to ensure theme is set correctly when changed.
- Incremented version number in store configuration to reflect changes.
- Enhanced migration logic to convert 'auto' theme setting to 'system' for better consistency.
* feat(Theme): add getTheme IPC channel and improve theme management
- Introduced a new IPC channel 'App_GetTheme' to retrieve the current theme.
- Updated ThemeService to include a method for getting the current theme.
- Refactored theme initialization in WindowService to ensure proper theme setup.
- Enhanced theme handling in various components to utilize the new theme retrieval method.
* fix(ThemeService): improve theme initialization and retrieval logic
- Set default theme to 'system' and updated theme initialization to handle legacy versions.
- Enhanced getTheme method to return both the current theme and the actual theme based on nativeTheme settings.
- Removed redundant initTheme method from ThemeService and ensured themeService is imported in WindowService for proper initialization.
- Updated ThemeProvider to handle the new structure of the theme retrieval response.
* refactor(Settings): remove theme management from settings
- Eliminated theme-related state and actions from the settings slice.
- Updated useSettings hook to remove theme handling functionality.
- Cleaned up imports by removing unused ThemeMode type.
* refactor(Theme): update theme retrieval in GeneralSettings and HomeWindow
- Restored theme retrieval in GeneralSettings and HomeWindow components.
- Adjusted imports to ensure proper theme management.
- Updated theme condition checks to utilize the ThemeMode enumeration for consistency.
* refactor(Theme): update theme terminology and retrieval in Sidebar and DisplaySettings
- Changed theme label from 'auto' to 'system' in multiple localization files for consistency.
- Updated Sidebar component to reflect the new theme terminology.
- Adjusted DisplaySettings to display the updated theme label.
* refactor(ThemeProvider): initialize theme state from API response
* refactor(ThemeProvider): reset theme state to default values and streamline initialization logic
* refactor(Theme): enhance theme management by incorporating 'system' mode and updating state handling
- Updated ThemeService to include 'system' as a valid theme option.
- Refactored ThemeProvider to utilize useSettings for theme state management and ensure proper initialization.
- Adjusted useSettings to include theme setting functionality.
- Modified settings slice to manage theme state effectively.
* refactor(WindowService, ThemeProvider, Messages, HomeWindow): streamline imports and clean up unused variables
- Removed duplicate import of ThemeService in WindowService.
- Adjusted import order in ThemeProvider for clarity.
- Simplified useSettings destructuring in Messages component.
- Cleaned up unused ThemeMode import in HomeWindow.
* refactor(Theme): standardize theme usage across components by replacing 'actualTheme' with 'theme'
- Updated components to consistently use 'theme' instead of 'actualTheme' for better clarity and maintainability.
- Adjusted ThemeProvider to reflect changes in theme state management.
- Ensured all relevant components are aligned with the new theme structure.
* refactor(Theme): remove unused theme retrieval functionality
- Eliminated the App_GetTheme channel and associated methods from ThemeService and IPC handling.
- Updated components to use the new theme structure, replacing 'actualTheme' with 'settedTheme' for consistency.
- Ensured all theme-related functionalities are streamlined and aligned with the latest changes.
* refactor(Theme): update theme variable usage in ChatFlowHistory and GeneralSettings
- Replaced 'theme' with 'settedTheme' in ChatFlowHistory for consistency with recent theme structure changes.
- Simplified theme destructuring in GeneralSettings by removing unused 'themeMode' variable.
- Ensured alignment with the latest theme management updates across components.
* refactor(Theme): update theme variable in GeneralSettings component
- Replaced 'themeMode' with 'theme' in GeneralSettings for consistency with recent theme structure changes.
- Ensured alignment with the latest theme management updates across components.
---------
Co-authored-by: beyondkmp <beyondkmkp@gmail.com>
- Removed unused 'right' prop from Scrollbar component.
- Increased scrolling timeout duration for better user experience.
- Updated scrollbar styles to simplify color handling.
- Adjusted Messages component to remove unnecessary props and added margin for better layout.
- Added responsive styles to CitationBlock for improved mobile display.
- Introduced a new setting to remember the last adjusted size of the action window.
- Updated ConfigManager, SelectionService, and IPC channels to handle the new feature.
- Enhanced UI components to allow users to toggle the "Remember Size" option.
- Localized the new setting in multiple languages.
- Added a mock Redux store to the QuickPanelView tests for better state management.
- Refactored test rendering to use a wrapper function for consistent provider usage.
- Updated Scrollbar test to verify throttle behavior with new delay and options.
- Renamed variables for consistency, changing `AssistantsTabSortType` to `assistantsTabSortType`.
- Refactored tag calculation in `useTags` to utilize `uniq` and `flatMap` for better performance and readability.
- Updated localization files to remove unnecessary characters in quick trigger messages.
- Enhanced the `AssistantItem` component by extracting menu item creation logic and sorting functions for better maintainability.
- Introduced a new color selection feature in DisplaySettings, allowing users to choose from predefined theme color presets.
- Added a dedicated section for zoom settings in the DisplaySettings component, enhancing user customization options.
- Updated localization files to include new zoom settings titles in multiple languages.
- Updated styles for message content and group containers to improve layout.
- Added new selectors to exclude additional elements from navigation.
- Implemented conditional rendering for mentions in message content.
- Simplified token display logic in message tokens component.
* feat(theme): 用户自定义主题色
* refactor(QuickPanel): integrate user theme for dynamic color handling
* refactor(ThemeProvider): separate user theme initialization into its own useEffect
* refactor(useUserTheme): move theme initialization logic into a dedicated function
* feat(settings): enhance color picker with presets and update styles for ant-collapse
* feat: Refactor theme management to use userTheme object for colorPrimary
* feat: add filter mode and list functionality to selection assistant
- Introduced new filter mode options (default, whitelist, blacklist) for the selection assistant.
- Added methods to set and get filter mode and filter list in ConfigManager.
- Enhanced SelectionService to manage filter mode and list, affecting text selection processing.
- Updated UI components to allow users to configure filter settings.
- Localized new filter settings in multiple languages.
* feat: support Shift+Click & enhance Ctrl key method
* fix: remove comments
* refactor(ChatNavigation): move down the navigation bar
* refactor: attach listeners to MessagesContainer for better triggering experience
* refactor: add delay to Tooltips
* refactor: exclude some toolbars areas from triggering
feat: add filter mode and list functionality to selection assistant
- Introduced new filter mode options (default, whitelist, blacklist) for the selection assistant.
- Added methods to set and get filter mode and filter list in ConfigManager.
- Enhanced SelectionService to manage filter mode and list, affecting text selection processing.
- Updated UI components to allow users to configure filter settings.
- Localized new filter settings in multiple languages.
- Added eslint-disable comments for react-hooks/exhaustive-deps in CustomCollapse, DmxapiPage, SelectionActionApp, ActionGeneral, and ActionTranslate components to prevent warnings related to missing dependencies in useEffect hooks.
- Adjusted max token limit for 'claude-sonnet-4' and 'claude-opus-4' models from 64000 to 32000.
- Simplified reasoning checks in OpenAIProvider to combine conditions for supported models, enhancing code clarity.
- Replaced the existing TikToken implementation with a placeholder error message indicating it is not implemented.
- Removed the js-tiktoken dependency from package.json to streamline the project.
- Updated yarn.lock to reflect changes in dependencies and checksums.
* fix: increase max cache limit and update slider marks in MiniAppSettings
* fix: adjust max cache limit and update slider marks in MiniAppSettings
* Update MiniAppSettings.tsx
---------
Co-authored-by: George Zhao <georgezhao@SKJLAB>
- Updated exclusion patterns to ensure more comprehensive filtering of unnecessary files and directories during the build process.
- Added additional file types and configurations to the exclusion list for better optimization.
Co-authored-by: beyondkmp <beyondkmkp@gmail.com>
* refactor: TrayService
- Removed the App_RestartTray channel from IpcChannel and its usage in ipc.ts and preload/index.ts.
- Updated TrayService to handle configuration changes without the need for a restart.
- Enhanced ConfigManager to notify subscribers on language and quick assistant settings changes.
- Adjusted QuickAssistantSettings to close the mini window based on the quick assistant's enable state.
* refactor: enhance configuration management
- Updated ConfigManager to consolidate setting and notification logic into a single method, setAndNotify.
- Modified IPC handler to accept an additional parameter for notification control.
- Adjusted QuickAssistantSettings to utilize the new parameter for enabling notifications during configuration changes.
- Introduced defaultPaintingProvider in settings to manage selected painting provider.
- Updated Sidebar component to reflect the selected painting provider in the route.
- Enhanced PaintingsRoutePage to dispatch the default painting provider based on URL parameters.
- Added PaintingProvider type to define available options for painting providers.
* feat: add title prototype to selection action button in compact mode
* fix: optimize the display name logic for action buttons in the selection toolbar
- Added exclusions for various distribution directories and module types to optimize the build process.
- Updated license file exclusions to be more inclusive of different casing variations.
- Updated the @google/genai dependency in package.json and yarn.lock to version 1.0.1.
- Removed the GeminiService and its related references from the codebase to streamline functionality.
- Introduced a new CacheService for managing cached data effectively.
* chore: update package dependencies and refactor BackupManager to use fs.promises
- Removed unused dependencies: fetch-socks and fs-extra from package.json and yarn.lock.
- Updated BackupManager to utilize fs.promises for file system operations, improving consistency and modernizing the codebase.
- Ensured all file operations in BackupManager are handled with promises for better error handling and readability.
* chore: add fs-extra dependency and refactor BackupManager for improved file handling
- Added fs-extra to package.json and updated yarn.lock to enhance file system operations.
- Refactored BackupManager to utilize fs-extra methods for better readability and functionality, replacing fs.promises with fs-extra equivalents for directory and file operations.
---------
Co-authored-by: beyondkmp <beyondkmkp@gmail.com>
* feat(selection): implement selection assistant with toolbar and action management
- Added selection assistant functionality including a toolbar for actions.
- Introduced new settings for enabling/disabling the selection assistant and configuring its behavior.
- Implemented action items for built-in functionalities like translate, explain, and copy.
- Integrated selection service to manage selection events and actions.
- Updated localization files to support new selection assistant features in multiple languages.
- Added new components for action management and user interaction within the selection assistant.
* chore: update selection-hook to version 0.9.10 and exclude prebuilds from packaging
* fix: toolbar hiding
* feat: enhance error handling and service management in main index
* fix: improve logical coordinate handling in SelectionService
* fix: update URL loading and coordinate conversion in SelectionService
* fix: replace console.error with Logger for error handling in SelectionService
* refactor(SelectionService): enhance preloaded action window management
* chore(electron-builder): add filter for .node build files in configuration
* fix: toolbar position calculating for multi monitor
* fix: update selection assistant configuration and improve error handling in SelectionService
* fix: SelectionActionUserModal layout
* feat: add hints for custom search URL in multiple languages
* fix: update calculateToolbarPosition to ensure integer return type and round position values
* feat: add action window opacity setting and update related UI components
refactor: SelectionActionsList
* chore: enhance tooltip for trigger mode settings
* fix: console.log
* chore: update selection-hook to version 0.9.12
* fix: integrate language settings into selection components
* fix: filter out default assistant from user predefined assistants in selection modal
* chore: update selection-hook package version to 0.9.13
* chore: update selection-hook package version to 0.9.14
* test: more unit tests
- Adjust vitest configuration to handle main process and renderer process tests separately
- Add unit tests for main process utils
- Add unit tests for the renderer process
- Add three component tests to verify vitest usage: `DragableList`, `Scrollbar`, `QuickPanelView`
- Add an e2e startup test to verify playwright usage
- Extract `splitApiKeyString` and add tests for it
- Add and format some comments
* fix: mock individual properties
* test: add tests for CustomTag
* test: add tests for ExpandableText
* test: conditional rendering tooltip of tag
* chore: update dependencies
- Modified electron-builder.yml to refine file inclusion/exclusion patterns.
- Removed and re-added dependencies in package.json for consistency and updated yarn.lock to reflect these changes.
- Cleaned up unnecessary entries in yarn.lock to streamline the dependency tree.
- Consolidated edit and delete menu items for providers into separate constants for improved readability and maintainability.
- Enhanced the logic for displaying menus based on provider status, ensuring correct options are presented for system providers and initial providers.
- Updated release notes to include new DMXAPI service and fixed knowledge base search results issue.
- Enhanced drag-and-drop functionality for message selection and resolved memory exceptions in translation replies.
- Added styling adjustments for context menu and improved layout in CodeBlockView and MessageGroup components.
* chore: update electron configuration and add debug script
- Added sourcemap generation for development builds in electron.vite.config.ts.
- Introduced a new debug script in package.json for easier debugging with remote inspection.
* docs: add debug section to development documentation
- Introduced a new section for debugging instructions, including the command to run the debug script and how to access the Chrome inspect tool.
- Introduced a new dark mode logo for DMXAPI and updated the logo rendering logic in the DMXAPISettings component to switch between light and dark logos based on the current theme.
- Renumbered feature sections for clarity and consistency across English, Japanese, and Chinese README files.
- Improved formatting by removing unnecessary bullet points for a cleaner presentation of core features, knowledge management, platform support, and advanced features.
- Revised the TODO section to a comprehensive roadmap outlining core features, knowledge management, platform support, and advanced features.
- Added links to the project board and GitHub Discussions for community engagement and feedback.
- Introduced throttling to the updateTranslationBlock dispatch function to limit the frequency of updates, enhancing performance during message operations.
- Utilized lodash's throttle function to ensure efficient handling of accumulated text updates.
* fix: enhance ExportService to support nested bold and italic formatting
- Added tracking for nested bold and italic tags in the ExportService.
- Updated text rendering logic to apply bold and italic styles based on the nesting level of the tags.
* fix: remove unused citation variable in messageToMarkdown function
* feat: enhance citation handling in message export functionality
- Refactored message export functions to include citation content in markdown output.
- Introduced a new utility function to extract and format citations from messages.
- Updated related imports and adjusted existing markdown generation logic for improved clarity and maintainability.
* feat: enhance message export tests to include citation and reasoning content
- Added tests to verify inclusion of citation content in markdown output when citation blocks exist.
- Ensured proper formatting with double newlines between sections in exported markdown.
- Updated existing tests to handle cases with reasoning content and no main text block gracefully.
* fix: update citation mapping in export tests for consistency
- Modified the citation mapping in export tests to use the index parameter directly, improving clarity and consistency in the generated markdown output.
* Fix: MessageMenubar copy uses latest content
The 'Copy' button in MessageMenubar was previously using memoized content
derived from component props. This could lead to copying stale content if
you edited a message (e.g., a code block), saved it, and then
immediately clicked 'Copy', because the asynchronous Redux store update
might not have completed and propagated to the props yet.
This commit modifies the onCopy function in MessageMenubar.tsx to
fetch the latest version of the message directly from the Redux store
(store.getState().messages.entities[message.id]) at the moment the
copy action is performed. This ensures that the most up-to-date content
is always copied, resolving the stale content issue.
* Chore: Remove unnecessary comments from MessageMenubar
Removes a few explanatory comments from the onCopy function in
MessageMenubar.tsx that were deemed unnecessary, to keep the code
cleaner.
The comments originated from an example provided in a previous description. The core logic of the function remains unchanged.
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
* feat: add disable MCP server functionality and update translations
* feat: update MCPToolsButton and WebSearchButton to use CircleX icon and change labels to 'close'
---------
Co-authored-by: kangfenmao <kangfenmao@qq.com>
- Included package mappings for 'win32-arm64' and 'win32-arm64-baseline' to the BUN_PACKAGES object in install-bun.js, enhancing compatibility with ARM64 devices on Windows.
- Updated release notes to include new features such as TokenFlux service support, Claude 4 model integration, and fixes for various issues including Windows user startup problems and search crashes.
- Replaced outdated screenshots in README files with new images across English, Japanese, and Chinese documentation.
- Enhanced the 'Related Projects' section for better visibility.
- Eliminated custom output chunking strategy for worker files and node_modules from the electron Vite configuration.
- Streamlined the configuration for improved maintainability and clarity.
* feat: add Cherry Cloud provider with associated assets and localization support
* feat: add Cherry Cloud provider support with OAuth integration and IPC handling
* fix: add success message for Cherry Cloud API key update
* feat: enhance provider navigation with dynamic ID in URL and update selected provider state
* feat: implement Cherry Cloud server synchronization with token management and error handling
* feat: add CherryCloud provider configuration and token management
* feat: integrate TokenFlux provider support and update related configurations
fix: update redux-persist version to 104
refactor: remove redundant tokenflux provider model assignment in migration
fix: update migration to add TokenFlux provider instead of CherryCloud
* feat: enhance TokenFlux server synchronization with API key authentication support
* feat: update TokenFlux provider assets and add new models
* feat: update migration logic for version 106 to add TokenFlux provider
* feat: disable TokenFlux provider by default in INITIAL_PROVIDERS
* feat: add TokenFlux billing URLs to providerCharge and providerBills functions
* feat: add navigation buttons for webview history in MinApp popup
- Implemented 'Go Back' and 'Go Forward' functionality in the MinApp popup.
- Added corresponding translations for English, Japanese, Russian, and Chinese locales.
- Included icons for navigation buttons to enhance user experience.
* fix: update Russian and Traditional Chinese translations for UI elements
- Revised translations for "rightclick_copyurl", "close", and "minimize" to improve clarity and consistency in the Russian and Traditional Chinese locales.
- Ensured that the translations align better with user expectations and common usage.
* fix: update Russian translations for MinApp popup UI elements
- Revised translations for "close" and "minimize" to specify their context within the MinApp, enhancing clarity for users.
- Ensured consistency with existing translations and improved user understanding of the interface.
---------
Co-authored-by: beyondkmp <beyondkmkp@gmail.com>
- Updated the environment variable initialization to use a consistent type.
- Added logic to set the PATH variable correctly, ensuring it falls back to existing values if necessary.
- Removed unnecessary content accumulation and streamlined chunk processing logic.
- Introduced distinct handling for 'thinking' and 'text' parts, ensuring accurate onChunk calls for both types.
- Enhanced timing tracking for reasoning content, improving overall responsiveness in streaming scenarios.
- Enhanced `isWebSearchModel` to recognize 'grok' as a valid web search model.
- Updated `getOpenAIWebSearchParams` to return specific search parameters for 'grok'.
- Modified `OpenAIProvider` to handle citations from 'grok' in web search results.
- Added 'grok' to the `WebSearchSource` enum for citation formatting.
- Added logic to remove proxy environment variables when the command ends with 'bun'.
- Introduced a new private method `removeProxyEnv` to clean up the environment variables before starting the server.
* fix: enhance backup and restore functionality with skip option
- Updated `restore` and `restoreFromWebdav` methods in `BackupManager` to include a `skipBackupFile` parameter, allowing users to skip restoring the Data directory if desired.
- Modified corresponding IPC calls in `preload` and `BackupService` to support the new parameter.
- Added success message translations in multiple languages for improved user feedback.
* fix: integrate skipBackupFile option in RestorePopup for enhanced restore functionality
* refactor: remove skipBackupFile parameter from restore methods for simplified usage
- Updated `restore` and `restoreFromWebdav` methods in `BackupManager`, `BackupService`, and `NutstoreService` to remove the `skipBackupFile` parameter, streamlining the restore process.
- Adjusted corresponding IPC calls in `preload` and `RestorePopup` to reflect the changes, ensuring consistent functionality across the application.
- Added event listeners for LOCATE_MESSAGE events to scroll to specific messages in the MessageGroup component.
- Introduced a new SelectionBox component to handle multi-select functionality, allowing users to select multiple messages with drag actions.
- Refactored Messages component to remove unused multi-select logic and improve overall structure.
- Cleaned up code by removing commented-out sections and unnecessary state management related to dragging.
* feat: add functionality to insert messages at a specific index in the Redux store
- Introduced a new interface for inserting messages at a specified index.
- Implemented the insertMessageAtIndex reducer to handle message insertion.
- Updated saveMessageAndBlocksToDB to support message insertion logic.
- Modified appendAssistantResponseThunk to utilize the new insertion functionality.
* feat: integrate multi-select mode handling in MessageGroup component
- Added useChatContext hook to access multi-select mode state.
- Updated isGrouped logic to account for multi-select mode, ensuring proper message grouping behavior.
- Enhanced MessageWrapper styles for better layout management in different modes.
---------
Co-authored-by: kangfenmao <kangfenmao@qq.com>
* Fix: Use effective theme for code style in SettingsTab
The SettingsTab component was previously using the theme setting directly from useSettings to determine whether to apply the light or dark code style. This caused an issue when the theme was set to 'auto', as it wouldn't correctly reflect the actual system theme (light or dark).
This commit modifies SettingsTab.tsx to use the `theme` from the `useTheme` hook (which provides the effective theme) for the logic that determines the code editor and preview styles. This ensures that the code style accurately reflects your current effective theme, including when 'auto' theme is selected and the OS theme changes.
* Refactor: Remove unnecessary comments in SettingsTab
This commit removes non-essential comments that were added during a previous refactoring of `SettingsTab.tsx`. The core logic for using the effective theme for code style selection remains unchanged. This change is purely for code cleanliness.
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Integrated Redux dispatch to load topic messages when a message is clicked in HistoryPage.
- Updated SearchResults to utilize message blocks for improved search results, including content extraction.
- Refactored state management to accommodate new content structure in search results.
- Modified the uploadFile method in GeminiService to include baseURL in the parameters.
- Updated the corresponding calls in the preload and renderer layers to pass the baseURL along with the apiKey.
* refactor: improve shiki highlighter utils and reuse it in ShikiStreamService
* refactor: reuse shiki highlighter and markdown-it renderer
* hotfix: exclude GitHub and Copilot models
* fix: update service tier check to exclude GitHub and Copilot models
---------
Co-authored-by: one <wangan.cs@gmail.com>
- Added new features including message notification functionality and support for Google Mini Programs.
- Improved MCP capabilities to run Python code and fixed several issues related to message editing and display.
- Updated release notes to reflect these changes and enhancements.
- Updated NotificationProvider to truncate long messages for better display.
- Modified message sending logic in messageThunk to prevent notifications on the home page, improving user experience.
- Renamed IPC channels for notifications to improve clarity and consistency.
- Updated related handlers in the main process and preload scripts to reflect the new naming convention.
- Enhanced notification service to respect user settings before sending notifications.
- Added a check for user cancellation in the file save dialog, rejecting the promise if canceled.
- Enhanced error handling to reject the promise with a detailed error message instead of returning null.
- Integrated `useAppSelector` in Inputbar to manage multi-selection state.
- Updated Inputbar to conditionally render based on multi-selection mode.
- Modified MessageEditor to display the resend button only for assistant messages, improving UI clarity.
- Replaced the ChatContext with a custom hook `useChatContext` for better modularity and reusability.
- Updated components to utilize the new hook, passing the active topic as an argument.
- Enhanced multi-selection logic and state management for messages, improving user experience in the chat interface.
- Removed the old ChatContext file to streamline the codebase.
- Replaced the div in ContextMenu with a styled component for better styling control.
- Enhanced Message component to handle editing state more cleanly, separating the editor from the message display.
- Adjusted styling for the MessageEditor and FileBlocksContainer for improved layout and responsiveness.
- Removed the electron-notification-state package from dependencies as it is no longer used.
- Updated NotificationService to eliminate Do Not Disturb handling.
- Changed default notification settings in the Redux store to false for assistant messages, backups, and knowledge embedding.
- Replaced singleton pattern with direct instantiation of McpService for cleaner code.
- Updated IPC handlers to use the new mcpService instance directly.
- Removed unnecessary logging in Inputbar and MCPToolsButton components to streamline functionality.
- Cleaned up error handling in McpSettings to improve user experience.
- Updated getServiceTier method to ensure proper handling of undefined OpenAI models.
- Added initialization for OpenAI settings in the migration process to set default values if not present.
- Replaced Ant Design icons with Lucide icons for a more modern look.
- Adjusted ActionButton styling to have a circular border radius.
- Updated translation keys in Chinese locales for better formatting.
- Enhanced event handling in ChatContext to manage multi-select mode more effectively.
- Cleaned up unused imports and props in MessageGroup and MessageSelect components.
* WIP
* feat: integrate notification system using Electron's Notification API
- Replaced the previous notification implementation with Electron's Notification API for better integration.
- Updated notification types and structures to support new features.
- Added translations for notification messages in multiple languages.
- Cleaned up unused dependencies related to notifications.
* refactor: remove unused node-notifier dependency from Electron config
* clean: remove node-notifier from asarUnpack in Electron config
* fix: update notification type in preload script to align with new structure
* feat: Integrate NotificationService for user notifications across various components
- Implemented NotificationService in useUpdateHandler to notify users of available updates.
- Enhanced KnowledgeQueue to send success and error notifications during item processing.
- Updated BackupService to notify users upon successful restoration and backup completion.
- Added error notifications in message handling to improve user feedback on assistant responses.
This update improves user experience by providing timely notifications for important actions and events.
* feat: Refactor notification handling and integrate new notification settings
- Moved SYSTEM_MODELS to a new file for better organization.
- Enhanced notification handling across various components, including BackupService and KnowledgeQueue, to include a source attribute for better context.
- Introduced notification settings in the GeneralSettings component, allowing users to toggle notifications for assistant messages, backups, and knowledge embedding.
- Updated the Redux store to manage notification settings and added migration logic for the new settings structure.
- Improved user feedback by ensuring notifications are sent based on user preferences.
This update enhances the user experience by providing customizable notification options and clearer context for notifications.
* feat: Add 'update' source to NotificationSource type for enhanced notification context
* feat: Integrate electron-notification-state for improved notification handling
- Added electron-notification-state package to manage Do Not Disturb settings.
- Updated NotificationService to respect user DND preferences when sending notifications.
- Adjusted notification settings in various components (BackupService, KnowledgeQueue, useUpdateHandler) to ensure notifications are sent based on user preferences.
- Enhanced user feedback by allowing notifications to be silenced based on DND status.
* feat: Add notification icon to Electron notifications
* fix: import SYSTEM_MODELS in EditModelsPopup for improved model handling
* feat(i18n): add knowledge base notifications in multiple languages
- Added success and error messages for knowledge base operations in English, Japanese, Russian, Chinese (Simplified and Traditional).
- Updated the KnowledgeQueue to utilize the new notification messages for better user feedback.
* feat(notification): introduce NotificationProvider and integrate into App component
- Added NotificationProvider to manage notifications within the application.
- Updated App component to include NotificationProvider, enhancing user feedback through notifications.
- Refactored NotificationQueue to support multiple listeners for notification handling.
- Updated registerHandler to only log and update the handler if it changes, reducing unnecessary operations.
- Removed logging from unregisterHandler for cleaner code.
- Added getFilePath method in FileManager to construct file paths based on file ID and extension.
- Updated KnowledgeContent to utilize the new getFilePath method for opening file paths, improving code clarity and maintainability.
- Simplified the onOpenChange handler in FloatingSidebar for better readability.
- Added style prop to HomeTabs for enhanced customization.
- Adjusted Container style in HomeTabs to merge with existing border styles.
- Added placeholder and adjusted styles for the Input in ContentSearch.
- Updated SearchBarContainer to use fixed positioning and improved padding.
- Refactored MessageTools to render raw content correctly and added a new MarkdownContainer for better styling.
- Minor adjustments to other components for improved layout and user experience.
- Integrated PasteService for handling paste events in Inputbar and MessageEditor components.
- Removed redundant paste handling code and improved maintainability.
- Registered paste handlers and set last focused component for better user experience.
- Ensured consistent behavior for text and file pasting across components.
Co-authored-by: beyondkmp <beyondkmkp@gmail.com>
* feat: add MCP servers via JSON quickly
* refactor(MCPSettings): Extract JSON parsing logic into a helper function
* feat: json linter for EditMcpJsonPopup
* feat(mcp): confirm the MCP server status as connection
* refactor(AddMcpServerModal): 移除冗余注释并修复加载状态
* feat(MCPSettings): Add support for SSE and streamableHttp formats and optimize server configuration parsing
- Add server type validation to ensure the type is stdio, SSE, or streamableHttp
- Optimize JSON parsing logic to ensure server configuration completeness and validity
- Update example text to provide more detailed configuration examples
* fix(MCPSettings): fix AddMcpServerModal default baseUrl login
移除serverToAdd.url作为baseUrl的备选值,确保baseUrl仅使用serverToAdd.baseUrl的值
* feat(MCPSettings): support CodeEditor in AddMcpServerModal
* fix: Remove unnecessary type checks for JSON parsing login
* fix(MCPSettings): fix compatibility issues with the URL field when parsing server data
* refactor: remove unnessary cdoe
* chore: Add a server dropdown button to integrate new features in UI
- Integrate the two buttons for adding a server into a single dropdown menu to enhance user experience and simplify the interface
* chroe: modify the Dropdown items' name of addServer
* refactor(i18n): unify the translation for the MCP server import function
---------
Co-authored-by: one <wangan.cs@gmail.com>
- Changed default value for `getTrayOnClose` to true in `ConfigManager`.
- Removed fullscreen toggle logic from `WindowService`.
- Adjusted styles in `OpenAIAlert` for better spacing.
- Reorganized imports in `Navbar` and updated component paths in `AssistantsTab` and `SettingsTab`.
- Added new components `AssistantItem` and `OpenAISettingsGroup` for better modularity.
- Enhanced `SettingGroup` styles for improved UI consistency.
- Updated `QuickPhraseSettings` to utilize theme context.
- Minor fixes and refactoring across various services and components.
- Updated the README to link to the new English branching strategy document.
- Added a new English version of the branching strategy document.
- Removed the outdated branching strategy document.
- Added a Chinese version of the branching strategy document.
* feat: add resolveFilePath functionality to file management
* Added new IPC channel for resolving file paths.
* Implemented resolveFilePath method in FileStorage service.
* Updated FileManager to utilize the new resolveFilePath method.
* Enhanced preload API to expose resolveFilePath to the renderer.
* Updated KnowledgeService to ensure file paths are correctly resolved in knowledge bases.
* refactor: remove unused path import from preload index
* Removed the unused 'resolve' import to clean up the codebase.
* Improved code readability by eliminating unnecessary dependencies.
---------
Co-authored-by: beyondkmp <beyondkmkp@gmail.com>
* feat: support default Quick Assistant model
- support the configuration of the quick assistant model.
- manage the models independently in Quick Assistant and Default Assistant.
* docs(i18n): Add translation for quick assistant model
* fix(llm): fix the default value of quickAssistantModel to silicon[1]
* refactor(i18n): uniformly the terms, changing "快速助手" to "快捷助手"
* feat: add OpenAI settings tab and related functionality
* fix: update related logic to support flexible service layer.
* fix(OpenAIResponseProvider): remove unused isOpenAILLMModel import
* refactor(Scrollbar): Optimize scroll handling logic to support external scroll events
- Refactor `onScroll` logic to support external scroll events
- Integrate with `useScrollPosition` hook for better scroll state management
- Memorize the scoll state for better user experience
- Fix type definition for `ref` attribute
- Remove unnecessary `ref` type overrides
- Improve component compatibility and maintainability
* perf(useScrollPosition): Optimize scroll position updates using requestAnimationFrame
- Wrap the `window.keyv.set` call in `requestAnimationFrame` to reduce unnecessary performance overhead and improve responsiveness during scrolling.
* fix(Messages): Remove unused FC imports and add onComponentUpdate and onFirstUpdate properties
* chore: update Yarn version to 4.9.1 and add rendering speed option for V3 model
* Discard changes to .yarnrc.yml
* Discard changes to .yarn/releases/yarn-4.6.0.cjs
* Update package.json
* Delete .yarn/releases/yarn-4.9.1.cjs
* Discard changes to .yarn/releases/yarn-4.6.0.cjs
* docs: Update README.zh.md add GitCode✖️Cherry Studio【新源力】贡献挑战赛
GitCode✖️Cherry Studio【新源力】贡献挑战赛
* fix: Update the file permissions for yarn-4.6.0.cjs, modify image links and formatting in README.zh.md
* clean
* refactor: improve switch case blocks and update config parameters in AihubmixPage
* feat: add error handling for empty image URLs and update localization messages
* refactor: replace modal error handling with warning messages for empty image URLs
* feat: update localization for rendering speed and translating messages in Japanese, Russian, and Traditional Chinese
* feat: add style types and rendering speed options to localization files
---------
Co-authored-by: 亢奋猫 <kangfenmao@qq.com>
Co-authored-by: suyao <sy20010504@gmail.com>
* feat: implement message editing and resend functionality with block management
* fix: move start_time_millsec initialization to onChunk for accurate timing
* feat: refactor message update thunks to separate block addition and updates
* feat: enhance MessageBlockEditor with toolbar buttons and attachment functionality
* refactor: implement message editing context and integrate with message operations
* style: adjust padding in MessageBlockEditor and related components
* refactor: remove MessageEditingContext and integrate editing logic directly in Message component
* refactor: streamline message rendering logic by using conditional rendering for MessageEditor and MessageContent
* refactor: remove redundant ipcRenderer variable in useMCPServers hook
* fix: Add mock for electron's ipcRenderer to support testing
* test: Update mocks for ipcRenderer and remove redundant window.electron mock
* fix: enhance file handling in MessageEditor with new Electron API
- Added support for file dragging with visual feedback.
- Improved file type validation during drag-and-drop and clipboard pasting.
- Displayed user notifications for unsupported file types.
- Refactored file handling logic for better clarity and maintainability.
* Wrapped message and block updates in a database transaction for improved consistency.
* Replaced direct updates with atomic modifications using where().modify() for better performance and clarity.
* Enhanced error handling for message updates to ensure robustness.
* feat: add FloatingSidebar component and integrate assistant switching functionality
* refactor: simplify FloatingSidebar by removing unused hooks and components
* refactor: remove unused AddAssistantPopup and related code from FloatingSidebar
* feat: implement sidebar hide cooldown and adjust tooltip delays in Navbar.
* feat: integrate HomeTabs into FloatingSidebar and update Navbar props
* refactor: remove commented-out code and unused components from FloatingSidebar
* fix: update Popover placement from rightTop to bottomRight in FloatingSidebar.
* feat: add forceToSeeAllTab prop to HomeTabs for improved tab visibility control
* fix: update HomeTabs logic to respect forceToSeeAllTab prop for tab selection
* feat: pass position prop to FloatingSidebar and HomeTabs for consistent layout control
* feat: integrate FloatingSidebar into Navbar for improved topic visibility and update HomeTabs logic for consistent tab rendering
* fix: remove unused showTopics from Navbar component
* feat: enhance topic visibility control in Navbar with cooldown logic for sidebar toggle
* fix: add onMouseOut handler to NavbarIcon for sidebar cooldown reset
---------
Co-authored-by: George Zhao <georgezhao@SKJLAB>
* Moved highlighter initialization and loading functions to a new utility file for better organization.
* Simplified theme and language loading in the SyntaxHighlighterProvider using the new utility functions.
* Removed redundant code and improved readability in MessageTools by introducing a new CollapsedContent component for rendering tool responses.
* Updated MCPDescription to use an async function for Shiki instance initialization.
* Modified the Content Security Policy to include 'unsafe-inline' for script-src.
* Changed the spinner display style from 'none' to 'flex' for better visibility.
* Removed the initSpinner function and directly initialized the spinner in useAppInit.
* Added console timing for initialization to track performance.
* Refactored MCPService to implement a singleton pattern for better instance management.
* Updated IPC registration to utilize the new getMcpInstance method for handling MCP-related requests.
* Removed redundant IPC handlers from the main index file and centralized them in the ipc module.
* Added background throttling option in WindowService configuration to enhance performance.
* Introduced delays in MCPToolsButton to optimize resource and prompt fetching after initial load.
- Removed outdated dependencies including "@babel/plugin-syntax-jsx" and "@bcoe/v8-coverage".
- Added new dependencies such as "@sec-ant/readable-stream", "browserslist", and "cacheable-request".
- Updated versions for existing packages including "got", "ow", and "type-fest".
- Ensured compatibility with the latest versions of peer dependencies.
* feat: code tools, editor, executor
CodeEditor & Preview
- CodeEditor: CodeMirror 6
- Switch to CodeEditor in the settings
- Support edit&save with a accurate diff&lookup strategy
- Use CodeEditor for editing MCP json configuration
- CodePreview: Original Shiki syntax highlighting
- Implemented using a custom Shiki stream tokenizer
- Remov code caching as it is incompatible with the current streaming code highlighting
- Add a webworker for shiki
- Other preview components
- Merge MermaidPopup and Mermaid to MermaidPreview, use local mermaidjs
- Show mermaid syntax error message on demand
- Rename PlantUML to PlantUmlPreview
- Rename SyntaxHighlighterProvider to CodeStyleProvider for clarity
- Both light and dark themes are preserved for convenience
CodeToolbar
- Top sticky toolbar provides quick tools (left) and core tools (right)
- Quick tools are hidden under the `More` button to avoid clutter, while core tools are always visible
- View&edit mode
- Allow switching between preview and edit modes
- Add a split view
Code execution
- Pyodide for executing Python scripts
- Add a webworker for Pyodide
* fix: migrate version and lint error
* refactor: use constants for defining tool specs
* feat: make setting group collapsible
* fix: yarn.lock
* fix: conflict error
---------
Co-authored-by: one <wangan.cs@gmail.com>
* chore: update @cherrystudio/embedjs packages to version 0.1.29 and update sass to version 1.88.0; remove deprecated dependencies from package.json and yarn.lock
* chore: add node-stream-zip and update devDependencies in package.json and yarn.lock
* chore: reorganize and update @cherrystudio/embedjs dependencies in package.json
* chore: add zipread dependency to package.json and update yarn.lock
* chore: add @strongtz/win32-arm64-msvc dependency to package.json and update yarn.lock
* feat: Highlighted search in chat page
* Bug fixes and added a temporary F3 shortcut
* Bug fixes
* Bug fixes
* feat: Implement content search functionality with keyboard shortcuts
- Added a new `ContentSearch` component for searching text within a specified target.
- Integrated search functionality with keyboard shortcuts, allowing users to enable search via a new shortcut key.
- Updated internationalization files to include new search-related messages in multiple languages.
- Enhanced shortcut management to accommodate the new search feature, including a migration for shortcut updates.
- Refactored the `Chat` component to utilize the new content search capabilities.
* fix(ContentSearch): Update search index check and enhance container styling
* feat(ContentSearch): Enhance search functionality with case sensitivity and whole word options
- Added options for case sensitivity and whole word matching in the search feature.
- Updated the highlightText function to accommodate new search parameters.
- Improved styling and layout of the search input and buttons for better user experience.
- Refactored related components to support the new search options.
* refactor(useShortcuts): Remove console log for shortcut invocation
* feat: Add user filter and initial text to search
- Improve ContentSearch UI:
- Add tooltips for search options
- Enhance result display (e.g., "No results", "0/0")
- Disable navigation buttons when no matches
- Relocate search bar to the top of the chat view
- Apply case-sensitivity logic only to Latin characters
- Add translations for new options
* i18n: Translate "No results" message
* Add in-chat search shortcut, update global search to Cmd/Ctrl+Shift+F.
* feat: Allow users to scroll during input and optimize the search result index update logic
* feat: Update search message shortcut to include Shift for improved accessibility
* feat: Refactor search component layout and update highlight color variables
* fix: Adjust margin-bottom for SearchBarContainer
---------
Co-authored-by: suyao <sy20010504@gmail.com>
* Added 'electron-store' to the Vite configuration for Electron.
* Imported configuration from '@main/config' in the main index file.
* Changed default return value for getTrayOnClose method in ConfigManager to false
* Reduced the button visibility timer from 1500ms to 500ms for quicker feedback.
* Decreased the trigger width from 80 to 60 for improved interaction.
* Updated the height calculation from 40% to 30% of the window height for better layout consistency.
* feat: implement useFullscreen hook and integrate with NavbarRight for dynamic padding
* feat: integrate useFullscreen hook to adjust sidebar layout based on fullscreen state
* fix: adjust sidebar height based on fullscreen state for better layout
---------
Co-authored-by: George Zhao <georgezhao@SKJLAB>
* fix: Ensure last app is displayed when no filtered apps are found
* fix: Remove Empty component from AppsPage when no apps are found
---------
Co-authored-by: George Zhao <georgezhao@SKJLAB>
* feat: enhance file drag-and-drop functionality and global paste handling in Inputbar
- Added support for file dragging with visual feedback.
- Implemented global paste event handling to allow pasting outside the text area.
- Improved file drop handling to notify users of unsupported file types.
* refactor(Inputbar): simplify global paste handling logic
- Removed unnecessary checks for active element in global paste event handling.
- Streamlined the paste event processing for improved clarity and maintainability.
* style(Inputbar): clean up comments and maintain visual feedback for file dragging
- Removed unnecessary comments related to the styling of the file dragging state.
- Ensured the visual feedback for file dragging remains intact with updated background color.
* Added 'electron-store' to the Vite configuration for Electron.
* Imported configuration from '@main/config' in the main index file.
* Changed default return value for getTrayOnClose method in ConfigManager to false
* refactor(CodeEditor): add more options to props for better customization
- A complete BasicSetupOptions could be passed in to override system-wise options
- EditMcpJsonPopup now use customized options
* fix: accommodate ThemeMode.auto
* fix: typos
refactor: simplify ThinkingBlock component and extract thinking time logic
* Removed unnecessary state and interval management from ThinkingBlock.
* Introduced ThinkingTimeSeconds component to handle thinking time display and logic.
* Cleaned up code for better readability and maintainability.
* Reduced the button visibility timer from 1500ms to 500ms for quicker feedback.
* Decreased the trigger width from 80 to 60 for improved interaction.
* Updated the height calculation from 40% to 30% of the window height for better layout consistency.
* feat: code tools, editor, executor
CodeEditor & Preview
- CodeEditor: CodeMirror 6
- Switch to CodeEditor in the settings
- Support edit&save with a accurate diff&lookup strategy
- Use CodeEditor for editing MCP json configuration
- CodePreview: Original Shiki syntax highlighting
- Implemented using a custom Shiki stream tokenizer
- Remov code caching as it is incompatible with the current streaming code highlighting
- Add a webworker for shiki
- Other preview components
- Merge MermaidPopup and Mermaid to MermaidPreview, use local mermaidjs
- Show mermaid syntax error message on demand
- Rename PlantUML to PlantUmlPreview
- Rename SyntaxHighlighterProvider to CodeStyleProvider for clarity
- Both light and dark themes are preserved for convenience
CodeToolbar
- Top sticky toolbar provides quick tools (left) and core tools (right)
- Quick tools are hidden under the `More` button to avoid clutter, while core tools are always visible
- View&edit mode
- Allow switching between preview and edit modes
- Add a split view
Code execution
- Pyodide for executing Python scripts
- Add a webworker for Pyodide
* fix: migrate version and lint error
* refactor: use constants for defining tool specs
* refactor: add user-select, fix tool specs
* refactor: simplify some state changing
* fix: make sure editor tools registered after the editor is ready
---------
Co-authored-by: 自由的世界人 <3196812536@qq.com>
* Updated padding in CustomCollapse for improved spacing.
* Modified Messages component to conditionally apply padding based on prompt visibility.
* Enhanced ModelListSearchBar by adding a flex display style for better alignment.
* Increased gap in ProviderSetting's HStack for improved layout consistency.
* Introduced new translations for "Tool Use Mode" and its options ("Function" and "Prompt") in English, Japanese, Russian, Simplified Chinese, and Traditional Chinese.
* Refactored settings components to replace the deprecated `enableToolUse` with `toolUseMode`, updating related logic and UI elements accordingly.
* Adjusted migration logic to ensure backward compatibility with previous settings.
* Changed the wording for max tokens settings in English, Japanese, Russian, Simplified Chinese, and Traditional Chinese to improve clarity.
* Adjusted confirmation messages to better reflect the functionality of setting maximum token limits.
* Removed EXTENDED_CONTEXT_LIMIT and EXTENDED_CONTEXT_STEP constants from the configuration.
* Eliminated enableMaxContexts state and associated logic from settings components.
* Updated contextCount handling to accommodate a maximum of 100, with a special case for 100 to represent an unlimited context.
* Cleaned up related translations for max contexts in multiple languages.
* Deleted the @cherry-studio/artifacts package including its README, package.json, and associated CSS files.
* Removed the @cherry-studio/database package along with its README, package.json, and source files for data handling.
* Cleaned up related yarn.lock files and installation states for both packages.
* fix: update current topic id for ChatFlowHistory to work
* refactor: set current topic id early in loadTopicMessagesThunk
* refactor: extract EmojiAvatar
* fix: style
* feat: Extended the fillable context length to 100. #5514
Update src/renderer/src/pages/home/Tabs/SettingsTab.tsx
fix: update context length settings and localization for multiple languages
* fix: adjust context count slider limits and behavior based on max contexts setting
* feat: implement event handling for max contexts changes in settings
* feat: update context count handling to use EXTENDED_CONTEXT_LIMIT in settings
* feat: update context count logic to use EXTENDED_CONTEXT_LIMIT when max contexts are enabled
* refactor: remove unused EXTENDED_CONTEXT_LIMIT import from AssistantService
* feat: simplify context count logic with validAndChangeContextCount function
* feat: 移除TokenCount组件中对最大计数为20的特殊处理,简化上下文计数显示逻辑
* refactor: simplify getContextCount logic by removing max context handling
* feat: adjust step value for context count input based on max contexts setting
---------
Co-authored-by: George Zhao <georgezhao@SKJLAB>
* fix: quickpanel scrollto changed to smart
* fix: add scrollTrigger as the replacement for scrollBlock
* fix: add a 'none' trigger to prevent accidental scrolling
* Updated the reset logic to conditionally handle model and modelId for grouped messages.
* Ensured that the original model is retained when regenerating responses for grouped messages.
* Updated the reset logic to conditionally handle model and modelId for grouped messages.
* Ensured that the original model is retained when regenerating responses for grouped messages.
* feat: add DevTools functionality and localization support
* Added new IPC channels for opening and toggling DevTools.
* Implemented corresponding handlers in the main process.
* Updated preload API to include DevTools methods.
* Enhanced the AboutSettings component with a debug section to control DevTools.
* Added localization strings for debug actions in English, Simplified Chinese, and Traditional Chinese.
* refactor: remove DevTools open state handling and related localization strings
* Removed the IPC channel and associated handlers for checking if DevTools is open.
* Updated the AboutSettings component to eliminate the DevTools open state management.
* Removed localization strings for the DevTools close action in English, Simplified Chinese, and Traditional Chinese.
* ToggleDevTools event uses the source window to trigger switching, compatible with multiple windows
* Remove empty comments
---------
Co-authored-by: yangheng <492238647@qq.com>
* fix: ensure correct handling of custom mini app updates and removals
* fix: update title for custom mini app to be more concise in localization files
---------
Co-authored-by: George Zhao <georgezhao@SKJLAB>
* fix: ensure correct handling of custom mini app updates and removals
* fix: update title for custom mini app to be more concise in localization files
---------
Co-authored-by: George Zhao <georgezhao@SKJLAB>
* refactor: focus the hovered item when toggling a pinned model
* refactor: focus the selected item after loading pinned models
* refactor: update sticky group after loading pinned models
* fix: rapidly update sticky group
* refactor: defer lastscrolloffset
* refactor: rename updateOnListChange to focusOnListChange for clarity
* refactor: increaset overscan count
* refactor: use startTransition instead of deferred value
* refactor: add guard, clean up code
* refactor: simplify cleanup logic
* refactor: remove unnecessary dep on pinnedModels
* fix: flicker on searching
* refactor: simplify tag tooltips, prevent tooltips in SelectModelPopup
- Updated vitest.config.ts to handle optional chaining for plugins and alias.
- Added setup.ts for mocking electron-log in renderer tests.
- Adjusted test include and exclude patterns to refine test coverage.
* style: update ChatNavigation and CitationsList components for improved UI consistency
- Added header style to remove borders in ChatNavigation.
- Enhanced CitationsList with new Skeleton loading state and improved layout for citation cards.
- Refactored CitationLink to a div for better styling control and adjusted padding in OpenButton for a more polished appearance.
* fix: update citation rendering logic in MainTextBlock component
- Added a check to determine if the citation URL is a valid link.
- Updated citation tag formatting to conditionally include the link based on the URL validity.
* Remove Zhipu mode and text-only link handling
* refactor: update message handling and state management
- Simplified message editing logic by removing unnecessary success/error logging.
- Added `updatedAt` timestamp to message updates for better tracking.
- Refactored `editMessageBlocks` to accept message ID and updates directly.
- Removed unused `getTopicLimit` function from `TopicManager`.
- Updated message rendering to use `updatedAt` when available.
- Enhanced type definitions to include `updatedAt` in message structure.
* refactor: optimize block update logic and remove unused code
- Updated `throttledBlockUpdate` to handle asynchronous updates directly.
- Removed the unused `throttledBlockDbUpdate` function and its related logic.
- Added cancellation for throttled updates on error and completion to improve performance and reliability.
- Cleaned up commented-out code for better readability.
* fix: enhance logging and update async handling in StreamProcessingService and messageThunk
- Enabled logging in `createStreamProcessor` for better debugging.
- Added logging for updated messages in `updateExistingMessageAndBlocksInDB` and `saveUpdatesToDB`.
- Updated `onTextComplete` and `onLLMWebSearchComplete` to handle asynchronous operations correctly.
- Commented out unused `saveUpdatedBlockToDB` calls to prevent unnecessary database updates.
* feat: enhance citation handling and add metadata support in citation blocks
* fix: prevent default action in handleLinkClick for better link handling
* fix: update styled component props to use dollar sign prefix for consistency
* feat(i18n): add download success and failure messages in multiple languages
* refactor(messageThunk): remove console.log statements for cleaner code
* refactor(StreamProcessingService): comment out console.log for cleaner code
* feat(MessageMenubar): add edit option to dropdown for single message editing
* fix: set default zoomFactor in settings
* fix: add support for inline base64 image data in image block
* fix: remove 'auto' option from qwen model supported options
* fix: adjust thinking millisecond handling in message thunk
* fix: update regex for function calling models and improve time tracking logic
* fix: enhance error handling and metrics tracking across AI providers and message processing
* fix: add new image generation models to the configuration
* refactor(GeminiProvider): implement image generation handling in chat responses
* Revert "fix: set default zoomFactor in settings"
This reverts commit 428b1fbe40.
---------
Co-authored-by: kangfenmao <kangfenmao@qq.com>
Co-authored-by: suyao <sy20010504@gmail.com>
commit ee9c7ca69e
Merge: 476855c9d4fe5dfa
Author: kangfenmao <kangfenmao@qq.com>
Date: Sun May 11 18:43:56 2025 +0800
Merge branch 'main' into fix/next-release-bugs
commit 476855c9c7
Author: suyao <sy20010504@gmail.com>
Date: Sun May 11 18:09:58 2025 +0800
refactor(GeminiProvider): implement image generation handling in chat responses
commit 66939a5302
Merge: 2f278b3f499fb306
Author: suyao <sy20010504@gmail.com>
Date: Sun May 11 16:45:29 2025 +0800
Merge branch 'main' into fix/next-release-bugs
commit 2f278b3fac
Author: suyao <sy20010504@gmail.com>
Date: Sun May 11 16:41:38 2025 +0800
fix: add new image generation models to the configuration
commit a55e9759f3
Merge: 4c50dfbd8e1c10ab
Author: suyao <sy20010504@gmail.com>
Date: Sun May 11 13:14:17 2025 +0800
Merge branch 'main' into fix/next-release-bugs
commit 4c50dfbd19
Author: suyao <sy20010504@gmail.com>
Date: Sun May 11 13:13:20 2025 +0800
fix: enhance error handling and metrics tracking across AI providers and message processing
commit 9b9a395451
Author: suyao <sy20010504@gmail.com>
Date: Sun May 11 05:36:52 2025 +0800
fix: update regex for function calling models and improve time tracking logic
commit c2f23d6916
Author: suyao <sy20010504@gmail.com>
Date: Sun May 11 05:05:05 2025 +0800
fix: adjust thinking millisecond handling in message thunk
commit c565d91591
Author: suyao <sy20010504@gmail.com>
Date: Sun May 11 03:52:26 2025 +0800
fix: remove 'auto' option from qwen model supported options
commit dfeb54fd94
Author: suyao <sy20010504@gmail.com>
Date: Sun May 11 03:50:05 2025 +0800
fix: add support for inline base64 image data in image block
commit 9b2992fce4
Merge: 428b1fbedb6408f3
Author: suyao <sy20010504@gmail.com>
Date: Sun May 11 03:00:57 2025 +0800
Merge branch 'main' into fix/next-release-bugs
commit 428b1fbe40
Author: suyao <sy20010504@gmail.com>
Date: Sun May 11 03:00:11 2025 +0800
fix: set default zoomFactor in settings
commit 8a99eea28a
Merge: f49638882193a665
Author: suyao <sy20010504@gmail.com>
Date: Sun May 11 01:31:05 2025 +0800
Merge branch 'main' into fix/next-release-bugs
commit f4963888e8
Merge: c6cf79083f1fadb9
Author: kangfenmao <kangfenmao@qq.com>
Date: Sat May 10 20:18:44 2025 +0800
Merge branch 'main' into fix/next-release-bugs
commit c6cf790851
Author: lizhixuan <daoquqiexing@gmail.com>
Date: Sat May 10 11:38:01 2025 +0800
feat(MessageMenubar): add edit option to dropdown for single message editing
commit 87b106fad6
Author: lizhixuan <daoquqiexing@gmail.com>
Date: Sat May 10 10:53:10 2025 +0800
refactor(StreamProcessingService): comment out console.log for cleaner code
commit 7d0b8b33af
Author: lizhixuan <daoquqiexing@gmail.com>
Date: Sat May 10 10:52:08 2025 +0800
refactor(messageThunk): remove console.log statements for cleaner code
commit 7310eebebc
Author: kangfenmao <kangfenmao@qq.com>
Date: Sat May 10 10:17:44 2025 +0800
feat(i18n): add download success and failure messages in multiple languages
commit 42733d0fc8
Merge: 6364f4c0ac0651a9
Author: kangfenmao <kangfenmao@qq.com>
Date: Sat May 10 09:54:38 2025 +0800
Merge branch 'main' into fix/next-release-bugs
commit 6364f4c006
Author: suyao <sy20010504@gmail.com>
Date: Fri May 9 22:19:35 2025 +0800
fix: update styled component props to use dollar sign prefix for consistency
commit 34c49b84f6
Author: suyao <sy20010504@gmail.com>
Date: Fri May 9 22:02:06 2025 +0800
fix: prevent default action in handleLinkClick for better link handling
commit 84bf76cc43
Merge: 572ffcc83697b31c
Author: suyao <sy20010504@gmail.com>
Date: Fri May 9 21:55:54 2025 +0800
Merge branch 'main' into fix/next-release-bugs
commit 572ffcc8be
Merge: 9ba630b5a6a8324c
Author: suyao <sy20010504@gmail.com>
Date: Fri May 9 21:48:13 2025 +0800
Merge branch 'main' into fix/next-release-bugs
commit 9ba630b5e8
Merge: bf819a716d910755
Author: suyao <sy20010504@gmail.com>
Date: Fri May 9 21:27:08 2025 +0800
Merge branch 'fix/next-release-bugs' of github.com:CherryHQ/cherry-studio into fix/next-release-bugs
commit bf819a7142
Author: suyao <sy20010504@gmail.com>
Date: Fri May 9 21:24:48 2025 +0800
feat: enhance citation handling and add metadata support in citation blocks
commit 6d9107558e
Author: MyPrototypeWhat <daoquqiexing@gmail.com>
Date: Fri May 9 19:47:24 2025 +0800
fix: enhance logging and update async handling in StreamProcessingService and messageThunk
- Enabled logging in `createStreamProcessor` for better debugging.
- Added logging for updated messages in `updateExistingMessageAndBlocksInDB` and `saveUpdatesToDB`.
- Updated `onTextComplete` and `onLLMWebSearchComplete` to handle asynchronous operations correctly.
- Commented out unused `saveUpdatedBlockToDB` calls to prevent unnecessary database updates.
commit c402a1d21f
Author: MyPrototypeWhat <daoquqiexing@gmail.com>
Date: Fri May 9 18:47:55 2025 +0800
refactor: optimize block update logic and remove unused code
- Updated `throttledBlockUpdate` to handle asynchronous updates directly.
- Removed the unused `throttledBlockDbUpdate` function and its related logic.
- Added cancellation for throttled updates on error and completion to improve performance and reliability.
- Cleaned up commented-out code for better readability.
commit 6da1d08c9a
Author: MyPrototypeWhat <daoquqiexing@gmail.com>
Date: Fri May 9 18:42:00 2025 +0800
refactor: update message handling and state management
- Simplified message editing logic by removing unnecessary success/error logging.
- Added `updatedAt` timestamp to message updates for better tracking.
- Refactored `editMessageBlocks` to accept message ID and updates directly.
- Removed unused `getTopicLimit` function from `TopicManager`.
- Updated message rendering to use `updatedAt` when available.
- Enhanced type definitions to include `updatedAt` in message structure.
commit 30696e1ef1
Author: suyao <sy20010504@gmail.com>
Date: Fri May 9 16:19:55 2025 +0800
Remove Zhipu mode and text-only link handling
commit 5b95d20294
Author: kangfenmao <kangfenmao@qq.com>
Date: Fri May 9 15:49:02 2025 +0800
fix: update citation rendering logic in MainTextBlock component
- Added a check to determine if the citation URL is a valid link.
- Updated citation tag formatting to conditionally include the link based on the URL validity.
commit 28f1e486e6
Author: kangfenmao <kangfenmao@qq.com>
Date: Thu May 8 18:31:14 2025 +0800
style: update ChatNavigation and CitationsList components for improved UI consistency
- Added header style to remove borders in ChatNavigation.
- Enhanced CitationsList with new Skeleton loading state and improved layout for citation cards.
- Refactored CitationLink to a div for better styling control and adjusted padding in OpenButton for a more polished appearance.
* refactor: update zoom handling in IPC and settings
* renamed zoom-related IPC channels for clarity
* refactored zoom handling logic in ipc.ts and ShortcutService
* removed unused zoom factor state management from settings
* updated DisplaySettings component to manage zoom via buttons
* localized zoom settings in multiple languages
* refactor: remove unused zoom factor state from settings
* eliminated the zoomFactor state from initialSettings as part of the zoom handling refactor
* refactor: improve zoom handling in DisplaySettings component
* initialized current zoom value on component mount
* refactored resize event listener to prevent memory leaks
* added cleanup for resize event listener to enhance performance
* refactor: enhance resize event handling in DisplaySettings component
* added logic to track previous window width to prevent unnecessary updates during resize events
* improved comments for clarity on zoom handling and resize event listener functionality
* refactor: streamline zoom handling across IPC and ShortcutService
* updated handleZoomFactor function to accept an array of BrowserWindows for batch processing
* simplified zoom factor adjustments in IPC and shortcut handlers
* removed unnecessary window destruction checks for improved performance
feat: add motion library for animations and enhance Spinner and MessageBlock components
- Added 'motion' library to package.json and yarn.lock for animation support.
- Refactored Spinner component to utilize motion for animated effects.
- Introduced AnimatedBlockWrapper in MessageBlockRenderer for animated transitions.
- Updated ThinkingBlock to include animated lightbulb effect during thinking state.
* refactor(checkAPI): check api or model with stream enabled first
* refactor: improve healthcheck summary
* refactor: remove cursor style from status indicator
* fix: update apikey input box after deleting invalid keys
feat(i18n): update Portuguese translations for import/export features, assistant settings, and mini app configurations
Co-authored-by: George Zhao <georgezhao@SKJLAB>
* feat: add regular prompts settings component and integrate into assistant settings.
* feat: add regular prompts to assistant creation and update QuickPhrasesButton to utilize them.
* feat: add regular prompts settings and update localization for multiple languages.
* fix: update assistantObj type to Assistant and clean up unused console logs.
* feat: enhance QuickPhrasesButton with modal for adding phrases and localization updates.
* feat: update localization for regular prompts to regular phrases in English, Simplified Chinese, and Traditional Chinese.
* fix: update localization for assistant prompts to assistant phrases in English and Simplified Chinese.
* feat: add regular prompts to new agents during import.
* refactor: rename regular_prompts to regular_phrases across localization and components
* feat: enhance QuickPhrasesButton with icons for location selection options
* perf: optimize loadQuickListPhrases with useCallback and update icon sizes in QuickPhrasesButton
---------
Co-authored-by: George Zhao <georgezhao@SKJLAB>
commit c6cf790851
Author: lizhixuan <daoquqiexing@gmail.com>
Date: Sat May 10 11:38:01 2025 +0800
feat(MessageMenubar): add edit option to dropdown for single message editing
commit 87b106fad6
Author: lizhixuan <daoquqiexing@gmail.com>
Date: Sat May 10 10:53:10 2025 +0800
refactor(StreamProcessingService): comment out console.log for cleaner code
commit 7d0b8b33af
Author: lizhixuan <daoquqiexing@gmail.com>
Date: Sat May 10 10:52:08 2025 +0800
refactor(messageThunk): remove console.log statements for cleaner code
commit 7310eebebc
Author: kangfenmao <kangfenmao@qq.com>
Date: Sat May 10 10:17:44 2025 +0800
feat(i18n): add download success and failure messages in multiple languages
commit 42733d0fc8
Merge: 6364f4c0ac0651a9
Author: kangfenmao <kangfenmao@qq.com>
Date: Sat May 10 09:54:38 2025 +0800
Merge branch 'main' into fix/next-release-bugs
commit 6364f4c006
Author: suyao <sy20010504@gmail.com>
Date: Fri May 9 22:19:35 2025 +0800
fix: update styled component props to use dollar sign prefix for consistency
commit 34c49b84f6
Author: suyao <sy20010504@gmail.com>
Date: Fri May 9 22:02:06 2025 +0800
fix: prevent default action in handleLinkClick for better link handling
commit 84bf76cc43
Merge: 572ffcc83697b31c
Author: suyao <sy20010504@gmail.com>
Date: Fri May 9 21:55:54 2025 +0800
Merge branch 'main' into fix/next-release-bugs
commit 572ffcc8be
Merge: 9ba630b5a6a8324c
Author: suyao <sy20010504@gmail.com>
Date: Fri May 9 21:48:13 2025 +0800
Merge branch 'main' into fix/next-release-bugs
commit 9ba630b5e8
Merge: bf819a716d910755
Author: suyao <sy20010504@gmail.com>
Date: Fri May 9 21:27:08 2025 +0800
Merge branch 'fix/next-release-bugs' of github.com:CherryHQ/cherry-studio into fix/next-release-bugs
commit bf819a7142
Author: suyao <sy20010504@gmail.com>
Date: Fri May 9 21:24:48 2025 +0800
feat: enhance citation handling and add metadata support in citation blocks
commit 6d9107558e
Author: MyPrototypeWhat <daoquqiexing@gmail.com>
Date: Fri May 9 19:47:24 2025 +0800
fix: enhance logging and update async handling in StreamProcessingService and messageThunk
- Enabled logging in `createStreamProcessor` for better debugging.
- Added logging for updated messages in `updateExistingMessageAndBlocksInDB` and `saveUpdatesToDB`.
- Updated `onTextComplete` and `onLLMWebSearchComplete` to handle asynchronous operations correctly.
- Commented out unused `saveUpdatedBlockToDB` calls to prevent unnecessary database updates.
commit c402a1d21f
Author: MyPrototypeWhat <daoquqiexing@gmail.com>
Date: Fri May 9 18:47:55 2025 +0800
refactor: optimize block update logic and remove unused code
- Updated `throttledBlockUpdate` to handle asynchronous updates directly.
- Removed the unused `throttledBlockDbUpdate` function and its related logic.
- Added cancellation for throttled updates on error and completion to improve performance and reliability.
- Cleaned up commented-out code for better readability.
commit 6da1d08c9a
Author: MyPrototypeWhat <daoquqiexing@gmail.com>
Date: Fri May 9 18:42:00 2025 +0800
refactor: update message handling and state management
- Simplified message editing logic by removing unnecessary success/error logging.
- Added `updatedAt` timestamp to message updates for better tracking.
- Refactored `editMessageBlocks` to accept message ID and updates directly.
- Removed unused `getTopicLimit` function from `TopicManager`.
- Updated message rendering to use `updatedAt` when available.
- Enhanced type definitions to include `updatedAt` in message structure.
commit 30696e1ef1
Author: suyao <sy20010504@gmail.com>
Date: Fri May 9 16:19:55 2025 +0800
Remove Zhipu mode and text-only link handling
commit 5b95d20294
Author: kangfenmao <kangfenmao@qq.com>
Date: Fri May 9 15:49:02 2025 +0800
fix: update citation rendering logic in MainTextBlock component
- Added a check to determine if the citation URL is a valid link.
- Updated citation tag formatting to conditionally include the link based on the URL validity.
commit 28f1e486e6
Author: kangfenmao <kangfenmao@qq.com>
Date: Thu May 8 18:31:14 2025 +0800
style: update ChatNavigation and CitationsList components for improved UI consistency
- Added header style to remove borders in ChatNavigation.
- Enhanced CitationsList with new Skeleton loading state and improved layout for citation cards.
- Refactored CitationLink to a div for better styling control and adjusted padding in OpenButton for a more polished appearance.
refactor: improve model type checking logic in models.ts and ModelEditContent.tsx
* Refactor isFunctionCallingModel, isEmbeddingModel, isVisionModel, isReasoningModel, and isWebSearchModel functions for better readability and maintainability.
* Simplify type selection logic in ModelEditContent by directly using model.type or defaultTypes.
* Remove unnecessary conditional checks to streamline the code.
Co-authored-by: kanweiwei <kanweiwei@nutstore.net>
* feat(webSearch): add Bocha web search provider integration
- Introduced BochaProvider for handling web search queries.
- Added Bocha logo and updated web search provider configuration.
- Implemented API host and key validation for Bocha.
- Enhanced web search settings to support Bocha provider.
- Updated Redux store to include Bocha in the web search provider list.
- Added validation schemas for Bocha search parameters and responses.
* fix(WebSearch): improve error handling in BochaProvider and validate web search questions
- Added error handling for failed Bocha search responses.
- Enhanced validation for web search questions to ensure they are an array and not empty.
* fix(WebSearch): add API host validation for Tavily provider
* chore: remove api host check button
* fix: add check for unnecessary web search in fetchExternalTool
---------
Co-authored-by: eeee0717 <chentao020717Work@outlook.com>
* fix: focus the selected or the first item on searching
* refactor: remove unnecessary deferred values
* refactor: add a hook usePinnedModels for pinned models
* refactor: make the definition more consistent with other popups
* refactor: improve state management, improve scrolling behaviour
* fix: avoid potential modulo-by-zero
* fix: type error
* fix: async loading pinned models
* feat(Qwen3): Add Qwen3 Model Thinking Mode Switch
- Add a thinking mode switch for the Qwen3 model on the settings page,
- Enabled: Generates thinking content. Disabled: Does not generate thinking content.
This feature is implemented by adding new settings items and corresponding logic.
* docs(i18n): Add multilingual translations for Qwen3 model's thinking mode
* refactor(Qwen3): Remove Qwen thinking mode related code from SettingTab
- Remove Qwen thinking mode related state and logic from the SettingsTab component
- Integarte Qwen 3 thinking mode switch login the ThinkingButton component to simplify the code and improve maintainability
* refactor(OpenAICompatibleProvider): Extract qwen3 handling logic to ModelMessageService
Move the postsuffix handling logic in OpenAICompatibleProvider to ModelMessageService to improve code maintainability and reusability
* docs(i18n): Remove Qwen3 model-related translations
Remove the translation content of the unused Qwen3 model's thinking mode and its prompts
* implemented a new inspect menu item in the context menu that toggles developer tools
* added localization for the inspect option in English, Japanese, Russian, and Chinese (both simplified and traditional)
* replaced InfoCircleFilled icon with Info from lucide-react for consistency
* simplified painting state initialization and handling in AihubmixPage and PaintingsPage
* removed unnecessary conditional logic for setting default painting
* feat: support both function call and system prompt for MCP tools
- Add support for using both function call and system prompt to implement MCP tool calls
- Refactor tool handling logic to be more flexible and maintainable
- Improve code readability with better variable naming and comments
- Fix potential issues with tool call implementation
* fix: Add tool_calls in OpenAI streaming logic
* refactor: enhance OpenAICompatibleProvider and BaseOpenAiProvider structure
* feat: add tool call setting to SettingsTab component
* fix: enhance tool call handling in OpenAICompatibleProvider
* fix: enhance content handling in GeminiProvider for nonstreaming response
* refactor: improve tool property filtering logic in OpenAIProvider and mcp-tools utility
* fix: resolve eslint errors
* fix: add history for function call message in GeminiProvider
* refactor: unify MCP tool response handling across providers for consistency
* refactor: update mcp tools conversion logic in OpenAICompatibleProvider and OpenAIProvider
* refactor: enhance AihubmixProvider and BaseProvider with MCP tool handling methods
* refactor: introduce SYSTEM_PROMPT_THRESHOLD constant in BaseProvider for improved readability
* refactor: rename tool_call to enable_tool_use for clarity and consistency across the application
* refactor: remove unnecessary onChunk call in processStream for cleaner code
* fix: add toolCallId to response structure and enhance content handling in AnthropicProvider
* fix: respond image data to llm while using function call
* fix: add reasoning handling in OpenAICompatibleProvider for improved response processing
---------
Co-authored-by: kanweiwei <kanweiwei@nutstore.net>
Co-authored-by: jay <sevenjay@users.noreply.github.com>
* removed the old n8n.ico file
* added new n8n.svg file
* updated references in minapps configuration and app components to use the new SVG logo
* changed file handling from 'customMiniAPP' to 'custom-minapps.json' for consistency
* feat: add Paratera mini app with logo and URL.
* feat: add Paratera AI provider and associated model.
* feat: add Paratera provider to migration configuration
* fix: update Paratera entry in default mini apps configuration
* feat: add additional Paratera models to system models configuration
* feat: reintroduce Paratera provider in migration configuration
* fix: update redux-persist version to 99 in store configuration
---------
Co-authored-by: George Zhao <georgezhao@SKJLAB>
* perf: quick panel with virtual list
* fix: adaptive virtual list height
* fix: keep panel content if it is re-opened in a very short interval
* refactor: use modified rc-virtual-list to support overscan
* fix: virtual list item key
* refactor: remove useless styles
* refactor: support smooth scrolling for virtual list
* fix: lint error
* perf: use virtual list for SelectModelPopup
* refactor: change model name style
* fix: better auto scroll behaviour
* perf: improve memorization for SelectModelPopup
* fix: group name background
* refactor: change model item margin
* chore: update rc-virtual-list to 3.19.2
* fix: adaptive list height
* refactor: improve styles for focused or selected items
* refactor: do not show model if the assistant has not default model
* chore: migrate to custom rc-virtual-list
* refactor: improve selected item style
* refactor: improve selected item style
* fix: left margin
* refactor: simplify the indicator for selected item
* fix: prevent mouse hover for keyboard events
* chore: bump rc-virtual-list
* refactor: simulate sticky group header in SelectModelPopup
* fix: cleanup timer, add comments
* perf: improve smooth scrolling
* chore: bump to rc-virtual-list:3.19.6
* refactor: update memorization
* refactor: extract item rendering logic
* refactor: delay CustomTag tooltip for performance
* fix: disable spellcheck in model search bar
* refactor: expand/collapse model label on resizing window
* refactor: simplify filtering
* chore: update rc-virtual-list
* refactor: always render virtual list to avoid inconsistent state
* chore: update dependencies
* chore: update dependencies
* chore: update dependencies
* refactor: remove useless states
* refactor: simplify selected state
* refactor: improve keyboard events for SelectModelPopup
* revert: do not expand mode tags
* refactor: reduce animation time
* chore: update dependencies
* refactor: better names and comments
* refactor: better error handling
* refactor: simplify auto-scrolling logic
* refactor: use react-window rather than rc-virtual-list
* fix: disable auto-scroll
* fix: scroll bar style and item margin
* fix: initialize sticky banner
* refactor: distinguish auto-scrolling behaviour for different causes
* fix: keyboard navigation error
* refactor(ModelList): make the group removing button consistent with model removing button
* refactor(ModelList): improve auto-grouping, reduce the number of groups
* refactor(EditModelsPopup): extract model group tools
* refactor(naming): add special grouping rules for some providers
* feat(ModelList): add a button to add/remove all the listed models
* refactor(naming): update auto grouping
* refactor: update auto grouping for dmxapi
* revert: remove ungrouped
* feat: 新增文件写入功能,支持通过 ID 写入文件并加载自定义小应用配置。
* feat(i18n): 添加自定义小程序配置的多语言支持,包括英文、简体中文和繁体中文。
* fix(minapps): 使用 await 加载自定义小应用并合并到默认应用中,同时添加日志输出以便调试
* fix(minapps): 在开发环境中添加条件日志输出,以便调试加载的默认小应用。
* refactor(miniappSettings): 移动自定义小应用编辑区域的位置,优化界面布局。
* refactor(miniappSettings): 修改自定义小应用保存逻辑,优化应用列表重新加载方式。
* feat(i18n): 修复在merge过程中丢失的语言设置。
* fix(bug_risk): Consider adding stricter validation for the JSON config on load.
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
* feat(miniapp): 添加自定义小应用功能,优化应用列表展示,支持通过模态框添加新应用。
* feat(App): enhance custom app modal to support logo upload via URL.
* feat(miniapp): add application logo support and update mini app list reloading logic.
* feat(i18n): update mini app custom settings translations for multiple languages.
* feat(miniapp): add updateDefaultMinApps function and refactor mini app list reloading logic.
* feat(miniapp): add removeCustom functionality to handle custom mini app deletion
* feat(miniapp): add duplicate ID check when adding custom mini apps.
* feat(i18n): 重构侧边栏相关翻译为结构化格式,增加删除自定义应用的翻译支持。
* feat(miniapp): 优化删除自定义应用的逻辑,使用条件渲染简化代码结构。
* feat(miniapp): 添加自定义小应用内容的空值处理,确保 JSON 格式有效。
* feat(i18n): 更新默认语言为英语,并移除多个语言文件中的默认代理字段。
* feat(i18n): 为多个语言文件添加自定义小应用配置编辑描述翻译。
* feat(i18n): add success and error messages for deleting custom mini apps in multiple language files.
* feat(i18n): update success and error messages for custom mini app operations and add placeholder text in multiple language files.
* feat(i18n): 为多个语言文件添加重复ID和冲突ID的错误信息翻译,并在自定义小应用设置中实现相关检查逻辑。
* feat(miniapp): 在添加自定义小应用时,增加对默认最小应用ID的重复检查逻辑。
* feat(i18n): update edit description for custom mini app configuration in Traditional Chinese locale
* fix(miniapp): enhance error messages for duplicate and conflicting IDs in custom mini app configuration
---------
Co-authored-by: George Zhao <georgezhao@SKJLAB>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: suyao <sy20010504@gmail.com>
* feat: enhance web search capabilities in AnthropicProvider
- Added support for Claude models in web search functionality with a new regex.
- Implemented logic to retrieve web search parameters and handle web search results.
- Updated message handling to include web search progress and completion states.
- Enhanced citation formatting for web search results from Anthropic source.
* feat: import WebSearchResultBlock for enhanced message handling
- Added import for WebSearchResultBlock from the Anthropic SDK to improve message processing capabilities in messageBlock.ts.
- Removed duplicate import to streamline the code.
* chore: update @anthropic-ai/sdk to version 0.41.0 in package.json and yarn.lock
* Update src/renderer/src/store/messageBlock.ts
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
---------
Co-authored-by: Chen Tao <70054568+eeee0717@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
* feat: enhance search functionality with optional HTTP options
- Updated the search method signatures in BaseWebSearchProvider, WebSearchEngineProvider, LocalSearchProvider, and WebSearchService to accept optional HTTP options.
- Modified fetchWebContent and fetchWebContents to utilize the new HTTP options parameter for improved request handling.
- Enhanced error handling in messageThunk to manage abort errors more effectively.
* feat: implement abortable promises for web search and fetch operations
- Added createAbortPromise utility to handle abort signals for promises.
- Updated LocalSearchProvider and fetchWebContent to utilize abortable promises, allowing for better control over ongoing requests.
- Enhanced error handling in ApiService to log errors consistently.
- Changed the auto-install server name to '@cherry/mcp-auto-install' in migration logic.
- Implemented logic to register the MCP server upon tool invocation if it matches the auto-install server name.
* feat: add zoom factor setting and localization support
- Introduced App_SetZoomFactor IPC channel for managing zoom levels.
- Implemented zoom factor functionality in the main IPC handler.
- Added setZoomFactor method in the settings store and corresponding UI in DisplaySettings.
- Included localization for zoom settings in English and Chinese.
* add i18n
* recover file
* delete code
* fix: update zoom factor handling to apply to all windows
- Modified the IPC handler for App_SetZoomFactor to set the zoom factor for all non-destroyed windows instead of just the main window.
* add getzoomfactor api
* feat: synchronize zoom factor with Redux state on app initialization
- Added functionality to fetch the zoom factor from the main process and dispatch it to the Redux store during app initialization.
- Removed redundant zoom factor fetching logic from DisplaySettings component.
* feat: enhance zoom factor management with IPC updates
- Added a new IPC channel for zoom factor updates to notify all renderer processes.
- Introduced a constant for predefined zoom levels to streamline zoom adjustments.
- Updated the zoom handling logic to utilize the new zoom levels and ensure smooth transitions.
- Implemented a listener in the preload script to handle zoom factor updates from the main process.
- Refactored the app initialization to include real-time updates for the zoom factor in the Redux state.
* feat: integrate zoom options into DisplaySettings component
- Added ZOOM_OPTIONS constant to generate structured options for Ant Design Select from predefined zoom levels.
- Refactored DisplaySettings to utilize ZOOM_OPTIONS, removing redundant zoom option definitions.
- Simplified the zoom factor fetching logic in useAppInit for better readability and efficiency.
* refactor: streamline zoom factor handling and remove unused IPC channel
- Removed the App_GetZoomFactor IPC channel as it was no longer needed.
- Updated zoom factor handling to directly set and notify the main window of changes.
- Simplified the logic for setting the zoom factor in the WindowService and ShortcutService.
- Adjusted the useAppInit hook to utilize the new zoom factor management approach.
* refactor: improve zoom factor handling in WindowService and useAppInit hook
- Simplified the zoom factor setting in WindowService by directly using the config manager.
- Updated useAppInit to ensure the zoom factor is set correctly on initialization, enhancing responsiveness to changes.
* fix: update model checks to include supported reasoning and thinking token models
* fix: simplify thinking button visibility logic in Inputbar component
* feat(OpenAI): new Responses API support
- Added OpenAICompatibleProvider to handle requests for OpenAI-compatible models.
- Updated ProviderSettings to reflect changes in provider types from 'openai' to 'openai-compatible'.
- Enhanced model validation and response handling in OpenAIProvider to support new input formats.
- Refactored existing components to accommodate the new provider structure and ensure compatibility with OpenAI's response API.
- Incremented store version to 98 to reflect changes in provider types and settings.
- Updated migration logic to convert existing 'openai' provider types to 'openai-compatible' where applicable.
* refactor(OpenAI): update model validation and response handling
- Renamed `isOpenAIModel` to `isOpenAILLMModel` for clarity in model type checking.
- Updated references to the new model validation function across `OpenAICompatibleProvider` and `OpenAIProvider`.
- Enhanced web search model validation logic to accommodate new model checks.
- Refactored `getOpenAIWebSearchParams` to return structured parameters based on model type.
- Improved citation formatting in message blocks for better web search results handling.
* fix(OpenAICompatibleProvider): reset timestamps for first token handling
- Updated logic to reset timestamps for the first token and content when no prior thinking content is present.
- Added comments for clarity on the purpose of the changes and marked a temporary fix for timestamp handling.
* refactor(OpenAICompatibleProvider): improve code readability with consistent formatting
* fix(OpenAIProvider): refine service tier logic for model identification
* fix: eslint error
* fix(OpenAIProvider): enhance response metrics tracking in streaming process
* feat(OpenAIProvider): add timeout handling for model requests
---------
Co-authored-by: 自由的世界人 <3196812536@qq.com>
* refactor: add Linux support for margin adjustments in MinappPopupContainer and McpSettingsNavbar
* refactor: adjust margin and padding for Linux support in MinappPopupContainer and McpSettingsNavbar
* refactor: enhance Linux support in MinappPopupContainer by updating button group class condition
* feat: TextEditPopup support translation assistant
* polish: ensure safe state updates in TextEditPopup during unmount
* test: make delay assertion more lenient in unclassified utils tests
* feat: add loading indicator to translation button in TextEditPopup
* feat: 支持自定义助手地址
feat: 支持自定义助手地址
* feat: 更新多语言支持,添加“defaultaides”字段至隐私设置,并修改默认智能体的值为设置中的引用。
* feat: 更新默认助手设置,修复函数命名错误并优化状态管理
* refactor: update agent loading logic to use settings and improve error handling
* refactor: update DefaultaidesSettings to use custom hook for state management and replace icon in DataSettings
* fix: improve error message formatting in callMCPTool function
* feat: 添加多语言支持的默认助手设置,包括英文、日文、俄文和中文的翻译。
* refactor: 优化智能体加载逻辑,合并本地和远程智能体,并改进错误处理。
* feat: add import functionality for agents and update translations in multiple languages.
* feat: implement agent import functionality with validation and error handling.
* feat(i18n): add import success and error messages for agents in multiple languages.
* fix(i18n): standardize import success message key across multiple languages.
* refactor(i18n): remove default aides section from multiple language files
* refactor(i18n): update Traditional Chinese translations for agent management and privacy settings.
* feat(i18n): add import functionality for agents with URL and file options, including error handling and translations in multiple languages.
* refactor(i18n): rename 'defaultaides' to 'defaultAgent' across multiple language files and update related settings.
* refactor(AgentsPage): remove unused addAgent function from useAgents hook.
---------
Co-authored-by: 上房揭瓦 <hoaobo@foxmail.com>
Co-authored-by: George Zhao <georgezhao@SKJLAB>
Co-authored-by: suyao <sy20010504@gmail.com>
* chore(dependencies): update electron-builder and related dependencies to version 26.0.15
* chore(electron-builder): update portable build configuration and clean up artifact build script
- Set buildUniversalInstaller to false for portable builds in electron-builder configuration.
- Removed obsolete condition for deleting portable files in artifact build completion script.
* fix(OpenAIProvider): enhance token budget calculation in OpenRouter
* fix(OpenAIProvider): update budget token calculation and adjust effort ratio for improved reasoning support
feat(messageOperations): add editMessageBlocks functionality and update message handling logic
- Introduced editMessageBlocks to update properties of message blocks.
- Enhanced editMessage to include error handling and logging.
- Updated useTopicMessages to accept topic ID directly.
- Refactored MessageMenubar to utilize editMessageBlocks for editing messages.
- Improved saveMessageAndBlocksToDB for better state management.
* feat: implement store synchronization across windows
- Added new IPC channels for store synchronization: StoreSync_Subscribe, StoreSync_Unsubscribe, StoreSync_OnUpdate, and StoreSync_BroadcastSync.
- Integrated store sync service in various components, including the main IPC handler and renderer store.
- Removed the MiniWindowReload IPC channel as it was no longer needed.
- Updated the store configuration to support synchronization of specific state slices.
* refactor: remove custom CSS functionality from IPC and related components
- Removed the App_SetCustomCss channel and associated handlers from the IPC and ConfigManager.
- Updated the renderer components to eliminate references to custom CSS settings.
- Refactored the MiniWindow component to manage custom CSS directly without IPC communication.
- Added new IPC channels for store synchronization: StoreSync_Subscribe, StoreSync_Unsubscribe, StoreSync_OnUpdate, and StoreSync_BroadcastSync.
- Integrated store sync service in various components, including the main IPC handler and renderer store.
- Removed the MiniWindowReload IPC channel as it was no longer needed.
- Updated the store configuration to support synchronization of specific state slices.
* feat: implement ThinkingPanel for managing reasoning effort and token limits
- Added ThinkingPanel component to handle user settings for reasoning effort and thinking budget.
- Introduced ThinkingSelect and ThinkingSlider components for selecting reasoning effort and adjusting token limits.
- Updated models and hooks to support new reasoning effort and thinking budget features.
- Enhanced Inputbar to integrate ThinkingPanel and provide a toggle for enabling thinking features.
- Updated translations and styles for new components.
* refactor: enhance ThinkingPanel and related components for improved reasoning effort management
- Updated ThinkingPanel to streamline token mapping and error messaging.
- Refactored ThinkingSelect to utilize a list for better UI interaction.
- Enhanced ThinkingSlider with styled components for a more intuitive user experience.
- Adjusted model checks in the configuration to support new reasoning models.
- Improved translations for clarity and consistency across languages.
* feat: close ThinkingPanel on outside click
* feat(icons): add new lightbulb icons and update reasoning effort settings in translations
- Introduced new SVG icons for lightbulb states (off, on at 10%, 50%, and 90%).
- Added "Off" reasoning effort option in English, Japanese, Russian, Simplified Chinese, and Traditional Chinese translations.
- Refactored Inputbar and ThinkingButton components to integrate new reasoning effort logic and icon display.
* feat(thinking): refactor reasoning effort management and introduce new lightbulb icon
- Removed ThinkingPanel, ThinkingSelect, and ThinkingSlider components to streamline reasoning effort management.
- Added new MdiLightbulbAutoOutline icon for the auto reasoning effort option.
- Updated reasoning effort logic in ThinkingButton to support 'auto' and fallback options.
- Enhanced translations for reasoning effort options across multiple languages.
- Adjusted model configurations to integrate new reasoning effort settings.
* refactor(messageThunk): update multi-model dispatch logic for improved assistant handling
- Changed the parameter from baseAssistantId to assistant object for better clarity.
- Updated tasksToQueue structure to include assistant configuration instead of just ID and model.
- Enhanced the creation of assistant messages to utilize the full assistant object.
* chore(messageThunk): remove unused comment for clarity in multi-model response handling
* fix(ThinkingButton): update quick panel title for reasoning effort settings
* fix(GeminiProvider, OpenAIProvider): apply Math.floor to budget calculations for improved accuracy
---------
Co-authored-by: ousugo <dkzyxh@gmail.com>
Co-authored-by: Teo <cheesen.xu@gmail.com>
* feat(WindowService): add main window monitor for renderer process events
* fix(WindowService): enhance renderer process crash handling to improve application stability
* refactor: 重构快捷助手
- 移除不必要的 `model` 属性,简化 `MessageContent` 和相关组件的参数传递。
- 更新 `MessageItem` 和 `MessageBlockRenderer` 以提高可读性和性能,确保消息内容的正确渲染。
- 修复 `fetchCitations` 中的潜在错误,确保引用数据的正确处理。
- 清理未使用的代码和注释,提升代码整洁性。
* refactor: 优化消息块处理和错误显示逻辑
- 在 `upgradeToV7` 函数中调整了消息块的创建顺序,以保持与旧版本的一致性。
- 更新了 `ErrorBlock` 组件,增强了错误信息的显示逻辑,支持更详细的 HTTP 错误状态处理。
- 在多个语言文件中添加了暂停占位符文本,提升了用户体验。
- 移除了未使用的代码和注释,提升了代码整洁性。
* refactor(useAssistant): optimize topic handling with useMemo
* feat(locales): add Russian translations for MinApp and MiniWindow components
- Introduced new translations for various UI elements in the MinApp and MiniWindow sections, enhancing the user experience for Russian-speaking users.
- Updated the HomeWindow component to streamline topic handling by directly accessing the default assistant's topics, improving code clarity and performance.
* refactor(message): remove loading state management from newMessage slice and streamline message loading logic
- Removed the loading state update for topics in the `newMessage` slice to simplify state management.
- Updated `loadTopicMessagesThunk` to eliminate unnecessary loading checks, enhancing clarity and performance during message loading.
---------
Co-authored-by: suyao <sy20010504@gmail.com>
* style: optimize mcp arg name display layout when tool or prompt description is short
* style: optimize mcp arg name display layout, make it simple
* fix: remove unused import
* fix: determining thinking process using block status
* refactor: merge MessageThought to ThinkingBlock
* style: fix typos
* fix: error handling
* refactor: set collapsed status as default
* refactor: remove pending status
* refactor: better collapsing behaviour
* refactor: remove processing status
* fix: The Error display of the failed mcp call shows that the Error type cannot be displayed
* Update src/renderer/src/utils/mcp-tools.ts
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
---------
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
* refactor: Reconstruct the network search module to support quick menu switching between different suppliers.
* refactor(GeminiProvider): simplify web search enablement logic
* refactor(settings): remove unnecessary SettingDivider for cleaner layout
* refactor(SelectModelButton): remove unused setModel function for improved performance
* refactor(ApiService): simplify web search condition by removing redundant check
* feat(message-blocks): introduce new message block types and middleware for handling message updates
- Added new types for message blocks including MainText, Thinking, Translation, Code, Image, ToolCall, ToolResult, KnowledgeCitation, WebSearch, File, and Error blocks.
- Implemented middleware to manage message block mapping and updates in Redux, enhancing the handling of message states and blocks.
- Introduced LRU caching for efficient message block retrieval and management.
* feat(messages): implement message management slice and utility functions
- Introduced a new Redux slice for managing messages, including actions for setting the current topic, loading state, error handling, and message updates.
- Added utility functions for creating various message block types, enhancing the structure and management of message content.
- Updated message type definitions to include timestamped block references, improving the tracking of message block states.
* feat(store): add messageBlocks reducer and integrate into rootReducer
- Introduced a new messageBlocks reducer to manage message block state.
- Updated rootReducer to include messageBlocks alongside existing reducers.
- Refactored newMessage slice to accommodate changes in message structure and block handling.
- Removed obsolete messageBlockMap utility file to streamline codebase.
* feat(database): implement version 7 migration and enhance message structure
- Added new message_blocks table to the database schema for improved message handling.
- Introduced upgradeToV7 function to migrate existing topics and messages to the new structure.
- Refactored message creation utilities to support new message block types and improved error handling.
- Implemented various message filtering utilities to streamline message processing.
- Updated Redux store to accommodate new message structure and loading states.
* feat(message): refactor message handling and introduce messageStreamProcessor
- Updated database schema to correct types for topics and message blocks.
- Introduced messageStreamProcessor to handle API responses and transform them into application-specific data structures.
- Refactored messageThunk to streamline message creation and updates, ensuring consistency with the new message structure.
- Enhanced error handling and state management during message processing.
* refactor(message): update message handling with new types and utility functions
- Refactored message operations to utilize new message types and improved utility functions for content retrieval.
- Introduced helper functions for finding message blocks, enhancing the structure and readability of message processing.
- Updated various providers to align with the new message structure, ensuring consistent handling of message content and blocks.
- Enhanced error handling and state management during message processing, improving overall reliability.
* refactor(message): wip create XxxBlock components
- Refactored message handling to utilize new message types, enhancing the overall structure and readability.
- Introduced new message blocks including CitationBlock, CodeBlock, ErrorBlock, FileBlock, ImageBlock, ThinkingBlock, ToolBlock, and TranslationBlock.
- Updated existing components to align with the new message structure, ensuring consistent handling of message content and blocks.
- Improved utility functions for finding and processing message blocks, enhancing the reliability of message operations.
* refactor(message): enhance message operations with new selectors and blocks
- Updated useMessageOperations to integrate new message block types and selectors for improved state management.
- Introduced new selectors for fetching topic messages and loading states, enhancing the efficiency of message retrieval.
- Refactored message handling in Inputbar and MessageContent components to align with the new message structure.
- Added CitationBlock and improved rendering logic for message blocks, ensuring consistent display of message content.
- Enhanced error handling and logging for message operations, improving overall reliability.
* refactor(message): enhance message update logic with block instructions
- Updated the updateMessage reducer to handle block instructions, allowing for more flexible message updates.
- Improved the fetchAndProcessAssistantResponseImpl function to track the last added block, ensuring proper handling of streaming content.
- Refactored stream processing to accommodate new callback signatures and improve error handling.
- Removed unused console logs and cleaned up code for better readability and maintainability.
* merge origin/main
* refactor(message): update message handling and block structure
- Replaced `prepareTopicMessages` with `loadTopicMessagesThunk` for improved message loading logic.
- Updated `MessageTools` to accept `ToolBlock` instead of `Message`, enhancing type safety.
- Introduced `resetMessage` utility to streamline message object creation and reset mutable fields.
- Refactored `findCitationBlocks` and related types for consistency in message block handling.
- Enhanced error handling in message update logic to ensure robustness during database operations.
* refactor(message): update message and block handling for improved clarity and performance
- Refactored message handling by removing unnecessary cloning of messages in `MessageContent`.
- Updated `Inputbar` to import `Message` from the new message types module.
- Simplified block rendering logic in `MessageBlockRenderer` by removing redundant checks.
- Adjusted `StreamProcessingService` to use the updated import path for `GroundingMetadata`.
- Enhanced message status handling in `newMessage` to include 'streaming' status.
- Removed deprecated `createUserMessageThunk` to streamline thunk actions.
- Updated type definitions in `newMessageTypes` for better clarity and consistency.
* refactor(message): enhance message block structure and type handling
- Updated `Markdown` component to utilize `MainTextMessageBlock` for improved type safety.
- Refactored `MessageContent` to remove error handling logic and streamline rendering.
- Adjusted `MessageError` to accept `ErrorMessageBlock` and simplified error display logic.
- Enhanced `MessageTools` to work with `ToolMessageBlock`, improving clarity in tool response handling.
- Updated `MainTextBlock` to pass the correct props to `Markdown`, ensuring consistent rendering.
- Refactored utility functions to align with new message block types, enhancing overall code clarity and maintainability.
* refactor: update message types import paths and enhance message handling logic
- Changed import paths for message types from 'newMessageTypes' to 'newMessage' across multiple files.
- Refactored message handling functions to utilize the new message structure, ensuring compatibility with the updated types.
- Improved logic for finding and processing main text blocks in messages.
- Updated related components and hooks to reflect the new message structure, enhancing overall code maintainability.
* refactor: improve stream processing and message handling logic
- Updated the `createStreamProcessor` function to handle null and undefined chunks more robustly.
- Introduced a helper function `handleBlockTransition` to streamline state transitions between message blocks.
- Enhanced error handling in the `onComplete` function to specifically manage abort errors and create error blocks when necessary.
- Improved final block status updates to ensure accurate tracking of message processing states.
* refactor: use rehype-sanitize for html tags
# Conflicts:
# src/renderer/src/pages/home/Markdown/Markdown.tsx
* refactor: merge rehype plugins
* refactor(ModelList): extract NameSpan component and adjust styling for better layout
* feat: update Z.ai app configuration with additional styling and increment store version to 97
# Conflicts:
# src/renderer/src/store/index.ts
* feat(FeatureMenus, Footer): replace Ant Design icons with Lucide icons and enhance layout
- Updated icons in FeatureMenus from Ant Design to Lucide for improved visual consistency.
- Refactored Footer component to use Lucide icons and adjusted layout for better alignment and spacing.
- Enhanced styling of Tag components for a more cohesive design.
* lint: fix code format
* chore(version): 1.2.5
* feat(locales): add locale cleanup functionality to after-pack script
- Introduced a new `remove-locales.js` script to handle the removal of unnecessary locale files based on the platform.
- Integrated the locale cleanup process into the `after-pack.js` script to ensure locales are managed during packaging.
* feat: support escaping the comma character in the API key. (#5088)
feat: support escaping the comma character in the API key.
* feat(Citations): enhance CitationsList with title and info icon, and update styling
* Revert "feat: add chat message translate copy button (#4620)"
This reverts commit 8b462935b4.
# Conflicts:
# src/renderer/src/hooks/useMessageOperations.ts
# src/renderer/src/pages/home/Inputbar/Inputbar.tsx
* refactor: update message status handling and improve message creation logic
- Introduced `AssistantMessageStatus` to standardize message statuses across the application.
- Updated various components and services to utilize the new status enum, replacing string literals for better type safety.
- Refactored message creation and processing functions to align with the new status definitions.
- Adjusted filtering logic in `useMessageOperations` to reflect changes in message status handling.
- Cleaned up unused code and comments for improved readability.
* refactor: enhance citation handling and web search integration
- Updated CitationBlock and MainTextBlock components to improve citation processing logic.
- Refactored citation data handling to accommodate new web search sources and formats.
- Introduced new chunk types for better handling of streaming responses, including text and web search results.
- Enhanced the integration of web search results into message blocks, ensuring accurate citation references.
- Updated related types and interfaces to reflect changes in citation and web search structures.
* refactor: improve message handling and citation integration
- Added debug logging to various components for better traceability during message processing.
- Refactored CitationBlock and MainTextBlock to streamline citation handling and improve integration with web search results.
- Updated Inputbar to include debug logs for message sending and dispatching actions.
- Enhanced the message block rendering logic to decouple citation references from main text blocks.
- Improved the handling of citation data and ensured accurate formatting across different sources.
* feat: add regenerate assistant response functionality
- Introduced `regenerateAssistantResponseThunk` to allow regeneration of assistant messages.
- Updated `useMessageOperations` to include the new `regenerateAssistantMessage` function.
- Refactored `MessageMenubar` to utilize the new regeneration feature.
- Adjusted `MessageImage` and `ImageBlock` components to align with updated props.
- Cleaned up unused code and comments across various files for improved readability.
* fix: deepseek-reasoner does not support successive user or assistant messages in MCP scenario (#5112)
* fix: deepseek-reasoner does not support successive user or assistant messages in MCP scenario.
* fix: @ts-ignore
* refactor: remove google analytics
* feat: add PostHogProvider for analytics integration
- Introduced PostHogProvider to manage data collection based on user settings.
- Wrapped the main application in PostHogProvider to enable analytics when data collection is allowed.
* refactor(AxiosProxy): improve proxy handling and initialization logic
- Changed cacheAxios from undefined to null for better initialization.
- Updated proxy handling to use ProxyAgent, ensuring axios instance is recreated when the proxy changes.
- Simplified axios instance creation by directly using the current proxy agent.
* refactor: remove search enhanceMode
* fix: 知识库和网络搜索使用输出语言问题 (#5129)
* feat(proxy): use os-proxy-config to get system proxy info instead of resolveProxy (#5123)
* feat(proxy): integrate os-proxy-config for system proxy management
- Added os-proxy-config dependency to manage system proxy settings.
- Refactored setSystemProxy method to utilize getSystemProxy for improved proxy handling.
* fix lint error
* chore(version): 1.2.6
* fix: zipfile dependencies
* chore(release): update default release tag to v1.0.0 and install setuptools for Mac build
* disable auto update in portable exe
* chore(electron-builder): add StartupWMClass for CherryStudio in liunx desktop configuration (#5158)
chore(electron-builder): add StartupWMClass for CherryStudio in desktop configuration
* fix(MinApp): integrate dynamic background color for MinappPopupContainer (#5142)
* fix(models): 更新OpenRouter模型ID和名称,简化模型组分类 (#5172)
* fix: purify minapp user agent tag (#5173)
* fix: electron-builder 新增配置导致的无法构建的问题 (#5175)
fix: electron-builder 新增配置导致的无法构建的问题
当前 electron-builder 的版本为 "26.0.13",但在 v26 之后,StartupWMClass 等配置标签要在 desktop > entry 下,而不是直接在 desktop 下,否则会导致无法构建打包
* Revert "fix(minapps): remove AI Studio entry from default mini apps list" (#5177)
This reverts commit aed9c04c20.
* refactor(Markdown): remove rehype-sanitize and implement custom element filtering
- Removed rehype-sanitize dependency and its related configuration.
- Introduced ALLOWED_ELEMENTS and DISALLOWED_ELEMENTS for custom HTML element filtering.
- Updated rehypePlugins logic to conditionally apply plugins based on message content.
- Added encodeHTML utility function for HTML entity encoding.
# Conflicts:
# src/renderer/src/pages/home/Markdown/Markdown.tsx
* refactor: mcp buttons and mcp settings
* refactor: add MessageTranslate.tsx & MessageCitations.tsx
* refactor: add MessageContent.main.tsx { getModelUniqId } from '@renderer/services/ModelService' import { Message, Model } from '@renderer/types' import { getBriefInfo } from '@renderer/utils' import { formatCitations, withMessageThought } from '@renderer/utils/formats' import { encodeHTML } from '@renderer/utils/markdown' import { Flex } from 'antd' import { clone } from 'lodash' import { Search } from 'lucide-react' import React, { Fragment, useMemo } from 'react' import { useTranslation } from 'react-i18next' import BarLoader from 'react-spinners/BarLoader' import styled, { css } from 'styled-components'
* refactor: enhance translation handling by integrating TranslationMessageBlock into Markdown and MessageTranslate components, and streamline TranslationBlock to utilize MessageTranslate for rendering.
* refactor: introduce citation processing optimization checklist and enhance citation handling
- Added a new refactoring checklist for optimizing citation processing logic.
- Implemented a lookup map for citations in MainTextBlock to improve performance.
- Updated Citation interface to include optional content field.
- Modified chunk types for web and knowledge search responses to improve type safety.
- Enhanced citation formatting to include content from web search results.
* refactor: update web search handling in GeminiProvider and OpenAIProvider
* refactor: update prompt handling and citation processing logic
* refactor: standardize chunk type usage across providers and improve image handling in MessageImage component
* refactor: update message operations and API service for improved message handling
- Translated comment in useMessageOperations.ts for clarity.
- Refactored ApiService to utilize findMainTextBlocks for knowledge base checks.
- Enhanced messageThunk with multi-model dispatch logic for better assistant response handling.
* refactor: optimize knowledge base ID handling in ApiService
- Removed unused store import and streamlined knowledge base ID extraction logic.
- Enhanced fetchExternalTool function to utilize mainTextBlocks for knowledge base checks, improving clarity and efficiency.
* feat: add message lifecycle documentation and enhance citation handling in CitationBlock component
* feat: add SearchingSpinner component and enhance message handling with ThinkingMessageBlock
- Introduced a new SearchingSpinner component for better user feedback during processing.
- Updated Markdown and MessageThought components to support ThinkingMessageBlock.
- Enhanced CitationBlock to display the SearchingSpinner when processing citations.
- Refactored message handling to include thinking time metrics across various components and services.
* refactor: enhance ApiService and message handling for improved search functionality
- Streamlined knowledge base ID extraction using flatMap for better performance.
- Added early checks for extractResults in search functions to prevent errors and improve logging.
- Updated chunk types to include SEARCH_IN_PROGRESS_UNION and SEARCH_COMPLETE_UNION for better state management during searches.
- Refactored search execution logic to handle different search scenarios more efficiently.
* refactor: streamline message update logic and enhance block handling
- Simplified message update dispatching by using the store's dispatch directly.
- Improved block transition handling by replacing direct calls with a dedicated function.
- Refactored conditional logic for updating blocks to ensure accurate state management.
* feat: enhance StreamProcessingService with tool call progress handling
- Added onToolCallInProgress callback to StreamProcessorCallbacks for handling tool call progress updates.
- Updated createStreamProcessor function to accept an empty object as default for callbacks.
- Implemented logic to process MCP_TOOL_IN_PROGRESS and MCP_TOOL_COMPLETE chunks in message handling.
- Improved type definitions for MCPToolInProgressChunk to include responses.
* refactor: enhance AI providers with abort controller integration for improved request handling
- Added abort controller functionality to AnthropicProvider, GeminiProvider, and OpenAIProvider to manage request cancellations effectively.
- Updated API calls to include signal for aborting requests, ensuring better control over ongoing operations.
- Improved cleanup logic to handle abort scenarios gracefully.
* feat: add TODO for pause capability in WebSearchService
- Added a TODO comment in WebSearchService to implement pause functionality for network searches, enhancing future service capabilities.
* fix(WebdavBackupManager): update modal confirmation to use window.modal and center content
* refactor: improve message operations and API service for enhanced functionality
- Updated useMessageOperations to dispatch resendMessageThunk with topic ID instead of object for better clarity.
- Refactored ApiService to streamline knowledge base ID extraction using flatMap and added early checks for improved error handling.
- Enhanced message handling in messageThunk by integrating topic queue management and simplifying error handling logic.
- Cleaned up commented-out code for better readability and maintainability.
* fix: enhance message resending functionality and integrate abort signal for web searches
- Updated resendMessageThunk to reset assistant messages without deleting other messages, improving user experience.
- Integrated abort signal handling in WebSearchService and fetch functions to manage request cancellations effectively.
- Refactored fetchWebContents and fetchWebContent to accept an optional abort signal for better control over fetch operations.
- Added resetAssistantMessage utility to streamline the resetting of assistant messages for regeneration.
* fix: enhance chunk handling in AI providers for improved message processing
- Added onChunk calls in AnthropicProvider and GeminiProvider to ensure complete text messages are processed correctly.
- Updated OpenAIProvider to handle finish reasons more accurately, improving message completion handling.
- Removed outdated TODO comment in WebSearchService for better code clarity.
* feat: enhance SearchingSpinner component and add processing text localization
- Updated SearchingSpinner to accept a text prop for dynamic message rendering.
- Added "processing" text localization in English, Japanese, Russian, Chinese (Simplified and Traditional) for improved user experience.
- Integrated updated SearchingSpinner in CitationBlock and MainTextBlock components to display appropriate loading messages.
* fix(WebdavBackupManager): update modal confirmation to use window.modal and center content
fix sse no headers
add eventSourceInit
refactor: switch from @vitejs/plugin-react to @vitejs/plugin-react-swc for improved performance
perf: improve streaming performance (#4986)
feat(ProviderSettings): move model provider to the top when toggled
When the model provider is toggled (OFF to ON), it is moved to the top of the provider setting for convenience. The change is minimal.
fix(settings): handle undefined content limit in BasicSettings component (#5252)
feat: update os-proxy-config to 1.1.2 and delete the patch (#5255)
updte os-proxy-config to 1.1.2 and delete the patch
feat: 添加嵌入维度配置 (#3947)
fix(ci): Remove a deleted step which make the nightly build pipeline fail
These lines were deleted in `release.yml` in commit 75f98608.
build: fix nightly build error
build: remove sentry integration
refactor(GeminiProvider): streamline abort signal handling and improve stream processing #5276
需要处理 GeminiProvider processStream 函数代码
https://github.com/CherryHQ/cherry-studio/pull/5276/files
Update @modelcontextprotocol/sdk to v1.10.2 (#5266)
- Removed MCPStreamableHttpClient.ts as it is now provided by the SDK.
- Adjusted imports in MCPService.ts to use the SDK's implementation.
- Updated yarn.lock to reflect the new SDK version.
feat: add cherry-text-logo.svg and remove npm.svg; update MCPSettings and NpxSearch components
- Introduced a new cherry-text-logo.svg file for branding.
- Removed the deprecated npm.svg file.
- Refactored MCPSettings and NpxSearch components to enhance functionality and UI, including state management and layout adjustments.
- Updated translations in multiple locales to include new types for MCP servers.
style(settings): update border-radius to use CSS variable for consistency
feat(mcp): mcp setting add service description page
chore: update dependencies and clean up code
- Reintroduced @mozilla/readability, @shikijs/markdown-it, and @xyflow/react to package.json.
- Updated shiki version to 3.2.2 in both package.json and yarn.lock.
- Removed trailing whitespace in IpcChannel.ts and index.ts for code cleanliness.
- Added outline style to .ant-tabs-tab-btn in ant.scss for improved UI consistency.
feat(WindowService): add maximize functionality and disable electron-window-state maxmize (#5292)
* feat(WindowService): add maximize functionality and clean up window close logic
- Introduced a new `maximize` option in the window state configuration.
- Added `setupMaximize` method to handle window maximization based on the launch state.
- Removed redundant logic from the window close event handler for clarity.
* add code
* update code
Create pull_request_template.md
feat: enhance MinAppIcon component with sidebar prop
- Added optional sidebar prop to MinAppIcon for conditional styling.
- Updated Sidebar component to pass sidebar prop to MinAppIcon for consistent appearance in sidebar context.
refactor(MessageAttachments): move styled component definition inside the component for better encapsulation
feat: support portable config dir (#5039)
* feat: support portable config dir
* fix: remove redundant mkdir
feat(image): support grok-2-image image and gpt-4o-image (#4767)
* feat(image): support grok image
* feat: add gpt-4o-image
* feat: 添加 gpt-image-1 到生成图像模型列表
* refactor(GeminiProvider): remove redundant onChunk call in processStream function
* refactor(OpenAIProvider): update image generation response format and improve prompt handling
* feat(AiProvider): implement thought processing for incremental reasoning and update MessageContent component
* refactor(useMessageOperations): update topic handling in resendUserMessageWithEditThunk and improve MessageMenubar component structure
* refactor(Messages): streamline message rendering and update type imports for better clarity
* refactor(Messages): improve message block rendering logic
* refactor(Messages): enhance thinking time calculations
* refactor(Messages): enhance message usage estimation logic
* refactor(OpenAIProvider): get image generation usage
* refactor(Messages): optimize citation handling and improve main text block rendering
* refactor(Messages): improve clipboard copy functionality and streamline API response handling
* refactor(Messages): update message state management and improve selector usage for topic messages
* refactor(upgrades): update citation data structure in upgradeToV7 function and remove unused comments in messageBlock.ts
* feat(OpenAIProvider): enhance link conversion for web search results and refactor related logic in ApiService and messageBlock
* feat(translation): implement streaming translation updates and refactor translation handling
- Added a new `getTranslationUpdater` function to manage streaming translation updates.
- Refactored `translate` methods across various providers to support incremental updates.
- Updated `fetchTranslate` to accept content directly instead of a message object.
- Removed the `MessageContent.main.tsx` file as part of the cleanup.
- Enhanced error handling and logging during translation processes.
* feat(message-operations): add appendAssistantResponse functionality and enhance message operations
- Introduced `appendAssistantResponse` to allow appending new assistant responses using a specified model.
- Updated `useMessageOperations` hook to include the new function and improved documentation for existing methods.
- Refactored `MessageMenubar` to utilize the new `appendAssistantResponse` function for message handling.
- Enhanced error handling and logging in message-related thunks for better debugging and state management.
* feat(message): refactor message handling and enhance file block integration
- Updated `message_blocks` schema to include `file.id` for better file association.
- Refactored `FilesPage` to improve file deletion logic, ensuring related message blocks are updated or deleted accordingly.
- Enhanced `Inputbar` and `MessageAttachments` components to utilize new message structure and improve file handling.
- Removed deprecated `MessageCitations` component to streamline message management.
- Updated various components to use the new `MessageInputBaseParams` type for consistency across message operations.
* refactor(tests): clean up and organize formats test suite
- Removed commented-out code and unnecessary imports to enhance readability.
- Organized test cases for `escapeDollarNumber`, `escapeBrackets`, `extractTitle`, and `removeSvgEmptyLines` for better structure.
- Maintained existing test functionality while improving overall code clarity.
* refactor(tests): comment out unused tests in formats test suite
- Commented out the `withGeminiGrounding` test suite to improve clarity and focus on active tests.
- Removed unnecessary imports and organized the test structure for better readability.
- Maintained existing functionality while enhancing overall code organization.
* refactor(components): remove role prop from Markdown component in MessageThought and MessageTranslate
- Removed the `role` prop from the `Markdown` component in both `MessageThought` and `MessageTranslate` for consistency and to simplify the component usage.
- Updated import statements in `export.ts` to use type imports for `Message` and `Topic`, enhancing type safety.
- Commented out unused mock dependencies in the formats test suite to improve clarity and focus on active tests.
* refactor(messages): update message selection and handling for improved consistency
- Replaced legacy message selectors with new message handling methods in `ChatFlowHistory`, `ChatNavigation`, and `MessageAnchorLine` components.
- Utilized `getMainTextContent` utility for consistent message content retrieval across components.
- Updated state management in `messageThunk` to set the current topic ID correctly.
- Enhanced markdown export functions to utilize new message structure for better content handling.
* fix(databases): correct syntax in message_blocks schema for proper key separation
- Updated the `message_blocks` schema to include a comma separator between `messageId` and `file.id` for accurate primary key definition.
- Ensured consistency in database schema definitions to prevent potential issues during data retrieval.
* refactor(messages): enhance loading state handling and improve message block rendering
- Introduced a new `LoadingBlock` component to manage loading states for different message block types using `BeatLoader`.
- Updated `MessageContent` to display loading indicators when messages are pending.
- Cleaned up commented-out code and improved the structure of message block rendering logic.
- Adjusted `throttledBlockUpdate` and `throttledBlockDbUpdate` to prevent unnecessary updates when block statuses are already successful.
- Added error handling improvements in `fetchExternalTool` and `fetchAndProcessAssistantResponseImpl` for better robustness.
* refactor(messages): improve loading state handling in message block rendering
- Integrated `MessageBlockStatus` for better management of message block statuses.
- Added `LoadingBlock` component to handle loading states during message processing.
- Updated `fetchAndProcessAssistantResponseImpl` to set the status of tool blocks to `PROCESSING` for improved state tracking.
- Cleaned up commented-out code to enhance readability and maintainability of the rendering logic.
* refactor(messages): streamline message handling for clearing user messages
* feat(message-operations): add createTopicBranch functionality to clone messages to a new topic
- Implemented `createTopicBranch` in `useMessageOperations` to facilitate cloning messages from a source topic to a new topic.
- Introduced `cloneMessagesToNewTopicThunk` for handling the cloning process, including unique ID generation and database updates.
- Updated `Messages` component to utilize the new cloning functionality, ensuring proper topic management and error handling.
- Cleaned up unused imports and commented-out code in `MessageMenubar` for improved readability.
* fix(Messages): remove unused message operations in Messages component
- Removed `createNewContext` from the destructured message operations in the `Messages` component to clean up unused functionality.
- Added `getUserMessage` import to enhance message handling capabilities.
* 优化格式化和测试:重构消息处理和格式化功能
- 在 `formats.ts` 中移除未使用的 `withGeminiGrounding` 函数,并更新相关类型导入。
- 在测试文件中添加了对 `withGenerateImage` 和 `addImageFileToContents` 函数的测试,确保它们正确处理消息块和图像元数据。
- 通过创建辅助函数来简化测试数据的生成,提高测试的可读性和一致性。
- 清理了测试中的注释代码,提升了代码的整洁性。
* 优化消息处理和类型导入:更新消息相关组件以使用新消息类型
- 在多个组件中更新消息导入,确保使用 `newMessage` 类型以提高类型安全性。
- 移除未使用的 `CodeBlock` 组件,简化代码结构。
- 在 `SearchResults` 组件中引入 `getMainTextContent` 函数,以改进消息内容处理。
- 清理 `Suggestions` 组件中的冗余代码,提升可读性。
- 更新 `Message` 组件以支持新的消息处理逻辑,确保与助手消息状态的兼容性。
* feat(PlaceholderBlock): introduce PlaceholderBlock and Spinner component for loading states
- Added a new `Spinner` component to provide a visual loading indicator using `BarLoader` and `Search` icon.
- Replaced the deprecated `SearchingSpinner` with the new `Spinner` component in `CitationBlock` and `PlaceholderBlock` for improved consistency in loading states.
- Removed the unused `LoadingBlock` component to streamline the codebase.
- Updated `MessageContent` to enhance rendering logic by removing commented-out code and improving readability.
* feat:upgradeToV7 del catch
* fix:mini/message lint error
* feat(CitationsList): refactor citations rendering with Collapse component
- Replaced the direct rendering of citations with a Collapse component for better UI organization.
- Utilized useMemo for optimized rendering of citation items.
- Updated styling in CitationsContainer for improved layout.
- Enhanced PlaceholderBlock to use BeatLoader for loading state indication.
* fix(messageThunk): improve logging and cloneMessagesToNewTopicThunk functionality
- Updated debug logging to provide clearer information about topic retrieval and cloning process.
- Enhanced the cloning logic to correctly map askId for assistant messages, ensuring proper linkage in the new topic.
- Added checks to ensure file modifications only occur if the file exists, improving robustness.
- Cleaned up comments and improved readability in the cloneMessagesToNewTopicThunk function.
* fix(GeminiProvider): enhance image generation logic and response configuration (#5447)
* feat(GeminiProvider): enhance image generation logic and response configuration
* refactor(GeminiProvider): improve image generation logic readability
* feat(Message): enhance message handling and introduce MessageContent component
- Updated createAssistantMessage to remove unnecessary 'blocks' property from overrides.
- Refactored MessageItem to manage MainTextMessageBlock state and improve message processing logic.
- Added new MessageContent component for rendering message content with mentions and Markdown support.
---------
Co-authored-by: lizhixuan <zhixuan.li@banosuperapp.com>
Co-authored-by: one <wangan.cs@gmail.com>
Co-authored-by: ousugo <dkzyxh@gmail.com>
Co-authored-by: kangfenmao <kangfenmao@qq.com>
Co-authored-by: chenxi <16267732+chenxi-null@users.noreply.github.com>
Co-authored-by: suyao <sy20010504@gmail.com>
Co-authored-by: beyondkmp <beyondkmp@gmail.com>
Co-authored-by: Chen Tao <70054568+eeee0717@users.noreply.github.com>
Co-authored-by: Asurada <43401755+ousugo@users.noreply.github.com>
Co-authored-by: Roland <shlroland1995@gmail.com>
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
Co-authored-by: tchigher <34847046+tchigher@users.noreply.github.com>
* feat(TopicsTab): refactor topic menu item handling and improve state management
* refactor(TopicsTab): enhance state management with useDeferredValue for target topic
* fix(OpenAIProvider): refine system message handling for specific model IDs
* refactor(OpenAIProvider): introduce OPENAI_NO_SUPPORT_DEV_ROLE_MODELS for model ID checks
* Add MCP resources dropdown in settings navbar
* Refactor MCP settings navbar with inline styles
- Replace styled-components with inline styles
- Update resource URLs and capitalize "Servers" in title
- Add noopener,noreferrer to external links
- Simplify component structure with direct Menu.Item usage
- Implemented `findPowerShellExecutable` to determine the correct PowerShell executable path on Windows.
- Updated `getSystemPath` to utilize the new method for improved path retrieval.
- Updated IPC channel to handle 'auto' theme mode, allowing dynamic theme changes based on system preferences.
- Modified theme setting functions in preload scripts to accommodate the new 'auto' option.
- Adjusted Sidebar component to display an icon for 'auto' theme mode.
- Refactored ThemeProvider to manage theme state more effectively and listen for theme changes across windows.
- Adjusted MCP server definitions to include environment variable placeholders for MEMORY_FILE_PATH, BRAVE_API_KEY, and DIFY_KEY.
- Modified styling in SyncServersPopup to reduce gap between elements and removed unnecessary margin.
* Add MCP server installation via URL protocol
Implement handler for cherrystudio://mcp/install URLs to add MCP servers
from encoded configuration data. Supports multiple server configuration
formats and adds a new IPC channel for server addition.
* feat: Enhance MCP protocol handling and navigation
- Implemented navigation to the '/settings/mcp' page using executeJavaScript in the MCP protocol URL handler.
- Updated NavigationService to expose the navigate function globally for easier access in the application.
- Added NavigateFunction type to the global environment for improved type safety in navigation operations.
---------
Co-authored-by: kangfenmao <kangfenmao@qq.com>
* feat: add sync servers functionality and UI components for MCP settings
* Rename 'Discover Models' to 'Discover MCP Servers'
Replace Radio button group with Select dropdown for provider selection
in the sync servers popup UI and update related styling
Rename 'Discover Models' to 'Discover MCP Servers'
* Add error messages for MCP server sync
Improve error handling in modelscopeSyncUtils with new localization
strings for unauthorized access and no available servers. Update error
message handling in all language files and use nanoid for unique server
naming.
refactor(auto-update): streamline update check logic and enhance error handling
- Moved update check logic from IPC handler to AppUpdater class for better organization.
- Improved error handling during update checks to ensure graceful failure.
- Removed redundant conditions in the AboutSettings component for cleaner rendering.
* Update issue-management.yml
* feat: enhance issue management with new templates and automated stale issue handling
* fix: update issue templates for clarity and consistency in descriptions
* fix: improve clarity in issue templates and add area labels for better categorization
* fix: reorder question template title for improved clarity and update issue-checker to remove redundant label handling
* fix: add skip and remove labels for kind/bug, kind/enhancement, and kind/question in issue-checker
* fix: remove redundant handling for needs-more-info labels in issue-checker
- Revised the licensing agreement to introduce a User-Segmented Dual Licensing model, detailing conditions for individual and organizational use.
- Enhanced UI components to display a specific empty state image in various popups and pages.
- Adjusted styles in MiniAppIconsManager and MiniAppSettings for improved layout and appearance.
- Updated default web search provider to 'local-bing' and modified font size in ProviderOAuth description for better readability.
- Changed window style setting from 'transparent' to 'opaque' for a more consistent user experience.
- Added a new ProviderOAuth component to manage OAuth authentication and billing for providers.
- Updated existing components to integrate the new ProviderOAuth functionality.
- Enhanced internationalization support for OAuth-related texts across multiple languages.
- Introduced new utility functions for handling provider billing.
* feat: open popup url in external browser
* fix: allow google auth popup internal
* feat: add functionality(including settings) to open links in external browser for webviews
* fix: set useragent globally
* fix: remove setUserAgent in webview
* fix: set Chrome version to newest
- Added support for grok-2-image and gpt-4o-image.
- Enabled portable version of Windows to use the data directory for storage.
- Revamped MCP interface with new description display.
- Optimized Mermaid rendering logic.
- Added option to disable public rendering.
- Fixed OpenAI type rendering errors.
- Introduced a new English version of the contributor guide (CONTRIBUTING_EN.md) to enhance accessibility for non-Chinese speakers.
- Updated issue templates to use more specific labels (kind/bug, kind/enhancement, kind/question) for better categorization.
- Added a testing section in the developer guide to clarify testing procedures.
- Added optional sidebar prop to MinAppIcon for conditional styling.
- Updated Sidebar component to pass sidebar prop to MinAppIcon for consistent appearance in sidebar context.
* feat(WindowService): add maximize functionality and clean up window close logic
- Introduced a new `maximize` option in the window state configuration.
- Added `setupMaximize` method to handle window maximization based on the launch state.
- Removed redundant logic from the window close event handler for clarity.
* add code
* update code
- Reintroduced @mozilla/readability, @shikijs/markdown-it, and @xyflow/react to package.json.
- Updated shiki version to 3.2.2 in both package.json and yarn.lock.
- Removed trailing whitespace in IpcChannel.ts and index.ts for code cleanliness.
- Added outline style to .ant-tabs-tab-btn in ant.scss for improved UI consistency.
- Introduced a new cherry-text-logo.svg file for branding.
- Removed the deprecated npm.svg file.
- Refactored MCPSettings and NpxSearch components to enhance functionality and UI, including state management and layout adjustments.
- Updated translations in multiple locales to include new types for MCP servers.
- Removed MCPStreamableHttpClient.ts as it is now provided by the SDK.
- Adjusted imports in MCPService.ts to use the SDK's implementation.
- Updated yarn.lock to reflect the new SDK version.
- Upgraded Mermaid script to version 11.6.0.
- Refactored rendering logic to use a debounced function for improved performance.
- Added event listener for 'mermaid-loaded' to trigger rendering.
- Enhanced error handling during Mermaid chart rendering in both main and popup components.
- Removed unnecessary initialization calls and streamlined the use of theme settings.
* feat(auto-update): improve auto-update toggle functionality
- Added setAutoUpdate method in AppUpdater to control auto-update behavior.
- Updated IPC handler to set auto-update status based on user preference.
- Modified AboutSettings component to conditionally display update options based on auto-check setting.
* update autoupdate position
* fix(proxy): update os-proxy-config patch to correct proxy URL handling
- Modified the os-proxy-config dependency in package.json to apply a patch.
- The patch updates the logic in getSystemProxy to correctly handle HTTP and SOCKS proxy settings.
* use http instead of https for https proxy
- Changed the organization in the Sentry Vite plugin configuration.
- Modified Sentry initialization in the main process to always check data collection settings.
- Simplified Sentry initialization in the renderer process by removing the packaged check.
- Updated BackupManager to use archiver for creating ZIP files, enabling better performance and support for large files.
- Integrated extract-zip for unzipping backup files, enhancing the backup restoration process.
- Adjusted progress reporting during backup and restore operations for better user feedback.
- Updated package.json and yarn.lock to include archiver and extract-zip dependencies.
- Introduced MessageCitations component to handle and display citations from messages.
- Added MessageTranslate component to show translated content with loading state.
- Updated MessageContent to integrate new components and streamline citation formatting.
- Refactored citation handling logic in formats utility for improved performance and clarity.
- Enhanced MessageImage component to manage image download and clipboard copy functionality.
refactor(MCP): optimize MCP server handling in Inputbar and MCPToolsButton
wip
refactor(MCPSettings): streamline MCP server management and enhance UI components
- Removed unused imports and optimized state management for selected MCP servers.
- Introduced McpServersList component to encapsulate server listing and management logic.
- Updated routing to accommodate the new component structure.
- Adjusted styles for better layout and user experience in MCP settings.
- Removed rehype-sanitize dependency and its related configuration.
- Introduced ALLOWED_ELEMENTS and DISALLOWED_ELEMENTS for custom HTML element filtering.
- Updated rehypePlugins logic to conditionally apply plugins based on message content.
- Added encodeHTML utility function for HTML entity encoding.
* feat(proxy): integrate os-proxy-config for system proxy management
- Added os-proxy-config dependency to manage system proxy settings.
- Refactored setSystemProxy method to utilize getSystemProxy for improved proxy handling.
* fix lint error
- Changed cacheAxios from undefined to null for better initialization.
- Updated proxy handling to use ProxyAgent, ensuring axios instance is recreated when the proxy changes.
- Simplified axios instance creation by directly using the current proxy agent.
- Introduced PostHogProvider to manage data collection based on user settings.
- Wrapped the main application in PostHogProvider to enable analytics when data collection is allowed.
- Introduced a new `remove-locales.js` script to handle the removal of unnecessary locale files based on the platform.
- Integrated the locale cleanup process into the `after-pack.js` script to ensure locales are managed during packaging.
- Updated icons in FeatureMenus from Ant Design to Lucide for improved visual consistency.
- Refactored Footer component to use Lucide icons and adjusted layout for better alignment and spacing.
- Enhanced styling of Tag components for a more cohesive design.
- Added a title for the citations list with translation using `useTranslation`.
- Introduced an `Info` icon next to the citations title.
- Updated the `CitationsContainer` styling for better visual appeal.
- Refactored citation rendering logic in `MessageContent` to streamline citation handling.
* feat: implement maximum backups feature in WebDAV settings
- Add maximum backups feature to WebDAV settings
Signed-off-by: ysicing <i@ysicing.me>
* refactor: refactor backup file management for device-specific handling
- Change the order of hostname and device type in the backup file name
- Add filtering for backup files to manage device-specific backups
- Update logic to delete the oldest backup files based on the specific device count
Signed-off-by: ysicing <i@ysicing.me>
---------
Signed-off-by: ysicing <i@ysicing.me>
* feat(Messages): enhance file upload display with styled component for better UI
* feat(Inputbar): add file name truncation for better display in attachment preview
* feat(DataSettings): replace Typography.Text with PathText for improved path display and add text truncation styling
* feat(DataSettings): refactor path display with PathRow component for better layout and styling
* chore(electron-builder): Disable universal installer option in NSIS configuration
* refactor(after-build): Change file handling to delete files with spaces and rename files in YAML data
- Updated the function to delete files containing spaces instead of renaming them.
- Enhanced YAML processing to rename files and their blockmaps, ensuring proper handling of setup and portable versions.
- Adjusted the final YAML output to reflect the new file names.
* refactor(after-build): Simplify file renaming logic and remove space handling script
- Updated the after-build script to rename artifact files by replacing spaces with hyphens.
- Removed the replace-spaces.js script as its functionality is now integrated into the after-build process.
- Adjusted the build process in package.json to reflect the changes in file handling.
* refactor(electron-builder): Update artifact build script reference and remove obsolete after-build script
- Changed the artifactBuildCompleted script reference in electron-builder.yml to point to the new script.
- Deleted the outdated after-build.js script, which is no longer needed for file handling.
* delete js-yml
* refactor(GeminiService): migrate to new Google GenAI SDK and update file handling methods
- Updated import statements to use the new Google GenAI SDK.
- Refactored file upload, retrieval, and deletion methods to align with the new SDK's API.
- Adjusted type definitions and response handling for improved type safety and clarity.
- Enhanced file listing and processing logic to utilize async iteration for better performance.
* refactor(GeminiProvider): update message handling and integrate abort signal support
- Refactored message content handling to align with updated type definitions, ensuring consistent use of Content type.
- Enhanced abort signal management for chat requests, allowing for better control over ongoing operations.
- Improved message processing logic to streamline user message history handling and response generation.
- Adjusted type definitions for message contents to enhance type safety and clarity.
* refactor(electron.vite.config): replace direct import of Vite React plugin with dynamic import
* fix(Gemini): clean up unused methods and improve property access
* fix(typecheck): update color properties to use CSS variables
* feat: 修改画图逻辑
* fix: import viteReact
---------
Co-authored-by: eeee0717 <chentao020717Work@outlook.com>
* feat: implement OAuth client provider and lockfile management
* feat: implement OAuth callback server and refactor authentication flow
* fix(McpService): restrict command handling to 'npx' for improved clarity
* refactor: make callbackPort optional in OAuthProviderOptions and clean up MCPService
* refactor: restructure OAuth handling by creating separate callback and provider classes, and remove unused utility functions
* feat(MessageContent): 添加引用内容折叠功能,优化用户界面交互
* feat(Citations): add hideTitle prop to control title visibility in CitationsList
* feat(Messages): add message update functionality and manage UI state for citations and web search
* fix: web search citation
---------
Co-authored-by: 自由的世界人 <3196812536@qq.com>
* feat(model): add ModelCard schema and related types for input/output capabilities
* refactor(model): make limits and price properties optional in ModelSchema
* feat(model): add textGeneration capability to ModelSchema
* feat: integrate AoxisProxy for HTTP requests in rerankers and CopilotService
- Replaced direct axios calls with aoxisProxy in JinaReranker, SiliconFlowReranker, and VoyageReranker to utilize proxy settings.
- Introduced AoxisProxy service to manage axios instances with proxy configurations.
- Updated CopilotService to use aoxisProxy for API requests, ensuring consistent proxy handling across services.
* refactor(AxiosProxy): improve proxy handling and initialization logic
* fix tyop
* fix tyop
* Add support for custom HTTP headers in MCP servers
Allow users to configure custom HTTP headers for SSE and streamable HTTP
MCP server connections. This enables authentication and other API
requirements.
* Add custom headers i18n strings
* Add typed MCPCallToolResponse interface and format converters
The commit introduces a structured response type for MCP tool calls with
proper handling for different content types (text, image, audio). It adds
provider-specific converter functions to transform tool responses into
the appropriate message format for OpenAI, Anthropic, and Gemini.
* Support vision models in tool call responses
Add isVisionModel parameter to tool response formatters to conditionally
handle content based on model capabilities. Non-vision models now receive
JSON stringified content, while vision models get proper multimedia parts.
- Introduced a new script to rename files with spaces in the 'dist' directory.
- Updated 'latest.yml' to remove the first file entry and adjust paths accordingly.
- Enhanced build process for Windows to include the new script execution.
- Added js-yaml dependency for YAML file manipulation.
Add support for webpage summarization, direct URL references, and
better query processing using a structured XML format. Move web content
fetching to dedicated utility functions with improved error handling
and format options.
- Added 'icon' class to various icons in Sidebar for consistent styling.
- Removed unused loading state from Messages component.
- Cleaned up iconStyle variable in ModelSettings as it was no longer needed.
feat(Inputbar, Settings): add backspace delete model functionality and localization updates
- Implemented a new setting to enable backspace key functionality for deleting models/attachments in the Inputbar.
- Added corresponding localization strings for English, Japanese, Russian, Chinese (Simplified and Traditional) in the i18n files.
- Updated the QuickPanelBody styling to inherit border-radius.
- Migrated the new setting to the state management for persistence.
Co-authored-by: 亢奋猫 <kangfenmao@qq.com>
* fix(provider config): update dashscoop new links
* feat(EditModelsPopup): add grouping function for bailian
* fix(isWebSearchModel): Correctly handle the priority of manually setting model support for web search
- Reduced avatar size in ModelList for better alignment.
- Simplified rendering logic for model descriptions in EditModelsPopup to enhance readability.
- Updated MainContainer to use flex display for better layout.
- Increased margin in NpxSearch component for improved spacing.
- Adjusted ResultList to use two columns instead of three for better content presentation.
* refactor(AgentPage): Refactor AgentPage UI
* style(AgentCard): update HeaderInfoEmoji styling for improved layout and visual consistency
* fix(AgentCard): conditionally render HeaderInfoEmoji to prevent rendering of undefined
* feat(AgentsPage): add handleAddAgent function to streamline agent addition process
* style(AgentsPage): remove unnecessary whitespace in title rendering
- Added a new SVG icon for npm in the MCP settings.
- Introduced a custom hook `useMCPServer` for retrieving a specific MCP server by ID.
- Updated localization files to include new error messages for tool and prompt loading in English, Japanese, Russian, and Chinese.
- Refactored MCP settings components for improved navigation and state management, including the use of React Router for routing.
- Enhanced the Npx search functionality and UI for better user experience.
- Introduced a styled container to the NewContextButton component to hide it on smaller screens (max-width: 800px).
- Ensured the tooltip and button functionality remain intact while enhancing the component's layout.
- Removed unused QuestionCircleOutlined icon and Popconfirm from Inputbar, replacing it with a direct button click for clearing topics.
- Refactored message display logic in Messages component to enhance clarity and maintainability, while preserving existing functionality.
* feat(MCPSettings): implement server selection and navigation with back button
* chore(ui)
* chore(UI): npx search padding
* feat(NpxSearch): add server selection and navigation; update styles
---------
Co-authored-by: eeee0717 <chentao020717Work@outlook.com>
* feat(MessageTools): add error handling and status indicator for tool responses
* feat(i18n): add error message for tool invocation in English, Japanese, and Russian locales
* Add MCP prompt listing and retrieval functionality
* Add generic caching mechanism for MCP service methods
Refactor caching strategy by implementing a higher-order withCache function
to centralize cache logic and reduce code duplication. Separate implementation
details from caching concerns in listTools, listPrompts and getPrompt methods.
# Conflicts:
# src/main/services/MCPService.ts
* Add MCP prompts listing feature
- Add IPC handlers for listing and getting prompts
- Create UI component to display available prompts in settings tab
- Improve error handling in MCP service methods
* fix(McpService): add error handling for tool and prompt listing methods
* feat(MCPSettings): enhance prompts and tools sections with improved UI and reset functionality
* feat(i18n): add tabs and prompts sections to localization files
* feat(MCPToolsButton): add MCP prompt list functionality to Inputbar
* feat(McpSettings, NpxSearch): improve user feedback with success messages on server addition
* feat(MCPService, MCPToolsButton): enhance prompt handling with caching and improved selection logic
* feat(MCPToolsButton): enhance prompt handling with argument support and error management
---------
Co-authored-by: Teo <cheesen.xu@gmail.com>
* feat(models): add grok-3-mini support and update reasoning effort logic in SettingsTab and OpenAIProvider
* feat(settings): update reasoning effort logic for Grok models and enhance localization in multiple languages
* fix(models): correct spelling of reasoning in model support functions
* fix(settings): correct spelling of reasoning_effort in OpenAIProvider
- Introduced new models for the Qiniu provider in SYSTEM_MODELS.
- Updated migration logic to populate Qiniu provider models if they are empty during state initialization.
- Updated web search provider settings to include API key and free status indicators.
- Improved localization for English, Japanese, Russian, Chinese, and Taiwanese languages to reflect new API key and free status fields.
- Refactored web search provider management to prevent duplicates and streamline provider addition during state migration.
- Adjusted UI components to conditionally render based on provider type, enhancing user experience.
* feat(websearch): implement search window functionality and enhance search service
* feat(DefaultProvider): integrate @mozilla/readability for improved content parsing
* Add LocalSearchProvider for web page scraping
AI: Change `provider` from private to protected in BaseWebSearchProvider and implement LocalSearchProvider for web searching with browser-based content extraction.
* Add web search provider management features
Implement addWebSearchProvider function to prevent duplicates,
automatically load default providers on initialization, fix
LocalSearchProvider implementation, and update local provider
identification logic.
* Improve web search with specialized search engine parsers
Add dedicated parsers for Google, Bing, and Baidu search results,
replacing the generic URL extraction approach. Enhance page loading
with proper wait mechanisms and window cleanup. Remove DuckDuckGo
provider as it's no longer supported.
* Simplify DefaultProvider to unimplemented placeholder
* Remove default search engine from initial state
* Improve web search providers config and display
Add configuration for local search providers, remove empty apiKey fields,
and enhance the UI by sorting providers alphabetically and showing
whether they require an API key.
* Add stderr logging for MCP servers
* Make search window initially hidden
* feat(QuickPanel): enhance close action options and improve input handling
- Added 'enter_empty' as a new close action option for QuickPanel.
- Refactored input handling to include a delay before clearing search text after panel closure.
- Updated keyboard event handling to prevent default actions for specific keys.
- Improved styling for selected and focused states in QuickPanel components.
- Enhanced AttachmentPreview to utilize a separate FileNameRender component for better readability and functionality.
* feat(AttachmentPreview): enhance file icon rendering and styling
* feat(CustomTag): add closable functionality and improve styling
- Enhanced CustomTag component to support closable tags with an onClose callback.
- Updated styling for better visual integration and added hover effects for the close icon.
- Refactored usage of CustomTag in AttachmentPreview, KnowledgeBaseInput, and MentionModelsInput components for consistency.
* feat(SelectModelPopup, QuickPanel): update tag component and enhance search functionality
* feat(Inputbar, SettingsTab): add enable quick panel triggers setting and update translations
* feat(QuickPanel): integrate color library for dynamic styling and update package dependencies
* fix: 解决聊天页面图片复制失败的问题和点击编辑回复的时候,不显示图片url的问题
* fix: 解决chat模式,gemini-2.0-flash-exp-image-generation返回base64图片,无法复制的问题
* fix(MessageImage): Update the image copying feature to process base64 and URL formatted images based on their type
---------
Co-authored-by: magicdmer <magicdmer@163.com>
Co-authored-by: eeee0717 <chentao020717Work@outlook.com>
* feat: implement tool usage handling and system prompt building for AI providers
* refactor: streamline tool usage handling and remove unused code in OpenAIProvider and formats
* refactor: simplify tool usage handling in Anthropic and Gemini providers, and update prompt instructions
* refactor: remove unused function calling model checks and simplify MCP tools handling in Inputbar
* hidden tool use in message
* revert import
* Add idx parameter to parseAndCallTools for unique tool IDs
- Improved icon size handling in the ModelTagsWithLabel component for better visual consistency.
- Adjusted the layout of the tags to prevent wrapping and added horizontal scrolling for better usability.
- Updated the EditModelsPopup to increase its width for improved content display.
- Removed unnecessary CustomTag usage in ModelList for cleaner code.
* feat(websearch): add overwrite functionality for search service
- Introduced new settings to allow users to override the default search service.
- Updated localization files for English, Japanese, Russian, Simplified Chinese, and Traditional Chinese to include new overwrite options and tooltips.
- Modified relevant components and services to support the new overwrite feature in the web search settings.
* feat(websearch): enhance web search model integration
* chore(websearch): unnecessary return
- Added `bodered` property to the dangbei miniapp configuration.
- Refactored migration logic to utilize a new `addMiniApp` function for cleaner code.
- Incremented store version from 91 to 92 for migration compatibility.
- Added `activeKey` prop to `CustomCollapse` for better control over active panels.
- Updated styles in `CustomCollapse` for improved visual consistency.
- Refactored `KnowledgeContent` to include expand/collapse functionality for file and directory sections, enhancing user experience.
- Added translations for "collapse" in multiple languages.
- Minor style adjustments across various components for better UI consistency.
* chore(version): 1.1.19
* style(ProviderSettings): Refactor ProviderSettings UI
* style(CustomTag, ModelTagsWithLabel): enhance layout and styling for better UI consistency
* refactor(CustomTag, ModelTagsWithLabel, MentionModelsButton): update props handling and improve component usage
* feat(CustomTag, ModelTagsWithLabel): add tooltip support and improve label visibility based on container size
* fix(ModelTagsWithLabel): adjust maxWidth for non-Chinese languages to improve layout
* style(ModelList): add text overflow handling for list item names
* feat(ModelList): enhance group label with item count using CustomTag
* feat(FileItem): add style prop for customizable background color in FileItem component
* style(index.scss): update border color variables for improved UI consistency
* style(EditModelsPopup): update background color for model items to enhance visual distinction
* style(HealthCheckPopup): update button size for improved usability
* feat(CustomCollapse): add collapsible prop to customize collapse behavior
* chore: remove hover models color
---------
Co-authored-by: kangfenmao <kangfenmao@qq.com>
Co-authored-by: eeee0717 <chentao020717Work@outlook.com>
fix(NpxSearch): update search result mapping to use record name as key and handle optional search results
Co-authored-by: lizhixuan <zhixuan.li@banosuperapp.com>
- Implemented functionality to automatically register MCP servers when the '@cherry/mcp-auto-install' tool is called.
- Utilized nanoid for unique server ID generation and dispatched the new server to the Redux store.
- Updated error handling in FileSystemServer to throw errors instead of exiting the process.
- Enhanced MCPService to use a more flexible server name check and updated the path for MCP_REGISTRY_PATH.
- Refined Inputbar to conditionally set enabled MCPs only if they are not empty.
- Cleaned up MCPToolsButton and MCPSettings by removing unused imports and effects.
- Updated NpxSearch to include a new npm scope and improved search result handling.
- Enhanced builtin MCP server descriptions for better clarity.
BREAKING CHANGE: 🧨 SyntaxError: The requested module
'/@fs/Users/bary/code/tools/cherry-studio/node_modules/.vite/deps/lru-cache.js?v=9139ab94'
does not provide an export named 'LRUCache' (at
CodeCacheService.ts:2:10)
* bugfix: ensure memory path exists on initialization and remove unused everything mcp server
* refactor(factory): remove unused EverythingServer import and case
* fix(CodeCacheService): update import statement for LRUCache to default import
Error: src/renderer/src/services/CodeCacheService.ts(2,10): error TS2595: 'LRUCache' can only be imported by using a default import.
- Updated libsql patch reference in package.json.
- Added sindresorhus/is package to yarn.lock with version 7.0.1.
- Removed duplicate sindresorhus/is entry from yarn.lock.
- Refactored AttachmentButton to use useMemo for extensions calculation.
- Simplified citation extraction in Markdown by moving logic to a new utility function.
- Updated TopicsTab dependencies for better performance and reactivity.
* feat(UI, OpenAI): support OpenAI 4o web search add support for web search citations
- refactor: Introduced a new CitationsList component to display citations in MessageContent.
- feat: Enhanced message handling to support web search results and annotations from OpenAI.
- refactor: Removed the deprecated MessageSearchResults component for cleaner code structure.
- refactor: Added utility functions for link conversion and URL extraction from Markdown.
* chore: remove debug logging from ProxyManager
* revert(OpenAIProvider): streamline reasoning check for stream output handling
* chore(OpenAIProvider): correct placement of webSearch in response object
* fix(patches): update OpenAI package version and remove patch references
- Integrated dayjs for dynamic date formatting in prompts.ts.
* feat(Citation, Favicon): enhance OpenAI web search support and citation handling
- Improved FallbackFavicon component to cache failed favicon URLs.
- Support all web search citation preview
- Added support for Hunyuan search model in OpenAIProvider and ApiService.
* refactor(provider/AI): move additional search parameters to AI Provider
* refactor(settings): Add export menu setting & optimize data settings page
* feat: add dynamic export menu options from Redux state in MessageMenubar and TopicsTab
* feat(export): Add export to markdown with reasoning method
* feat(export): optimize reasoning style
* feat(export): Add export to markdown with reasoning to export menu
* feat(i18n): Update i18n for new export options
---------
Co-authored-by: 亢奋猫 <kangfenmao@qq.com>
* feat(QuickPanel): Add new feature QuickPanel, unify input box operation.
* refactor(Inputbar): Remove unused quickPanelSymbol reference and update navigation action in KnowledgeBaseButton
* fix(Inputbar): Prevent translation action when input text is empty and reorder MentionModelsInput component
* refactor(Inputbar): Add resizeTextArea prop to QuickPhrasesButton for better text area management
* feat(i18n): Add translation strings for input actions and quick phrases in multiple languages
* feat(Inputbar): Enhance AttachmentButton to support ref forwarding and quick panel opening
* feat(i18n, Inputbar): Add upload file translation strings and enhance file count display in multiple languages
* style(QuickPanel): Update background color for QuickPanelBody and add dark theme support
* fix(Inputbar): Update upload label for vision model support
* feat(QuickPanel): Add outside click handling and update close action type
* feat(QuickPanel): Improve scrolling behavior with key press handling and add PageUp/PageDown support
* feat(i18n): Add translation strings for menu description in multiple languages
* refactor(QuickPhrasesButton): simplify phrase mapping by removing index-based disabling
* fix(QuickPanel): correct regex pattern for search functionality
* refactor(QuickPanel): remove searchText state and related logic for cleaner context management
* refactor(QuickPanel): enhance search text handling and input management
* refactor(Inputbar): update file name handling in AttachmentPreview and Inputbar components
* feat(MCPSettings): add tool toggle functionality and update server configuration
* fix(McpSettings): improve server type handling and tool fetching logic
* feat(mcp): add registryUrl to initialState for improved package management
* feat(mcp): initialize registryUrl in MCP server state for future enhancements
* fix(inputbar):mcp server list
* refactor(Inputbar): remove unused MCP server variable and console log for cleaner code
* fix(Inputbar): 还原
* fix(Inputbar): Add activedMcpServers to Inputbar component props
Thank you for taking the time to fill out this bug report!
Before submitting this issue, please make sure that you have understood the [FAQ](https://docs.cherry-ai.com/question-contact/questions) and [Knowledge Science](https://docs.cherry-ai.com/question-contact/knowledge)
Thank you for taking the time to fill out this bug report!
Before submitting this issue, please make sure that you have understood the [FAQ](https://docs.cherry-ai.com/question-contact/questions) and [Knowledge Science](https://docs.cherry-ai.com/question-contact/knowledge)
- type:checkboxes
id:checklist
@@ -18,7 +18,9 @@ body:
options:
- label:I understand that issues are for feedback and problem solving, not for complaining in the comment section, and will provide as much information as possible to help solve the problem.
required:true
- label:I've looked at pinned issues and searched for existing [Open Issues](https://github.com/CherryHQ/cherry-studio/issues), [Closed Issues](https://github.com/CherryHQ/cherry-studio/issues?q=is%3Aissue%20state%3Aclosed), and [Discussions](https://github.com/CherryHQ/cherry-studio/discussions), no similar issue or discussion was found.
- label:My issue is not listed in the [FAQ](https://github.com/CherryHQ/cherry-studio/issues/3881).
required:true
- label:I've looked at **pinned issues** and searched for existing [Open Issues](https://github.com/CherryHQ/cherry-studio/issues), [Closed Issues](https://github.com/CherryHQ/cherry-studio/issues?q=is%3Aissue%20state%3Aclosed), and [Discussions](https://github.com/CherryHQ/cherry-studio/discussions), no similar issue or discussion was found.
required:true
- label:I've filled in short, clear headings so that developers can quickly identify a rough idea of what to expect when flipping through the list of issues. And not "a suggestion", "stuck", etc.
description:Submit questions that don't fit into bug reports or feature requests
title: '[Other]:'
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to ask a question!
Before submitting this issue, please make sure you've reviewed the [FAQ](https://docs.cherry-ai.com/question-contact/questions) and [Knowledge Base](https://docs.cherry-ai.com/question-contact/knowledge)
- type:checkboxes
id:checklist
attributes:
label:Pre-submission Checklist
description:|
Please ensure you've completed all the steps below before submitting your issue
options:
- label:I understand that Issues are for feedback and problem-solving, not for complaints, and I will provide as much information as possible to help resolve the issue.
required:true
- label:I have checked the pinned Issues and searched through existing [open Issues](https://github.com/CherryHQ/cherry-studio/issues) and [closed Issues](https://github.com/CherryHQ/cherry-studio/issues?q=is%3Aissue%20state%3Aclosed%20) and didn't find similar questions.
required:true
- label:I have written a short and clear title that helps developers quickly understand the nature of my question, rather than vague titles like "A question" or "Help needed".
required:true
- label:My question doesn't fall under bug reports or feature requests categories.
required:true
- type:dropdown
id:platform
attributes:
label:Platform
description:Which platform are you using?
options:
- Windows
- macOS
- Linux
validations:
required:true
- type:input
id:version
attributes:
label:Version
description:What version of Cherry Studio are you running?
placeholder:e.g., v1.0.0
validations:
required:true
- type:textarea
id:question
attributes:
label:Question Description
description:Please describe your question or inquiry in detail
placeholder:I would like to know more about...
validations:
required:true
- type:textarea
id:context
attributes:
label:Relevant Context
description:Please provide any background information or context related to your question
placeholder:I encountered this question while trying to implement...
validations:
required:true
- type:textarea
id:attempts
attributes:
label:Attempted Solutions
description:Please describe any methods you've already tried to resolve your question (if applicable)
- type:textarea
id:additional
attributes:
label:Additional Information
description:Any other information that could help us better understand your question, including screenshots or relevant links
<!-- Template from https://github.com/kubevirt/kubevirt/blob/main/.github/PULL_REQUEST_TEMPLATE.md?-->
<!-- Thanks for sending a pull request! Here are some tips for you:
1. Consider creating this PR as draft: https://github.com/CherryHQ/cherry-studio/blob/main/CONTRIBUTING.md
-->
### What this PR does
Before this PR:
After this PR:
<!-- (optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: -->
Fixes #
### Why we need it and why it was done in this way
The following tradeoffs were made:
The following alternatives were considered:
Links to places where the discussion took place: <!-- optional: slack, other GH issue, mailinglist, ... -->
### Breaking changes
<!-- optional -->
If this PR introduces breaking changes, please describe the changes and the impact on users.
### Special notes for your reviewer
<!-- optional -->
### Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.
- [ ] PR: The PR description is expressive enough and will help future contributors
- [ ] Code: [Write code that humans can understand](https://en.wikiquote.org/wiki/Martin_Fowler#code-for-humans) and [Keep it simple](https://en.wikipedia.org/wiki/KISS_principle)
- [ ] Refactor: You have [left the code cleaner than you found it (Boy Scout Rule)](https://learning.oreilly.com/library/view/97-things-every/9780596809515/ch08.html)
- [ ] Upgrade: Impact of this change on upgrade flows was considered and addressed if required
- [ ] Documentation: A [user-guide update](https://docs.cherry-ai.com) was considered and is present (link) or not required. You want a user-guide update if it's a user facing feature.
### Release note
<!-- Write your release note:
1. Enter your extended release note in the below block. If the PR requires additional action from users switching to the new release, include the string "action required".
2. If no release note is required, just write "NONE".
index 433e2efc9cef156ff5444f0c4520362ed2ef9ea7..a89c7a9b0b608fef67902c49106a43ebd0fa8b61 100644
--- a/scheme.json
+++ b/scheme.json
@@ -1975,6 +1975,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 +2334,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": [
{
@@ -2737,7 +2751,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 +2973,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": [
{
@@ -3369,7 +3390,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"
@@ -6507,6 +6528,13 @@
"string"
]
},
+ "minimumSystemVersion": {
+ "description": "The minimum os kernel version required to install the application.",
+ "type": [
+ "null",
+ "string"
+ ]
+ },
"protocols": {
"anyOf": [
{
@@ -7376,6 +7404,13 @@
],
"description": "MAS (Mac Application Store) development options (`mas-dev` target)."
},
+ "minimumSystemVersion": {
+ "description": "The minimum os kernel version required to install the application.",
欢迎来到 Cherry Studio 的贡献者社区!我们致力于将 Cherry Studio 打造成一个长期提供价值的项目,并希望邀请更多的开发者加入我们的行列。无论您是经验丰富的开发者还是刚刚起步的初学者,您的贡献都将帮助我们更好地服务用户,提升软件质量。
# Cherry Studio Contributor Guide
## 如何贡献
Welcome to the Cherry Studio contributor community! We are committed to making Cherry Studio a project that provides long-term value and hope to invite more developers to join us. Whether you are an experienced developer or a beginner just starting out, your contributions will help us better serve users and improve software quality.
1.**Contribute Code**: Help us develop new features or optimize existing code. Please ensure your code adheres to our coding standards and passes all tests.
To help you get familiar with the codebase, we recommend tackling issues tagged with one or more of the following labels: [good-first-issue](https://github.com/CherryHQ/cherry-studio/labels/good%20first%20issue), [help-wanted](https://github.com/CherryHQ/cherry-studio/labels/help%20wanted), or [kind/bug](https://github.com/CherryHQ/cherry-studio/labels/kind%2Fbug). Any help is welcome.
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).
## 联系我们
### Automated Testing for Pull Requests
如果您有任何问题或建议,欢迎通过以下方式联系我们:
Automated tests are triggered on pull requests (PRs) opened by members of the Cherry Studio organization, except for draft PRs. PRs opened by new contributors will initially be marked with the `needs-ok-to-test` label and will not be automatically tested. Once a Cherry Studio organization member adds `/ok-to-test` to the PR, the test pipeline will be created.
- 微信:kangfenmao
### Consider Opening Your Pull Request as a Draft
Not all pull requests are ready for review when created. This might be because the author wants to start a discussion, they are not entirely sure if the changes are heading in the right direction, or the changes are not yet complete. Please consider creating these PRs as [draft pull requests](https://github.blog/2019-02-14-introducing-draft-pull-requests/). Draft PRs are skipped by CI, thus saving CI resources. This also means reviewers will not be automatically assigned, and the community will understand that this PR is not yet ready for review.
Reviewers will be assigned after you mark the draft pull request as ready for review.
### Contributor Compliance with Project Terms
We require every contributor to certify that they have the right to legally contribute to our project. Contributors express this by consciously signing their commits, thereby indicating their compliance with the [LICENSE](LICENSE).
A signed commit is one where the commit message includes the following:
You can generate a signed commit using the following command [git commit --signoff](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff):
```
git commit --signoff -m "Your commit message"
```
### Getting Code Reviewed/Merged
Maintainers are here to help you implement your use case within a reasonable timeframe. They will do their best to review your code and provide constructive feedback promptly. However, if you get stuck during the review process or feel your Pull Request is not receiving the attention it deserves, please contact us via comments in the Issue or through the [Community](README.md#-community).
### Other Suggestions
- **Contact Developers**: Before submitting a PR, you can contact the developers first to discuss or get help.
- **Become a Core Developer**: If you contribute to the project consistently, congratulations, you can become a core developer and gain project membership status. Please check our [Membership Guide](https://github.com/CherryHQ/community/blob/main/docs/membership.en.md).
## Contact Us
If you have any questions or suggestions, feel free to contact us through the following ways:
* **核心义务:** AGPLv3 的一个关键要求是,如果您修改了 Cherry Studio 并通过网络提供服务,或者分发了修改后的版本,您必须以 AGPLv3 许可证向接收者提供相应的**完整源代码**。即使您符合“10人及以下”的标准,如果您希望避免此源代码公开义务,您也需要考虑获取商业许可证(见下文)。
* 使用前请务必仔细阅读并理解 AGPLv3 的所有条款。
This software is licensed under the Apache License 2.0. In addition to the terms stipulated by the Apache License 2.0, you must comply with the following supplementary terms when using Cherry Studio:
* **获取商业许可:** 请通过邮箱 **bd@cherry-ai.com** 联系 Cherry Studio 开发团队洽谈商业授权事宜。
You must contact us and obtain explicit written commercial authorization to continue using Cherry Studio materials under any of the following circumstances:
**3. 贡献 (Contributions)**
1. **Modifications and Derivatives:** You modify Cherry Studio materials or perform derivative development based on them (including but not limited to changing the application’s name, logo, code, functionality, user interface, data, etc.).
2. **Enterprise Services:** You use Cherry Studio internally within your enterprise, or you provide Cherry Studio-based services for enterprise customers, and such services support cumulative usage by 10 or more users.
3. **Hardware Bundling and Sales:** You pre-install or integrate Cherry Studio into hardware devices or products for bundled sale.
4. **Large-scale Procurement by Government or Educational Institutions:** Your usage scenario involves large-scale procurement projects by government or educational institutions, especially in cases involving sensitive requirements such as security and data privacy.
5. **Public Cloud Services:** You provide public cloud-based product services utilizing Cherry Studio.
* 我们欢迎社区对 Cherry Studio 的贡献。所有向本项目提交的贡献都将被视为在 **AGPLv3** 许可证下提供。
1. **License Adjustments:** The producer reserves the right to adjust the open-source license as necessary, making it more strict or permissive.
2. **Commercial Usage:** Your contributed code may be used commercially, including but not limited to cloud business operations.
---
**III. Other Terms**
**Licensing**
1. Cherry Studio developers reserve the right of final interpretation of these agreement terms.
2. This agreement may be updated according to practical circumstances, and users will be notified of updates through this software.
This project employs a **User-Segmented Dual Licensing** model.
If you have any questions or need to apply for commercial authorization, please contact the Cherry Studio development team.
**Core Principle:**
Other than these specific conditions, all remaining rights and restrictions follow the Apache License 2.0. For more detailed information regarding Apache License 2.0, please visit http://www.apache.org/licenses/LICENSE-2.0.
* **Individual Users and Organizations with 10 or Fewer Individuals:** Governed by default under the **GNU Affero General Public License v3.0 (AGPLv3)**.
* **Organizations with More Than 10 Individuals:** **Must** obtain a **Commercial License**.
Definition: "10 or Fewer Individuals"
Refers to any organization (including companies, non-profits, government agencies, educational institutions, etc.) where the total number of individuals who can access, use, or in any way directly or indirectly benefit from the functionality of this software (Cherry Studio) does not exceed 10. This includes, but is not limited to, developers, testers, operations staff, end-users, and indirect users via integrated systems.
---
**1. Open Source License: AGPLv3 - For Individuals and Organizations of 10 or Fewer**
* If you are an individual user, or if your organization meets the "10 or Fewer Individuals" definition above, you are free to use, modify, and distribute Cherry Studio under the terms of the **AGPLv3**. The full text of the AGPLv3 can be found in the LICENSE file at [https://www.gnu.org/licenses/agpl-3.0.html](https://www.gnu.org/licenses/agpl-3.0.html).
* **Core Obligation:** A key requirement of the AGPLv3 is that if you modify Cherry Studio and make it available over a network, or distribute the modified version, you must provide the **complete corresponding source code** under the AGPLv3 license to the recipients. Even if you qualify under the "10 or Fewer Individuals" rule, if you wish to avoid this source code disclosure obligation, you will need to obtain a Commercial License (see below).
* Please read and understand the full terms of the AGPLv3 carefully before use.
**2. Commercial License - For Organizations with More Than 10 Individuals, or Users Needing to Avoid AGPLv3 Obligations**
* **Mandatory Requirement:** If your organization does **not** meet the "10 or Fewer Individuals" definition above (i.e., 11 or more individuals can access, use, or benefit from the software), you **must** contact us to obtain and execute a Commercial License to use Cherry Studio.
* **Voluntary Option:** Even if your organization meets the "10 or Fewer Individuals" condition, if your intended use case **cannot comply with the terms of the AGPLv3** (particularly the obligations regarding **source code disclosure**), or if you require specific commercial terms **not offered** by the AGPLv3 (such as warranties, indemnities, or freedom from copyleft restrictions), you also **must** contact us to obtain and execute a Commercial License.
* **Common scenarios requiring a Commercial License include (but are not limited to):**
* Your organization has more than 10 individuals who can access, use, or benefit from the software.
* (Regardless of organization size) You wish to distribute a modified version of Cherry Studio but **do not want** to disclose the source code of your modifications under AGPLv3.
* (Regardless of organization size) You wish to provide a network service (SaaS) based on a modified version of Cherry Studio but **do not want** to provide the modified source code to users of the service under AGPLv3.
* (Regardless of organization size) Your corporate policies, client contracts, or project requirements prohibit the use of AGPLv3-licensed software or mandate closed-source distribution and confidentiality.
* The Commercial License grants you rights exempting you from AGPLv3 obligations (like source code disclosure) and may include additional commercial assurances.
* **Obtaining a Commercial License:** Please contact the Cherry Studio development team via email at **bd@cherry-ai.com** to discuss commercial licensing options.
**3. Contributions**
* We welcome community contributions to Cherry Studio. All contributions submitted to this project are considered to be offered under the **AGPLv3** license.
* By submitting a contribution to this project (e.g., via a Pull Request), you agree to license your code under the AGPLv3 to the project and all its downstream users (regardless of whether those users ultimately operate under AGPLv3 or a Commercial License).
* You also understand and agree that your contribution may be included in distributions of Cherry Studio offered under our commercial license.
**4. Other Terms**
* The specific terms and conditions of the Commercial License are governed by the formal commercial license agreement signed by both parties.
* The project maintainers reserve the right to update this licensing policy (including the definition and threshold for user count) as needed. Updates will be communicated through official project channels (e.g., code repository, official website).
- Claude dynamic-style: <https://github.com/bjl101501/CherryStudio-Claudestyle-dynamic>
- Maple Neon Theme: <https://github.com/BoningtonChen/CherryStudio_themes>
Welcome PR for more themes
@@ -94,6 +118,10 @@ Welcome PR for more themes
Refer to the [development documentation](docs/dev.md)
Refer to the [Architecture overview documentation](https://deepwiki.com/CherryHQ/cherry-studio)
Refer to the [Branching Strategy](docs/branching-strategy-en.md) for contribution guidelines
# 🤝 Contributing
We welcome contributions to Cherry Studio! Here are some ways you can contribute:
@@ -117,7 +145,7 @@ For more detailed guidelines, please refer to our [Contributing Guide](./CONTRIB
Thank you for your support and contributions!
## Related Projects
# 🔗 Related Projects
- [one-api](https://github.com/songquanpeng/one-api):LLM API management and distribution system, supporting mainstream models like OpenAI, Azure, and Anthropic. Features unified API interface, suitable for key management and secondary distribution.
@@ -126,7 +154,7 @@ Thank you for your support and contributions!
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.