mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-21 16:01:35 +08:00
06dab978f7
113 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
c3f61533f7 |
feat(migration): enhance migration flow with new stages and error handling
This commit introduces additional stages to the migration process, including 'backup_required', 'backup_progress', and 'backup_confirmed', improving user guidance during data migration. It also adds new IPC channels for proceeding to backup and retrying migration, along with enhanced error handling and logging throughout the migration flow. The user interface has been updated to reflect these changes, providing clearer feedback and options during the migration process. |
||
|
|
8715eb1f41 |
feat(migration): add new IPC channels and enhance migration flow
This commit introduces new IPC channels for starting the migration flow, restarting the application, and closing the migration window. It also updates the migration logic to improve user interaction and error handling during the migration process. Additionally, the migration interface has been enhanced with a step indicator and localized messages for better user experience. |
||
|
|
973f26f9dd |
feat(migration): implement data migration service and update database architecture
This commit introduces a new data migration service with various IPC channels for migration tasks, including checking if migration is needed, starting the migration, and tracking progress. Additionally, the database architecture section has been added to the documentation, detailing the use of SQLite with Drizzle ORM, migration standards, and JSON field handling. Legacy migration files for ElectronStore and Redux have been removed as they are now deprecated. |
||
|
|
4e3f8a8f76 |
feat(preferences): auto-generate preferences configuration from classification.json
This commit introduces an auto-generated preferences configuration file, replacing the previous manual definitions. The new structure is based on the latest classification.json and includes comprehensive settings for various application features. The auto-generation process ensures that the preferences are up-to-date and consistent with the defined classifications. |
||
|
|
21e40db086 | mv dir to data | ||
|
|
7cd937888e | Merge branch 'main' of https://github.com/CherryHQ/cherry-studio into wip/refactor/databases | ||
|
|
efda20c143
|
feat: support bypass proxy (#8791)
* feat(ProxyManager): implement SelectiveDispatcher for localhost handling - Added SelectiveDispatcher to manage proxy and direct connections based on the hostname. - Introduced isLocalhost function to check for localhost addresses. - Updated ProxyManager to bypass proxy for localhost in dispatch methods and set proxy bypass rules. - Enhanced global dispatcher setup to utilize SelectiveDispatcher for both EnvHttpProxyAgent and SOCKS dispatcher. * refactor(ProxyManager): update axios configuration to use fetch adapter - Changed axios to use the 'fetch' adapter for proxy requests. - Removed previous proxy settings for axios, streamlining the configuration. - Updated HTTP methods to bind with the new proxy agent. * feat(Proxy): add support for proxy bypass rules - Updated IPC handler to accept optional bypass rules for proxy configuration. - Enhanced ProxyManager to store and utilize bypass rules for localhost and other specified addresses. - Modified settings and UI components to allow users to input and manage bypass rules. - Added translations for bypass rules in multiple languages. * feat(ProxyManager): add HTTP_PROXY environment variable support - Added support for the HTTP_PROXY environment variable in ProxyManager to enhance proxy configuration capabilities. * lint * refactor(ProxyManager): optimize bypass rules handling - Updated bypass rules initialization to split the rules string into an array for improved performance. - Simplified the isByPass function to directly check against the array of bypass rules. - Enhanced configuration handling to ensure bypass rules are correctly parsed from the provided settings. * refactor(ProxyManager): streamline bypass rules initialization - Consolidated the initialization of bypass rules by directly splitting the default rules string into an array. - Updated configuration handling to ensure bypass rules are correctly assigned without redundant splitting. * style(GeneralSettings): adjust proxy bypass rules input width to improve UI layout * refactor(ProxyManager): enhance proxy configuration logging and handling - Added proxy bypass rules to the configuration method for improved flexibility. - Updated logging to include bypass rules for better debugging. - Refactored the setGlobalProxy method to accept configuration parameters directly, streamlining proxy setup. - Adjusted the useAppInit hook to handle proxy settings more cleanly. * refactor(ProxyManager): implement close and destroy methods for proxy dispatcher - Added close and destroy methods to the SelectiveDispatcher class for better resource management. - Updated ProxyManager to handle the lifecycle of the proxyDispatcher, ensuring proper closure and destruction. - Enhanced error handling during dispatcher closure and destruction to prevent resource leaks. * refactor(ProxyManager): manage proxy agent lifecycle - Introduced proxyAgent property to ProxyManager for better management of the proxy agent. - Implemented error handling during the destruction of the proxy agent to prevent potential issues. - Updated the proxy setup process to ensure the proxy agent is correctly initialized and cleaned up. * refactor(ProxyManager): centralize default bypass rules management - Moved default bypass rules to a shared constant for consistency across components. - Updated ProxyManager and GeneralSettings to utilize the centralized bypass rules. - Adjusted migration logic to set default bypass rules from the shared constant, ensuring uniformity in configuration. |
||
|
|
ec491f5f24 | 更新 Preferences 接口以使用排序的对象键,并调整默认偏好设置的结构。同时,在 preference.ts 文件中添加了关于 scope 字段的注释,说明其未来用途。此更改旨在提高代码的可读性和一致性。 | ||
|
|
488a01d7d7
|
fix: flush redux persist data when app quit and update (#8741)
* feat(database): enable strict transaction durability for CherryStudio database - Updated the Dexie database initialization to include `chromeTransactionDurability: 'strict'`, enhancing data integrity during transactions. * feat(app): enhance application shutdown process and data flushing - Added functionality to flush storage data and cookies before quitting the application, ensuring data integrity. - Introduced a new `handleBeforeQuit` function to centralize cleanup logic for both manual and update-triggered quits. - Updated logging to provide better insights during the shutdown process. - Modified ProxyManager to use debug level for unchanged proxy configurations. - Added `persistor` to the global window object and implemented `handleSaveData` to flush Redux state before quitting. * format code * feat(ipc): add App_SaveData channel and implement data saving on window close - Introduced a new IPC channel `App_SaveData` for saving application data. - Updated `WindowService` to send a save data message when the main window is closed. - Enhanced `useAppInit` hook to handle the `App_SaveData` event and trigger data saving logic. * refactor(env): remove persistor from global window object - Removed the `persistor` property from the global `window` object in both `env.d.ts` and `index.ts` files, streamlining the application state management. |
||
|
|
c76aa03566 | refactor: remove api server | ||
|
|
d0b2f18d9a
|
feat: Support Cherry Studio as a Service (CSaaS) (#8098) | ||
|
|
18521c93b4
|
fix(LocalBackup): streamline local backup relative directory handling (#8595)
* fix(LocalBackup): streamline local backup directory handling - Added a new state to manage the resolved local backup directory in LocalBackupSettings. - Updated the LocalBackupManager component to use the resolved directory instead of the raw input. - Enhanced the backupToLocal and restoreFromLocal functions to resolve the local backup directory path before use, improving reliability. * refactor(Backup): remove setLocalBackupDir functionality - Removed the setLocalBackupDir method and its associated IPC channel handling from the BackupManager and IpcChannel. - Updated LocalBackupSettings to eliminate direct calls to setLocalBackupDir, instead resolving the local backup directory path directly. - Cleaned up related code in the BackupService to streamline local backup operations. * format code |
||
|
|
c4182a950f
|
fix: add isPathInside functionality to check path relationships (#8590)
* feat(ipc): add isPathInside functionality to check path relationships - Introduced a new IPC channel for checking if a path is inside another path, enhancing path validation capabilities. - Implemented the isPathInside function in the file utility, which accurately determines parent-child path relationships, handling edge cases. - Updated relevant components to utilize the new isPathInside function for validating app data and backup paths, ensuring better user experience and error handling. - Added comprehensive tests for isPathInside to cover various scenarios, including edge cases and error handling. * format code |
||
|
|
c3c9f9b3f2 | Merge branch 'main' of https://github.com/CherryHQ/cherry-studio into wip/refactor/databases | ||
|
|
26bd9203e1
|
feat: long run mcp (#8499)
* feat(MCPService, MCPSettings, MessageTools): enhance long-running server support and UI integration - Added support for long-running server configurations in MCPService, allowing for timeout adjustments based on server settings. - Introduced a new `longRunning` property in MCPSettings to manage server behavior and UI elements accordingly. - Integrated a ProgressBar component in MessageTools to visually represent progress for long-running operations, improving user experience. * refactor(IpcChannel, MCPService, MessageTools): remove progress IPC channel and integrate progress handling - Removed the `Mcp_SetProgress` channel from `IpcChannel` and its associated handlers in `ipc.ts` and `preload/index.ts`. - Integrated progress handling directly in `McpService` to send progress updates to the main window. - Updated `MessageTools` to display progress using Ant Design's `Progress` component, enhancing the user interface for long-running operations. - Deleted the `ProgressBar` component as its functionality has been replaced by the new progress handling approach. * feat(MCPService): add maxTotalTimeout configuration for long-running operations - Introduced a new `maxTotalTimeout` property in MCPService to define a maximum timeout duration for long-running server operations, enhancing control over server behavior based on the `longRunning` setting. * refactor(MCPService): remove unused notification handler for cancelled operations * Removed the CancelledNotificationHandler from MCPService to streamline notification handling and improve code clarity. * Updated MessageTools component to simplify rendering logic for status indicators, enhancing readability and maintainability. |
||
|
|
03b996d626
|
feat: support Relative Path Input for Backup Directory (#8471)
* chore(env): add .env.example file and update .gitignore - Introduced a new .env.example file with NODE_OPTIONS configuration. - Updated .gitignore to exclude .env.example from being ignored. - Added instructions in dev.md for copying .env.example to .env. * fix(MessageTools): improve error handling and logging in message preview rendering (#8453) - Enhanced the rendering logic for message previews by adding a try-catch block to handle JSON parsing errors more gracefully. - Updated the error handling to provide clearer error messages in the preview when exceptions occur. - Added debug logging to track the rendering process of message content. * refactor(Theme): update theme management to use setTheme function - Replaced toggleTheme with setTheme for more explicit theme handling. - Removed unused SunMoon icon from TabContainer and Sidebar components. - Updated theme icon rendering logic to directly reflect the current theme state. - Adjusted ThemeProvider to include setTheme in context for better theme management. * refactor(ModelList): streamline button layout and improve accessibility - Removed tooltip wrappers from manage and add model buttons for a cleaner UI. - Introduced a new Flex container for primary and default buttons, enhancing layout consistency. - Updated button rendering to improve accessibility and user experience. * feat(ModelList): add bulk add/remove functionality for models with confirmation dialog - Implemented onAddAll and onRemoveAll functions to handle bulk actions for models. - Added confirmation dialog for adding all models to the list, enhancing user experience. - Updated translations for confirmation messages in multiple languages. * chore(languages): update languages with a script (#8445) * chore(languages): update languages with a script * refactor: update languages and merge it into constants * refactor: add usf and ush * refactor(ipc): enhance write permission check and add untildify utility - Updated the hasWritePermission function to resolve paths using the new untildify utility, improving path handling. - Modified IPC handler to await the permission check for better asynchronous handling. - Introduced a new untildify function to convert paths starting with '~' to the user's home directory. * fix(ModelEdit): enhance model type management and introduce new selection logic (#8420) * fix(ModelEdit): enhance model type management and introduce new selection logic - Added support for 'rerank' model type in the ModelEditContent component. - Refactored type selection logic to utilize new utility functions for finding differences and unions in model types. - Updated model type handling to include user selection status, improving user experience in type management. - Adjusted migration logic to initialize newType for existing models, ensuring backward compatibility. - Introduced isUserSelectedModelType utility to streamline model type checks across the application. * refactor(isFunctionCallingModel): simplify model type check logic - Replaced the inline check for 'function_calling' model type with a call to the new utility function isUserSelectedModelType, enhancing code clarity and maintainability. * feat(collection): add utility functions for array operations - Introduced `findIntersection`, `findDifference`, and `findUnion` functions to handle array operations with support for custom key selectors and comparison functions. - Removed previous implementations from `index.ts` to streamline utility exports. - Added comprehensive tests for new functions covering basic types and object types with various edge cases. * refactor(collection): rename utility functions for clarity - Renamed `findIntersection`, `findDifference`, and `findUnion` to `getIntersection`, `getDifference`, and `getUnion` respectively for improved clarity and consistency in naming. - Updated corresponding tests to reflect the new function names, ensuring all tests pass with the updated utility functions. * refactor(ModelEditContent): update model type management and improve selection logic - Replaced utility function calls to `findDifference` and `findUnion` with `getDifference` and `getUnion` for consistency. - Introduced temporary state management for model types to enhance user selection handling. - Added a reset functionality for model type selections, improving user experience. - Updated the rendering logic to conditionally disable certain model types based on user selections. * fix(ModelEditContent): enhance model type selection logic with conditional disabling - Introduced logic to conditionally disable 'rerank' and 'embedding' model types based on user selections. - Updated the state management for model types to ensure correct user selection handling. - Improved the confirmation modal to reflect the updated selection logic for better user experience. * fix(ModelEditContent): refine model type selection and update confirmation logic - Enhanced the logic for model type selection to ensure accurate user selections for 'rerank' and 'embedding'. - Updated the confirmation modal to reflect changes in selection handling, improving user experience. - Adjusted state management to correctly handle updates based on selected model types. * fix(models): update model support logic to include 'qwen3-235b-a22b-instruct' * refactor(models): rename 'newType' to 'capabilities' and update related logic in ModelEditContent and migration scripts * feat(ipc): add App_ResolvePath channel and update path handling - Introduced a new IPC channel `App_ResolvePath` to resolve file paths, enhancing path management. - Updated the `hasWritePermission` function to log the original directory instead of the resolved one. - Modified the `LocalBackupSettings` component to utilize the new `resolvePath` method for improved directory validation. * add ut * fix comments * fix clear manually * delete duplicate var --------- Co-authored-by: kangfenmao <kangfenmao@qq.com> Co-authored-by: SuYao <sy20010504@gmail.com> Co-authored-by: one <wangan.cs@gmail.com> |
||
|
|
eef20e399c
|
chore: Update channel improve (#8501)
* chore(env): add .env.example file and update .gitignore - Introduced a new .env.example file with NODE_OPTIONS configuration. - Updated .gitignore to exclude .env.example from being ignored. - Added instructions in dev.md for copying .env.example to .env. * fix(MessageTools): improve error handling and logging in message preview rendering (#8453) - Enhanced the rendering logic for message previews by adding a try-catch block to handle JSON parsing errors more gracefully. - Updated the error handling to provide clearer error messages in the preview when exceptions occur. - Added debug logging to track the rendering process of message content. * refactor(Theme): update theme management to use setTheme function - Replaced toggleTheme with setTheme for more explicit theme handling. - Removed unused SunMoon icon from TabContainer and Sidebar components. - Updated theme icon rendering logic to directly reflect the current theme state. - Adjusted ThemeProvider to include setTheme in context for better theme management. * refactor(ModelList): streamline button layout and improve accessibility - Removed tooltip wrappers from manage and add model buttons for a cleaner UI. - Introduced a new Flex container for primary and default buttons, enhancing layout consistency. - Updated button rendering to improve accessibility and user experience. * feat(ModelList): add bulk add/remove functionality for models with confirmation dialog - Implemented onAddAll and onRemoveAll functions to handle bulk actions for models. - Added confirmation dialog for adding all models to the list, enhancing user experience. - Updated translations for confirmation messages in multiple languages. * chore(languages): update languages with a script (#8445) * chore(languages): update languages with a script * refactor: update languages and merge it into constants * refactor: add usf and ush * fix(ModelEdit): enhance model type management and introduce new selection logic (#8420) * fix(ModelEdit): enhance model type management and introduce new selection logic - Added support for 'rerank' model type in the ModelEditContent component. - Refactored type selection logic to utilize new utility functions for finding differences and unions in model types. - Updated model type handling to include user selection status, improving user experience in type management. - Adjusted migration logic to initialize newType for existing models, ensuring backward compatibility. - Introduced isUserSelectedModelType utility to streamline model type checks across the application. * refactor(isFunctionCallingModel): simplify model type check logic - Replaced the inline check for 'function_calling' model type with a call to the new utility function isUserSelectedModelType, enhancing code clarity and maintainability. * feat(collection): add utility functions for array operations - Introduced `findIntersection`, `findDifference`, and `findUnion` functions to handle array operations with support for custom key selectors and comparison functions. - Removed previous implementations from `index.ts` to streamline utility exports. - Added comprehensive tests for new functions covering basic types and object types with various edge cases. * refactor(collection): rename utility functions for clarity - Renamed `findIntersection`, `findDifference`, and `findUnion` to `getIntersection`, `getDifference`, and `getUnion` respectively for improved clarity and consistency in naming. - Updated corresponding tests to reflect the new function names, ensuring all tests pass with the updated utility functions. * refactor(ModelEditContent): update model type management and improve selection logic - Replaced utility function calls to `findDifference` and `findUnion` with `getDifference` and `getUnion` for consistency. - Introduced temporary state management for model types to enhance user selection handling. - Added a reset functionality for model type selections, improving user experience. - Updated the rendering logic to conditionally disable certain model types based on user selections. * fix(ModelEditContent): enhance model type selection logic with conditional disabling - Introduced logic to conditionally disable 'rerank' and 'embedding' model types based on user selections. - Updated the state management for model types to ensure correct user selection handling. - Improved the confirmation modal to reflect the updated selection logic for better user experience. * fix(ModelEditContent): refine model type selection and update confirmation logic - Enhanced the logic for model type selection to ensure accurate user selections for 'rerank' and 'embedding'. - Updated the confirmation modal to reflect changes in selection handling, improving user experience. - Adjusted state management to correctly handle updates based on selected model types. * fix(models): update model support logic to include 'qwen3-235b-a22b-instruct' * refactor(models): rename 'newType' to 'capabilities' and update related logic in ModelEditContent and migration scripts * refactor(ModelEditContent): remove maskClosable prop for improved modal behavior * fix(ThinkingTagExtraction): add new tag configuration for 'kimi-vl-a3b-thinking' model (#8459) * feat(ThinkingTagExtraction): add new tag configuration for 'kimi-vl-a3b-thinking' model and update model regex patterns in config - Introduced a new tag configuration for the 'kimi-vl-a3b-thinking' model in ThinkingTagExtractionMiddleware. - Updated models.ts to include regex patterns for 'kimi-vl-a3b-thinking', 'llama-guard-4', and 'llama-4' to enhance model compatibility. * feat(models): add regex pattern for 'gemma3' model to enhance model compatibility * fix(RawStreamListenerMiddleware): update model check (#8433) * fix(RawStreamListenerMiddleware): update model check for Anthropic API integration - Replaced provider type check with model ID check to enhance compatibility with Claude models. - Improved clarity in the middleware logic for handling raw output from the SDK. * refactor(RawStreamListenerMiddleware): enhance model identification for Anthropic integration - Introduced a new utility function `isAnthropicModel` to streamline model checks across the codebase. - Updated middleware logic to utilize the new function for improved clarity and maintainability. - Adjusted related tests to ensure compatibility with the updated model identification approach. * test(ApiService.test): add mock for isAnthropicModel to enhance test coverage for model identification * refactor(ChatNavbar, Navbar): simplify toggle functions and remove unused fullscreen hook - Removed unnecessary useCallback functions for toggling assistants and topics, directly using the toggle functions instead. - Eliminated the unused fullscreen hook import to clean up the code. - Updated click handlers in the Navbar components for better readability and efficiency. * chore(version): 1.5.3 * style(MinAppsPage): adjust padding for AppsContainerWrapper based on navbar position - Increased padding for the AppsContainerWrapper to 50px for better spacing. - Added conditional padding for when the navbar is positioned at the top, reverting to 20px for improved layout consistency. * fix(AiProvider): remove unnecessary middleware removal logic for… (#8437) * refactor(AiProvider): remove unnecessary middleware removal logic for improved clarity * feat(PPIOAPIClient): add compatibility type check for OpenAIAPIClient * refactor(ModelEditContent): rename state variable for clarity and update model capabilities handling - Renamed `tempModelTypes` to `modelCapabilities` for improved clarity in the ModelEditContent component. - Updated state management and logic to consistently use the new `modelCapabilities` variable throughout the component, enhancing readability and maintainability. * Feat/vertex-claude-support (#7564) * feat(migrate): add default settings for assistants during migration - Introduced a new migration step to assign default settings for assistants that lack configuration. - Default settings include temperature, context count, and other parameters to ensure consistent behavior across the application. * chore(store): increment version number to 115 for persisted reducer * feat(vertex-sdk): integrate Anthropic Vertex SDK and add access token retrieval - Added support for the new `@anthropic-ai/vertex-sdk` in the project. - Introduced a new IPC channel `VertexAI_GetAccessToken` to retrieve access tokens. - Implemented `getAccessToken` method in `VertexAIService` to handle service account authentication. - Updated the `IpcChannel` enum and related IPC handlers to support the new functionality. - Enhanced the `VertexAPIClient` to utilize the `AnthropicVertexClient` for model handling. - Refactored existing code to accommodate the integration of the Vertex SDK and improve modularity. * feat(vertex-ai): enhance VertexAI settings and API host management - Added a new method to format the API host URL in both AnthropicVertexClient and VertexAPIClient. - Updated getBaseURL methods to utilize the new formatting logic. - Enhanced VertexAISettings component to include an input for API host configuration, with help text for user guidance. - Updated localization files to include new help text for the API host field in multiple languages. * fix(vertex-sdk): update baseURL handling and patch dependencies - Refactored baseURL assignment in AnthropicVertexClient to ensure it defaults to undefined when the URL is empty. - Updated yarn.lock to reflect changes in dependency resolution and checksum for @anthropic-ai/vertex-sdk patch. * refactor(VertexAISetting): use provider.id rather than provider * refactor: improve API host formatting in AnthropicVertexClient - Updated the `formatApiHost` method to streamline host URL handling. - Introduced a helper function to determine if the original host should be used based on its format. - Ensured consistent appending of the `/v1/` path for valid API requests. * fix: handle empty host in AnthropicVertexClient - Added a check in the `getBaseURL` method to return the host if it is empty, preventing potential errors. - Included a console log for the base URL to aid in debugging and verification of the URL formatting. * feat(AnthropicVertexClient): add logging for authentication errors and mock client in tests - Introduced logging functionality in AnthropicVertexClient to replace console.error with logger service for better error tracking. - Added mock implementation for AnthropicVertexClient in tests to enhance testing capabilities. - Updated package.json to include the @aws-sdk/client-s3 dependency. * feat(tests): add comprehensive tests for client compatibility types - Introduced a new test file to validate compatibility types for various API clients including OpenAI, Anthropic, Gemini, Aihubmix, NewAPI, and Vertex. - Implemented mock services to facilitate testing and ensure isolation of client behavior. - Added tests for both direct API clients and decorator pattern clients, ensuring correct compatibility type returns. - Enhanced middleware compatibility logic tests to verify correct identification of compatible clients. --------- Co-authored-by: one <wangan.cs@gmail.com> * fix(mcp-tools): enhance tool lookup logic to support partial matches (#8473) * fix(mcp-tools): enhance tool lookup logic to support partial matches - Updated the tool lookup logic in `geminiFunctionCallToMcpTool` to include partial matches for both tool IDs and names, improving the flexibility of tool identification. * refactor(mcp-tools): simplify tool lookup logic for improved clarity - Refactored the tool lookup logic in `geminiFunctionCallToMcpTool` to streamline the identification process by consolidating checks for tool IDs and names into a single variable. This enhances readability and maintains functionality for partial matches. * chore(deps): update vite to rolldown-vite (#8460) * chore(deps): update vite to rolldown-vite and add new dependencies - Updated vite dependency to rolldown-vite@latest in package.json. - Added new dependencies including @emnapi/core, @emnapi/runtime, and @napi-rs/wasm-runtime in yarn.lock. - Introduced patches for atomically and file-stream-rotator packages. - Added process import in index.ts for improved functionality. * updrade vitest * not package graceful-fs * update yarn.lock * fix(AppUpdater): improve update handling and logging for test plans - Enhanced the update logic in AppUpdater to prevent sending an 'update not available' event when a test plan is enabled and the channel is not the latest. - Refactored the feed URL and channel setting into a private method for better code organization. - Added logging to provide clearer insights into the update check results and channel settings, particularly when the test plan is active. --------- Co-authored-by: kangfenmao <kangfenmao@qq.com> Co-authored-by: SuYao <sy20010504@gmail.com> Co-authored-by: one <wangan.cs@gmail.com> |
||
|
|
4c0167cc03
|
Feat/vertex-claude-support (#7564)
* feat(migrate): add default settings for assistants during migration - Introduced a new migration step to assign default settings for assistants that lack configuration. - Default settings include temperature, context count, and other parameters to ensure consistent behavior across the application. * chore(store): increment version number to 115 for persisted reducer * feat(vertex-sdk): integrate Anthropic Vertex SDK and add access token retrieval - Added support for the new `@anthropic-ai/vertex-sdk` in the project. - Introduced a new IPC channel `VertexAI_GetAccessToken` to retrieve access tokens. - Implemented `getAccessToken` method in `VertexAIService` to handle service account authentication. - Updated the `IpcChannel` enum and related IPC handlers to support the new functionality. - Enhanced the `VertexAPIClient` to utilize the `AnthropicVertexClient` for model handling. - Refactored existing code to accommodate the integration of the Vertex SDK and improve modularity. * feat(vertex-ai): enhance VertexAI settings and API host management - Added a new method to format the API host URL in both AnthropicVertexClient and VertexAPIClient. - Updated getBaseURL methods to utilize the new formatting logic. - Enhanced VertexAISettings component to include an input for API host configuration, with help text for user guidance. - Updated localization files to include new help text for the API host field in multiple languages. * fix(vertex-sdk): update baseURL handling and patch dependencies - Refactored baseURL assignment in AnthropicVertexClient to ensure it defaults to undefined when the URL is empty. - Updated yarn.lock to reflect changes in dependency resolution and checksum for @anthropic-ai/vertex-sdk patch. * refactor(VertexAISetting): use provider.id rather than provider * refactor: improve API host formatting in AnthropicVertexClient - Updated the `formatApiHost` method to streamline host URL handling. - Introduced a helper function to determine if the original host should be used based on its format. - Ensured consistent appending of the `/v1/` path for valid API requests. * fix: handle empty host in AnthropicVertexClient - Added a check in the `getBaseURL` method to return the host if it is empty, preventing potential errors. - Included a console log for the base URL to aid in debugging and verification of the URL formatting. * feat(AnthropicVertexClient): add logging for authentication errors and mock client in tests - Introduced logging functionality in AnthropicVertexClient to replace console.error with logger service for better error tracking. - Added mock implementation for AnthropicVertexClient in tests to enhance testing capabilities. - Updated package.json to include the @aws-sdk/client-s3 dependency. * feat(tests): add comprehensive tests for client compatibility types - Introduced a new test file to validate compatibility types for various API clients including OpenAI, Anthropic, Gemini, Aihubmix, NewAPI, and Vertex. - Implemented mock services to facilitate testing and ensure isolation of client behavior. - Added tests for both direct API clients and decorator pattern clients, ensuring correct compatibility type returns. - Enhanced middleware compatibility logic tests to verify correct identification of compatible clients. --------- Co-authored-by: one <wangan.cs@gmail.com> |
||
|
|
0453402242
|
chore(languages): update languages with a script (#8445)
* chore(languages): update languages with a script * refactor: update languages and merge it into constants * refactor: add usf and ush |
||
|
|
c2086fdb15
|
refactor[Logger]: strict type check for Logger (#8363)
* fix: strict type check of logger * feat: logger format in renderer * fix: error type |
||
|
|
8bf84b26f3
|
feat(constant): add Godot scene files(.tscn) (#8362)
* feat(constant): add Godot scene files(.tscn) * fix(AttachmentPreview): consolidate file extension checks |
||
|
|
5204438c0c
|
refactor[Logger]: filtering logs with environment variable (#8299)
refactor(Logger): enhance logging with environment variable support - Updated LoggerService to utilize environment variables for filtering logs by level and module in development mode. - Modified the logging level handling to use constants from the logger configuration. - Enhanced documentation to include details on using environment variables for log filtering in both English and Chinese documentation files. - Cleaned up unused type definitions related to logging. |
||
|
|
bfe83c0256 | feat: add developer mode settings | ||
|
|
3b123863b5
|
feat: Support LLM Tracing by Alibaba Cloud EDAS product (#7895)
* feat: add tracing modules * Initial commit * fix: problem * fix: update trace web * fix: trace view * fix: trace view * fix: fix some problem * fix: knowledge and mcp trace * feat: save trace to user home dir * feat: open trace with electron browser window * fix: root trace outputs * feat: trace internationalization and add trace icon * feat: add trace title * feat: update * package.json添加windows运行script * feat: update window title * fix: mcp trace param * fix: error show * fix: listTool result * fix: merge error * feat: add stream usage and response * feat: change trace stream * fix: change stream adapter * fix: span detail show problem * fix: process show by time * fix: stream outputs * fix: merge problem * fix: stream outputs * fix: output text * fix: EDAS support text * fix: change trace footer style * fix: topicId is loaded multiple times * fix: span reload problem & attribute with cache * fix: refresh optimization * Change Powered by text. * resolve upstream conflicts * fix: build-time type exception * fix: exceptions not used when building * fix: recend no trace * fix: resend trace list * fix: delete temporary files * feat: trace for resend * fix: trace for resend message with edit * fix: directory structure and construction method of mcp-trace * fix: change CRLF to LF * fix: add function call outputs * Revert "fix: change CRLF to LF" * fix: reorganize multi-model display * fix: append model trace binding topic * fix: some problems * fix: code optimization * fix: delete async * fix: UI optimization * fix: sort import --------- Co-authored-by: 崔顺发 <csf01409784@alibaba-inc.com> Co-authored-by: 管鑫荣 <gxr01409783@alibaba-inc.com> |
||
|
|
40f9601379
|
refactor: Unified Logger / 统一日志管理 (#8207)
* Revert "feat: optimize minapp cache with LRU (#8160)"
This reverts commit
|
||
|
|
72ae105166
|
[1.5.0-rc] Feat/memory (#7689)
* Merge memory into main * Improvement/memory UI (#7655) * feat: add auto-dimension detection to memory settings - Add automatic embedding dimension detection for memory configuration - Add toggle switch to enable/disable auto-detection (enabled by default) - Detect dimensions by making test API call to embedding provider - Show dimension input field only when auto-detection is disabled - Add loading state and error handling during dimension detection - Maintain consistency with knowledge base dimension handling 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * ✨ feat: implement unified embedding dimensions for memory service - Add jaison dependency for robust JSON parsing - Normalize all embeddings to 1536 dimensions for consistency - Improve embedding dimension logging - Update memory processor to use jaison for better error handling - Handle various JSON response formats in fact extraction 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: refactor MemoriesPage layout with new styled components and improved user management features --------- Co-authored-by: Claude <noreply@anthropic.com> * Improvement/memory UI (#7656) Co-authored-by: Claude <noreply@anthropic.com> * ✨ feat: add memory icon to sidebar for existing users - Add migration version 118 to enable memory feature visibility - Adds 'memory' icon to sidebar visible icons if not already present - Updates store version to trigger migration for existing users 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * fix(memory): include last user message ID in processor config * ✨ feat(memory): enhance memory settings UI and add new translations * Enhance memory management UI: Added settings, statistics, search, actions, and user management sections to the memory page. Updated translations for multiple languages to include new UI elements. Refactored component structure for improved layout and readability. * feat: add i18n * ui: Enhance memory modals and UI * refactor(memory): replace direct message calls with window.message for error and success notifications * fix: eslint error * feat(memory): enhance memory restoration logic and queries - Updated MemoryService to restore deleted memories instead of inserting new ones if a memory with the same hash exists. - Added new SQL queries to check for deleted memories and restore them. - Improved logging for memory restoration and embedding generation. - Refactored related API service methods to handle updated memory processing logic. * refactor: update memory configuration to use ApiClient structure - Refactored memory-related services and components to utilize the new ApiClient structure for embedding and reranking models. - Updated constructors and method signatures across multiple files to accept embedApiClient and rerankApiClient parameters. - Enhanced memory settings UI to reflect changes in memory configuration management. - Improved type definitions for KnowledgeBaseParams and MemoryConfig to align with the new structure. * ui: improve user interface for adding new users in memory page - Enhanced the button for adding new users by incorporating an icon and adjusting padding for better alignment. - Updated the user selection options to ensure consistent alignment of avatars and user names. - Refactored layout to improve overall user experience and visual consistency. * refactor(memory): streamline MemoryProcessor usage in ApiService - Removed the singleton instance of MemoryProcessor and instantiated it directly within the ApiService methods. - Updated relevant methods to utilize the new instance for searching and processing memories, improving clarity and encapsulation of memory handling logic. * chore: move knowledge dir * fix: correct import paths in KnowledgeService.ts * fix(Memory): memory deduplicate * fix(Memory): memory llm provider * fix: ci error * fix(Memory): update fact extraction prompt to focus on personal information * feat: Refactor memory fom sidebar to settings page - Removed MemoryStick icon from Sidebar component. - Updated navigation to point to the new memory settings page. - Introduced MemoriesSettingsModal for managing memory configurations. - Created MemorySettings component for comprehensive memory management. - Added user management features including adding, editing, and deleting users. - Implemented pagination and search functionality for memory items. - Updated sidebar settings to remove memory icon and ensure proper migration. - Adjusted Redux store settings to reflect changes in sidebar icons. * feat: redesign memory settings page with improved UI and layout * fix i18n * fix: update citation titles to include memory hash and increment version number * fix: remove unnecessary prop from KnowledgeCitation component * feat: enhance fact extraction prompt with clearer guidelines and examples * 🔧 feat: disable global memory by default and improve UI - Set globalMemoryEnabled default to false for better user experience - Remove manual localStorage handling to rely on redux-persist - Add Beta badge to memory settings section - Improve layout and styling of memory settings UI components 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Simplify external tool completion handling * Fix whitespace in migrate config --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: suyao <sy20010504@gmail.com> Co-authored-by: eeee0717 <chentao020717Work@outlook.com> Co-authored-by: kangfenmao <kangfenmao@qq.com> Co-authored-by: 自由的世界人 <3196812536@qq.com> |
||
|
|
ee4553130b
|
[1.5.0-rc] feat(MCP): Add DXT format support for MCP server installation (#7618)
* feat(MCP): Add DXT format support for MCP server installation
- Add comprehensive DXT package upload and extraction functionality
- Support for DXT manifest validation and MCP server configuration
- Hierarchical UI structure: Quick Add | JSON Import | DXT Import
- Variable substitution for DXT args (${__dirname} replacement)
- Automatic cleanup of DXT server directories on removal
- Enhanced error handling and connectivity checks
- Full internationalization support (EN/CN)
- Uses existing node-stream-zip for efficient extraction
- Proper working directory setup for DXT-based servers
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* 🐛 fix(MCP): Fix DXT server installation and deletion issues
- Replace fs.renameSync with cross-filesystem compatible moveDirectory method to handle temp->mcp directory moves across different mount points
- Add recursive copy fallback when rename fails (ENOENT error fix)
- Sanitize server names with slashes to prevent subdirectory creation during installation
- Improve cleanupDxtServer to handle sanitized names and provide fallback lookup
- Add proper error logging and directory existence warnings
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat(MCP): Implement comprehensive DXT MCP configuration support
- Add platform_overrides support to DXT manifest interface
- Implement complete variable substitution system (${__dirname}, ${HOME}, ${DESKTOP}, ${DOCUMENTS}, ${pathSeparator}, ${user_config.KEY})
- Add platform detection utilities (getPlatformIdentifier)
- Create resolved MCP configuration system with applyPlatformOverrides
- Export ResolvedMcpConfig interface and utility functions
- Integrate DXT configuration resolution into MCPService runtime
- Support platform-specific command, args, and environment overrides
- Add comprehensive logging for configuration resolution
Addresses DXT MANIFEST.md mcp_configuration requirements:
- Platform-specific configuration variations
- Cross-platform variable substitution
- Flexible command and environment management
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: add downloads directory variable substitution and simplify platform detection
---------
Co-authored-by: Claude <noreply@anthropic.com>
|
||
|
|
1fd92d6a5d
|
feat(constant): add .fxml file extension (#8125)
feat(常量配置): 添加对JavaFX XML文件扩展名.fxml的支持 |
||
|
|
16ca373c55
|
✨ feat: add MCP server version display with badges (#8097) | ||
|
|
bcc1046cdf
|
feat: add upload file (#8035) | ||
|
|
fba6c1642d
|
feat: implement tool call progress handling and status updates (#7303)
* feat: implement tool call progress handling and status updates - Update MCP tool response handling to include 'pending' and 'cancelled' statuses. - Introduce new IPC channel for progress updates. - Enhance UI components to reflect tool call statuses, including pending and cancelled states. - Add localization for new status messages in multiple languages. - Refactor message handling logic to accommodate new tool response types. * fix: adjust alignment of action tool container in MessageTools component - Change justify-content from flex-end to flex-start to improve layout consistency. * feat: enhance tool confirmation handling and update related components - Introduced a new tool confirmation mechanism in userConfirmation.ts, allowing for individual tool confirmations. - Updated GeminiAPIClient and OpenAIResponseAPIClient to include tool configuration options. - Refactored MessageTools component to utilize new confirmation functions and improved styling. - Enhanced mcp-tools.ts to manage tool invocation and confirmation processes more effectively, ensuring real-time status updates. * refactor(McpToolChunkMiddleware): enhance tool execution handling and confirmation tracking - Updated createToolHandlingTransform to manage confirmed tool calls and results more effectively. - Refactored executeToolCalls and executeToolUseResponses to return both tool results and confirmed tool calls. - Adjusted buildParamsWithToolResults to utilize confirmed tool calls for building new request messages. - Improved error handling in messageThunk for tool call status updates, ensuring accurate block ID mapping. * feat(McpToolChunkMiddleware, ToolUseExtractionMiddleware, mcp-tools, userConfirmation): enhance tool execution and confirmation handling - Updated McpToolChunkMiddleware to execute tool calls and responses asynchronously, improving performance and response handling. - Enhanced ToolUseExtractionMiddleware to generate unique tool IDs for better tracking. - Modified parseToolUse function to accept a starting index for tool extraction. - Improved user confirmation handling with abort signal support to manage tool action confirmations more effectively. - Updated SYSTEM_PROMPT to clarify the use of multiple tools per message. * fix(tagExtraction): update test expectations for tag extraction results - Adjusted expected length of results from 7 to 9 to reflect changes in tag extraction logic. - Modified content assertions for specific tag contents to ensure accurate validation of extracted tags. * refactor(GeminiAPIClient, OpenAIResponseAPIClient): remove unused function calling configurations - Removed the unused FunctionCallingConfigMode from GeminiAPIClient to streamline the code. - Eliminated the parallel_tool_calls property from OpenAIResponseAPIClient, simplifying the tool call configuration. * feat(McpToolChunkMiddleware): enhance LLM response handling and tool call confirmation - Added notification to UI for new LLM response processing before recursive calls in createToolHandlingTransform. - Improved tool call confirmation logic in executeToolCalls to match tool IDs more accurately, enhancing response validation. * refactor(McpToolChunkMiddleware, ToolUseExtractionMiddleware, messageThunk): remove unnecessary console logs - Eliminated redundant console log statements in McpToolChunkMiddleware, ToolUseExtractionMiddleware, and messageThunk to clean up the code and improve performance. - Focused on enhancing readability and maintainability by reducing clutter in the logging output. * refactor(McpToolChunkMiddleware): remove redundant logging statements - Eliminated unnecessary logging in createToolHandlingTransform to streamline the code and enhance readability. - Focused on reducing clutter in the logging output while maintaining error handling functionality. * feat: enhance action button functionality with cancel and confirm options * refactor(AbortHandlerMiddleware, McpToolChunkMiddleware, ToolUseExtractionMiddleware, messageThunk): improve error handling and code clarity - Updated AbortHandlerMiddleware to skip abort status checks if an error chunk is received, enhancing error handling logic. - Replaced console.error with Logger.error in McpToolChunkMiddleware for consistent logging practices. - Refined ToolUseExtractionMiddleware to improve tool use extraction logic and ensure proper handling of tool_use tags. - Enhanced messageThunk to include initialPlaceholderBlockId in block ID checks, improving error state management. * refactor(ToolUseExtractionMiddleware): enhance tool use parsing logic with counter - Introduced a toolCounter to track the number of tool use responses processed. - Updated parseToolUse function calls to include the toolCounter, improving the extraction logic and ensuring accurate response handling. * feat(McpService, IpcChannel, MessageTools): implement tool abort functionality - Added Mcp_AbortTool channel to handle tool abortion requests. - Implemented abortTool method in McpService to manage active tool calls and provide logging. - Updated MessageTools component to include an abort button for ongoing tool calls, enhancing user control. - Modified API calls to support optional callId for better tracking of tool executions. - Added localization strings for tool abort messages in multiple languages. --------- Co-authored-by: Vaayne <liu.vaayne@gmail.com> |
||
|
|
115d2078b9
|
feat: implement local cloud directory backup functionality (#6353)
* feat: implement local backup functionality - Added new IPC channels for local backup operations including backup, restore, list, delete, and set directory. - Enhanced BackupManager with methods for handling local backups and integrated auto-sync capabilities. - Updated settings to include local backup configurations and integrated UI components for managing local backups. - Localized new features in English, Japanese, Russian, and Chinese. * refactor: enhance BackupManager and LocalBackupModals for improved file handling - Updated BackupManager to specify the type of result array for better type safety. - Refactored showBackupModal in LocalBackupModals to use useCallback and generate a more descriptive default file name based on device type and timestamp. * refactor: update localBackupDir path in BackupManager for consistency - Changed localBackupDir to use the temp directory instead of userData for better alignment with backup storage practices. * refactor: enforce localBackupDir parameter in BackupManager methods - Updated BackupManager methods to require localBackupDir as a parameter, removing fallback to a default value for improved clarity and consistency in backup operations. - Removed the localBackupDir property from the class, streamlining the backup management process. * fix: update localization strings for improved clarity and consistency - Revised English, Russian, Chinese, and Traditional Chinese localization strings for better user understanding. - Adjusted phrases related to backup and restore processes to enhance clarity. - Standardized terminology across different languages for consistency. * fix: update Chinese localization strings for consistency and clarity - Revised export menu strings in zh-cn.json to improve formatting and consistency. - Removed spaces in phrases for a more streamlined appearance. * feat(settings): add option to disable hardware acceleration - Introduced a new setting to allow users to disable hardware acceleration. - Added corresponding IPC channel and configuration management methods. - Updated UI components to reflect the new setting and prompt for app restart. - Localized confirmation messages for hardware acceleration changes in multiple languages. * udpate migrate * format code * feat(i18n): add localized error messages for backup directory selection - Introduced new error messages for selecting a backup directory in multiple languages, including English, Japanese, Russian, Simplified Chinese, and Traditional Chinese. - Added checks in the LocalBackupSettings component to ensure the selected directory is not the same as the application data or installation paths, and that it has write permissions. * format * update migrate * refactor(LocalBackup): streamline local backup directory validation and enhance settings UI - Removed translation dependency in LocalBackupModals for error handling. - Added comprehensive validation for local backup directory in LocalBackupSettings, including checks for app data path, install path, and write permissions. - Introduced a clear directory button in the settings UI to reset the local backup directory. - Updated the auto-sync logic to account for local backup settings. * refactor(LocalBackupManager): remove redundant error messages for invalid local backup directory - Eliminated repeated error message calls for invalid local backup directory in the LocalBackupManager component. - Streamlined the validation logic to enhance code clarity and maintainability. |
||
|
|
278fd931fb
|
feat: object storage backup (#7791)
* chore: import opendal * feat: 添加S3备份支持及相关设置界面 - 在IpcChannel中新增S3备份相关IPC事件,支持备份、恢复、 列表、删除文件及连接检测 - 在ipc主进程注册对应的S3备份处理函数,集成backupManager - 新增S3设置页面,支持配置Endpoint、Region、Bucket、AccessKey等 参数,并提供同步和备份策略的UI控制 - 删除未使用的RemoteStorage.ts,简化代码库 提升备份功能的灵活性,支持S3作为远程存储目标 * feat(S3 Backup): 完善S3备份功能 - 支持自动备份 - 优化设置前端 - 优化备份恢复代码 * feat(i18n): add S3 storage translations * feat(settings): 优化数据设置页面和S3设置页面UI * feat(settings): optimize S3 settings state structure and update usage * refactor: simplify S3 backup and restore modal logic * feat(s3 backup): improve S3 settings defaults and modal props * fix(i18n): optimize S3 access key translations * feat(backup): optimize logging and progress reporting * fix(settings): set S3 maxBackups as unlimited by default * chore(package): restore opendal dependency in package.json * feat(backup): migrate S3 Backup dependency from opendal to aws-sdk * refactor(backup): simplify S3 config handling and partial updates * refactor(backup): update Nutstore sync state to use RemoteSyncState * feat(store): add migration 120 to initialize missing s3 settings * feat(settings): add tooltip and help link for S3 storage * fix(s3settings): disable backup button until all fields are set --------- Co-authored-by: suyao <sy20010504@gmail.com> |
||
|
|
8cfe6a5848
|
feat(settings): add option to disable hardware acceleration (#7811)
* feat(settings): add option to disable hardware acceleration - Introduced a new setting to allow users to disable hardware acceleration. - Added corresponding IPC channel and configuration management methods. - Updated UI components to reflect the new setting and prompt for app restart. - Localized confirmation messages for hardware acceleration changes in multiple languages. * fix(settings): add delay before relaunching app after disabling hardware acceleration - Introduced a 500ms delay before the application relaunches to ensure settings are applied correctly. - This change improves user experience by allowing time for the setting to take effect before the app restarts. * fix lint * fix(settings): handle errors when disabling hardware acceleration - Wrapped the hardware acceleration disabling function in a try-catch block to manage potential errors. - Added user feedback through an error message if the operation fails, improving overall robustness. |
||
|
|
e35b4d9cd1
|
feat(knowledge): support doc2x, mistral, MacOS, MinerU... OCR (#3734)
Co-authored-by: suyao <sy20010504@gmail.com> Co-authored-by: 亢奋猫 <kangfenmao@qq.com> |
||
|
|
2f016efc50
|
feat: SelectionAssistant macOS version / 划词助手macOS版 (#7561)
* feat(SelectionAssistant): add macOS support and process trust handling - Updated the selection assistant to support macOS, including new IPC channels for process trust verification. - Enhanced the SelectionService to check for accessibility permissions on macOS before starting the service. - Added user interface elements to guide macOS users in granting necessary permissions. - Updated localization files to reflect macOS support and provide relevant user instructions. - Refactored selection-related configurations to accommodate both Windows and macOS environments. * feat(SelectionService): update toolbar window settings for macOS and Windows - Set the toolbar window to be hidden in Mission Control and accept the first mouse click on macOS. - Adjusted visibility settings for the toolbar window to ensure it appears correctly on all workspaces, including full-screen mode. - Refactored the MacProcessTrustHintModal component to improve layout and styling of buttons in the modal footer. * feat(SelectionToolbar): enhance styling and layout of selection toolbar components * feat(SelectionService): enhance toolbar window settings and refactor position calculation * feat(SelectionToolbar): update button padding and add last button padding for improved layout * chore(dependencies): update selection-hook to version 1.0.2 and refine build file exclusions in electron-builder.yml * feat(SelectionService): center action window on screen when not following toolbar * fix(SelectionService): implement workaround to prevent other windows from bringing the app to front on macOS when action window is closed * fix(SelectionService): refine macOS workaround to prevent other windows from bringing the app to front when action window is closed; update selection-toolbar logo padding in styles * fix(SelectionService): implement macOS toolbar reload to clear hover status; optimize display retrieval logic * fix(SelectionService): update macOS toolbar hover status handling by sending mouseMove event instead of reloading the window * chore: update selection-hook dependency to version 1.0.3 in package.json and yarn.lock * fix(SelectionService): improve toolbar visibility handling on macOS and ensure focusability of other windows when hiding the toolbar --------- Co-authored-by: Teo <cheesen.xu@gmail.com> |
||
|
|
4bb5ff8086 | Merge branch 'main' of https://github.com/CherryHQ/cherry-studio into wip/refactor/databases | ||
|
|
19212e576f |
Revert "feat: Add S3 Backup (#6802)"
This reverts commit
|
||
|
|
b5f2abc930
|
fix: update default timeout configuration across API clients (#7686)
- Increased the default timeout value from 5 minutes to 10 minutes in constant.ts. - Updated GeminiAPIClient and ImageGenerationMiddleware to utilize the new defaultTimeout constant for API call timeouts, ensuring consistent timeout handling across the application. |
||
|
|
3f5901766d
|
feat: Add S3 Backup (#6802)
* chore: import opendal * feat: 添加S3备份支持及相关设置界面 - 在IpcChannel中新增S3备份相关IPC事件,支持备份、恢复、 列表、删除文件及连接检测 - 在ipc主进程注册对应的S3备份处理函数,集成backupManager - 新增S3设置页面,支持配置Endpoint、Region、Bucket、AccessKey等 参数,并提供同步和备份策略的UI控制 - 删除未使用的RemoteStorage.ts,简化代码库 提升备份功能的灵活性,支持S3作为远程存储目标 * feat(S3 Backup): 完善S3备份功能 - 支持自动备份 - 优化设置前端 - 优化备份恢复代码 * feat(i18n): add S3 storage translations * feat(settings): 优化数据设置页面和S3设置页面UI * feat(settings): optimize S3 settings state structure and update usage * refactor: simplify S3 backup and restore modal logic * feat(s3 backup): improve S3 settings defaults and modal props * fix(i18n): optimize S3 access key translations * feat(backup): optimize logging and progress reporting * fix(settings): set S3 maxBackups as unlimited by default * chore(package): restore opendal dependency in package.json --------- Co-authored-by: suyao <sy20010504@gmail.com> |
||
|
|
780373d5f7
|
fix: 测试版本 (#7590)
* feat(AppUpdater): add support for pre-release versions and enhance feed URL logic - Introduced a new FeedUrl for the lowest pre-release version. - Updated AppUpdater to handle early access and upgrade channel settings more effectively. - Enhanced IPC logging for early access and upgrade channel changes. - Refactored feed URL setting logic to streamline update processes. * fix(AppUpdater, ipc): enhance early access and upgrade channel handling - Added checks to prevent unnecessary cancellation of downloads when early access and upgrade channel settings remain unchanged. - Updated IPC handlers to ensure early access is enabled when switching upgrade channels if it was previously disabled. - Improved logging for better traceability of changes in early access and upgrade channel settings. * delete code * delete logs * refactor(AboutSettings): enhance upgrade channel management - Introduced logic to determine the current upgrade channel based on version. - Refactored available test channels to use a more structured approach with tooltips and labels. - Updated the method for retrieving available test channels to improve clarity and maintainability. * feat(IpcChannel, ConfigManager, AppUpdater): implement test plan and channel management - Replaced early access features with test plan and test channel options in IpcChannel and ConfigManager. - Updated IPC handlers to manage test plan and test channel settings, including logging enhancements. - Refactored AppUpdater to support fetching pre-release versions based on the selected test channel. - Modified settings and localization files to reflect the new test plan functionality. - Adjusted AboutSettings and related components to integrate test plan management and improve user experience. * format code * refactor(AppUpdater, AboutSettings): improve test channel logic and localization updates - Refactored the logic in AppUpdater to enhance the handling of test channels, ensuring correct channel retrieval based on the current version. - Updated the AboutSettings component to include useEffect for managing test channel changes and displaying appropriate warnings. - Modified localization files for multiple languages to clarify the behavior of test version switching, aligning with the new logic. |
||
|
|
14e31018f7
|
fix: support spell check for mini app (#7602)
* feat(IpcChannel): add Webview_SetSpellCheckEnabled channel and implement spell check handling for webviews - Introduced a new IPC channel for enabling/disabling spell check in webviews. - Updated the registerIpc function to handle spell check settings for all webviews. - Enhanced WebviewContainer to set spell check state on DOM ready event. - Refactored context menu setup to accommodate webview context menus. * refactor(ContextMenu): update methods to use Electron.WebContents instead of BrowserWindow - Changed method signatures to accept Electron.WebContents for better context handling. - Updated internal calls to utilize the new WebContents reference for toggling dev tools and managing spell check functionality. * refactor(WebviewContainer): clean up import order and remove unused code - Adjusted the import order in WebviewContainer.tsx for better readability. - Removed redundant import of useSettings to streamline the component. |
||
|
|
4c66b205bb
|
feat: implement early access feature toggle and update related configurations (#7304)
* feat: implement early access feature toggle and update related configurations
- Replace FeedUrl with EnableEarlyAccess in IpcChannel and ConfigManager
- Update AppUpdater to handle early access updates from GitHub
- Modify settings and localization files to reflect early access functionality
- Ensure proper integration in the renderer and preload layers
* fix: enhance error handling in AppUpdater for GitHub release fetching
- Wrap the fetch call in a try-catch block to handle potential errors when retrieving the latest non-draft version from GitHub.
- Log an error message if the fetch fails and return a default feed URL.
* refactor: remove early access feature handling from AppUpdater
- Eliminate the early access feature toggle logic from the AppUpdater class.
- Adjust the feed URL setting to ensure it retrieves the latest non-draft version from GitHub when applicable.
- Clean up unnecessary user-agent header in the fetch request.
* feat(AppUpdater): enhance update feed URL logic and disable differential downloads
- Introduced a new private method to streamline feed URL setting based on early access and IP country.
- Disabled differential downloads for compatibility with GitHub and GitCode.
- Cleaned up the checkForUpdates method for better readability and maintainability.
* refactor(AppUpdater): simplify early access feed URL logic
- Consolidated the feed URL setting logic in setEnableEarlyAccess to a single line for improved readability.
- Removed redundant conditional checks while maintaining functionality for early access updates.
* refactor(AppUpdater): update feed URL structure and remove early access setting
- Modified the return structure of the latest release URL to include the channel type.
- Removed the early access setting from the IPC handler, streamlining the update process.
- Ensured the autoUpdater channel is set based on the latest release information.
* feat(UpgradeChannel): add upgrade channel management and IPC integration
- Introduced a new UpgradeChannel enum to manage different upgrade paths (latest, rc, beta).
- Updated IpcChannel to include App_SetUpgradeChannel for setting the upgrade channel.
- Enhanced ConfigManager to store and retrieve the selected upgrade channel.
- Modified AppUpdater to fetch pre-release versions based on the selected upgrade channel.
- Updated settings UI to allow users to select their preferred upgrade channel with tooltips for guidance.
- Localized new strings for upgrade channel options in multiple languages.
* refactor(AboutSettings): update version type detection and localize upgrade channel tooltips
- Changed version type detection to use the UpgradeChannel enum for better clarity.
- Localized success messages for switching upgrade channels to enhance user experience.
* chore: update version to 1.4.4-beta.1 and refactor upgrade channel handling in AboutSettings
- Updated package version to 1.4.4-beta.1.
- Renamed version type detection function to getVersionChannel for clarity.
- Refactored available version options to getAvailableTestChannels for better organization.
- Added logic to clear update info when switching upgrade channels and when toggling early access settings.
* chore: update version to 1.4.4 in package.json
* fix lint error
* feat(AppUpdater): enhance upgrade channel management and localization
- Added cancellation functionality for ongoing downloads in AppUpdater.
- Introduced a new upgrade channel option for the latest stable version.
- Updated IPC handlers to cancel downloads when changing early access settings or upgrade channels.
- Localized new strings for the latest version option in multiple languages.
- Refactored AboutSettings to include the latest version in the upgrade channel selection.
* refactor(AboutSettings): remove version channel detection logic
- Eliminated the getVersionChannel function to simplify version handling.
- Updated AboutSettings to streamline upgrade channel management.
* feat(AboutSettings): set default upgrade channel to latest
- Updated the AboutSettings component to set the default value of the upgrade channel to the latest option, enhancing user experience in channel selection.
* refactor(AboutSettings): simplify upgrade channel change handling
- Removed individual success messages for different upgrade channels in the handleUpgradeChannelChange function, streamlining the code and improving maintainability.
* refactor: file actions into FileAction service (#7413)
* refactor: file actions into FileAction service
Moved file sorting, deletion, and renaming logic from FilesPage to a new FileAction service for better modularity and reuse. Updated FileList and FilesPage to use the new service functions, and improved the delete button UI in FileList.
* fix: add tag collapse state management for assistants (#7436)
Add tag collapse state management for assistants
Introduces a collapsedTags state to manage the collapsed/expanded state of tag groups in the assistants list. Updates useTags and AssistantsTab to use this state, and adds actions to toggle and initialize tag collapse in the Redux store.
* fix(model): doubao thinking param (#7499)
* feat: Implement occupied directories handling during data copy (#7485)
* feat: Implement occupied directories handling during data copy
- Added `occupiedDirs` constant to manage directories that should not be copied.
- Enhanced the `copyOccupiedDirsInMainProcess` function to copy occupied directories to a new app data path in the main process.
- Updated IPC and preload APIs to support passing occupied directories during the copy operation.
- Modified the DataSettings component to utilize the new copy functionality with occupied directories.
* fix: Improve occupied directories handling during data copy
- Updated the filter logic in the `registerIpc` function to resolve directory paths correctly.
- Modified the `DataSettings` component to pass the correct occupied directories format during the copy operation.
* feat: add appcode (#7507)
Co-authored-by: zhaochenxue <zhaochenxue@bixin.cn>
* fix: non streamoutput sometimes (#7512)
* feat(migrate): add default settings for assistants during migration
- Introduced a new migration step to assign default settings for assistants that lack configuration.
- Default settings include temperature, context count, and other parameters to ensure consistent behavior across the application.
* chore(store): increment version number to 115 for persisted reducer
* Revert "feat: Update API Key Management Interface (#3444)"
This reverts commit
|
||
|
|
04e6f2c1ad
|
feat: implement Python MCP server using existing Pyodide infrastructure (#7506) | ||
|
|
3640d846b9
|
feat: Implement occupied directories handling during data copy (#7485)
* feat: Implement occupied directories handling during data copy - Added `occupiedDirs` constant to manage directories that should not be copied. - Enhanced the `copyOccupiedDirsInMainProcess` function to copy occupied directories to a new app data path in the main process. - Updated IPC and preload APIs to support passing occupied directories during the copy operation. - Modified the DataSettings component to utilize the new copy functionality with occupied directories. * fix: Improve occupied directories handling during data copy - Updated the filter logic in the `registerIpc` function to resolve directory paths correctly. - Modified the `DataSettings` component to pass the correct occupied directories format during the copy operation. |
||
|
|
bbe380cc9e
|
feat(ContextMenu): add spell check and dictionary suggestions to context menu (#7067)
* feat(ContextMenu): add spell check and dictionary suggestions to context menu - Implemented spell check functionality in the context menu with options to learn spelling and view dictionary suggestions. - Updated WindowService to enable spellcheck in the webview. - Enabled spell check in Inputbar and MessageEditor components. * feat(SpellCheck): implement spell check language settings and initialization - Added support for configuring spell check languages based on user-selected language. - Introduced IPC channel for setting spell check languages. - Updated settings to manage spell check enablement and languages. - Enhanced UI to allow users to toggle spell check functionality and select languages. - Default spell check languages are set based on the current UI language if none are specified. * refactor(SpellCheck): enhance spell check language mapping and UI settings - Updated spell check language mapping to default to English for unsupported languages. - Improved UI logic to only update spell check languages when enabled and no manual selections are made. - Added a new selection component for users to choose from commonly supported spell check languages. * feat(SpellCheck): integrate spell check functionality into Inputbar and MessageEditor - Added enableSpellCheck setting to control spell check functionality in both Inputbar and MessageEditor components. - Updated spellCheck prop to utilize the new setting, enhancing user experience by allowing customization of spell check behavior. * refactor(SpellCheck): move spell check initialization to WindowService - Removed spell check language initialization from index.ts and integrated it into WindowService. - Added setupSpellCheck method to configure spell check languages based on user settings. - Enhanced error handling for spell check language setup. * feat(SpellCheck): add enable spell check functionality and IPC channel - Introduced a new IPC channel for enabling/disabling spell check functionality. - Updated the preload API to include a method for setting spell check enablement. - Modified the main IPC handler to manage spell check settings based on user input. - Simplified spell check language handling in the settings component by directly invoking the new API method. * refactor(SpellCheck): remove spellcheck option from WindowService configuration - Removed the spellcheck property from the WindowService configuration object. - This change streamlines the configuration setup as spell check functionality is now managed through IPC channels. * feat(i18n): add spell check translations for Japanese, Russian, and Traditional Chinese - Added new translations for spell check functionality in ja-jp, ru-ru, and zh-tw locale files. - Included descriptions and language selection options for spell check settings to enhance user experience. * feat(migrate): add spell check configuration migration - Implemented migration for spell check settings, disabling spell check and clearing selected languages in the new configuration. - Enhanced error handling to ensure state consistency during migration process. * fix(migrate): ensure spell check settings are updated safely - Added a check to ensure state.settings exists before modifying spell check settings during migration. - Removed redundant error handling that returned the state unmodified in case of an error. * fix(WindowService): set default values for spell check configuration and update related UI texts * refactor(Inputbar, MessageEditor): remove contextMenu attribute and add context menu handling in MessageEditor --------- Co-authored-by: beyondkmp <beyondkmkp@gmail.com> |
||
|
|
a8e23966fa
|
feat(FileStorage): add support for .doc files using word-extractor (#7374)
* feat(FileStorage): add support for .doc files and integrate word-extractor * chore(package): add word-extractor to devdependencies |
||
|
|
c660aaba3d
|
fix: 修复数据目录迁移的bug (#7386)
* fix: move initAppDataDir function inline and remove export from utils/file.ts * fix some bugs * fix shouldcopy error * fix: handle appDataPath initialization and update logic in file.ts; update defaultChecked in DataSettings component * fix: improve appDataPath handling and migration logic in file.ts * fix: add error message for selecting the same app data path in DataSettings component and update localization files * fix: ensure migration confirmation modal is shown correctly in DataSettings component * feat: add new IPC channel for retrieving data path from arguments and update related components for migration handling * fix: update app data path validation to check for prefix match in DataSettings component * refactor: simplify data migration logic in DataSettings component by removing unnecessary flag * fix: update initAppDataDir invocation to check for app packaging status in bootstrap.ts |
||
|
|
439ec286b5
|
refactor: hard-coded language map (#7360) | ||
|
|
d409ac1b73
|
feat: Add app data path selection and relaunch functionality (#6096)
* feat: Add app data path selection and relaunch functionality * Introduced new IPC channels for selecting and setting the app data path. * Implemented logic to initialize the app data path on startup. * Added confirmation modal for changing the app data directory in the settings. * Updated translations for new app data path features in multiple languages. * feat: Implement user data copying and app data path management * Added IPC channels for copying user data to a new location and setting the app data path. * Enhanced the user interface to support data copying with progress notifications. * Updated translations to reflect new features related to app data management. * Refactored file utility functions to streamline data path handling. * refactor: update IPC channel names and streamline app data path handling - Renamed IPC channels for selecting app data path and copying user data for clarity. - Simplified the logic for selecting and setting app data paths, removing unnecessary success/error handling. - Updated related functions and components to reflect the new IPC channel names and improved data handling. - Removed unused copyUserDataToNewLocation function to clean up the codebase. * fix: update app data directory selection text in multiple locales - Changed the text for selecting the app data directory from "Select Directory" to "Modify Directory" in English, Japanese, Russian, Simplified Chinese, and Traditional Chinese locales to better reflect the action being performed. * refactor: remove redundant success messages in DataSettings component - Eliminated unnecessary success messages related to app data copying and app relaunching to streamline user feedback and improve code clarity. * refactor: streamline file utility functions and update app data initialization - Moved `getDataPath` function to the `utils/index.ts` for better organization and accessibility. - Renamed `initUserDataDir` to `initAppDataDir` for clarity in its purpose. - Removed commented-out code in `ConfigManager` to enhance code cleanliness. * refactor: update import paths and localization strings for app data - Refactored import statements for `getDataPath` to streamline utility access. - Updated localization strings for app data in English, Japanese, Russian, Simplified Chinese, and Traditional Chinese to enhance clarity and consistency. * update i18n * add fc * fix: handle errors in app data path retrieval - Added error handling to the `getAppDataPathFromConfig` function to return null if the configuration file cannot be read or parsed, improving robustness. * refactor: simplify app data path handling in IPC - Removed error handling for setting the app data path in the IPC channel, streamlining the process by directly updating the configuration and user data path without try-catch blocks. * fix: update userData path handling for portable applications - Modified the initAppDataDir function to set the userData path based on the PORTABLE_EXECUTABLE_DIR environment variable, ensuring compatibility with portable application setups. * feat: enhance app data path migration with progress indication - Implemented a loading modal with progress tracking during the app data path migration process. - Added visual feedback using a progress bar to inform users of the copying status. - Improved error handling and user notifications for successful and failed migrations. - Refactored the modal confirmation logic to streamline user interactions during the path selection and migration process. * feat: add migration paths and update UI for data migration process - Introduced new translation keys for migration paths in Japanese, Russian, Simplified Chinese, and Traditional Chinese. - Enhanced the DataSettings component with a structured layout for displaying original and new paths during data migration. - Updated modal titles and content to improve user experience during the migration process. * feat: enhance data migration process with improved UI and progress tracking - Refactored the DataSettings component to streamline the data migration workflow. - Added a new function to display progress during the migration process, enhancing user feedback. - Updated modal logic to improve clarity and user experience when selecting new app data paths. - Implemented error handling and notifications for successful and failed migrations. * feat: add stop quit app functionality during data migration - Introduced a new IPC channel to manage the application's quit behavior during data transfer. - Updated the DataSettings component to prevent the app from quitting while migration is in progress, enhancing user experience. - Improved modal configurations for better responsiveness and visual appeal. * feat: enhance app data path handling and localization updates - Updated IPC handler to use 'filePath' for clarity in app data path management. - Improved validation to ensure the new app data path is not the root path, enhancing user feedback during path selection. - Added new translation keys for error messages related to app data path selection in English, Japanese, Russian, Simplified Chinese, and Traditional Chinese, improving localization support. * feat: add write permission check and enhance quit prevention during data migration - Introduced a new IPC channel to check write permissions for the app data path. - Updated the DataSettings component to validate write permissions before proceeding with data migration. - Enhanced the quit prevention logic to include a reason for blocking the app from quitting during data transfer. - Added new localization keys for error messages related to write permissions in multiple languages, improving user feedback. * feat: enhance confirmation modal in DataSettings component - Updated the confirmation modal to include danger styling for the OK button, improving visual feedback. - Added localized text for the OK and Cancel buttons, enhancing user experience through better accessibility. * feat: add localization keys and improve quit prevention during data migration - Added new localization keys for data migration, including titles and original path labels, enhancing user experience. - Updated the DataSettings component to ensure the app does not quit during data migration, improving reliability and user feedback. * feat(DataSettings): add data copying option and update related messages - Introduced a switch to allow users to choose whether to copy data from the original directory when changing the app data path. - Updated user notifications and progress messages to reflect the new functionality, including warnings about data copying. - Enhanced localization files for multiple languages to include new strings related to data copying options and notifications. * fix(DataSettings): set default for data copying option to true - Updated the DataSettings component to set the default state of the data copying option to true. - Added a new CopyDataContent component to enhance the user interface by displaying the data copying option alongside the existing path settings. - Improved layout by ensuring proper spacing and alignment for better user experience. --------- Co-authored-by: beyondkmp <beyondkmkp@gmail.com> |