Commit Graph

1743 Commits

Author SHA1 Message Date
suyao
bb5000c024 feat(Proxy): Implement proxy management system
- Add ProxyManager service to handle system, custom, and no proxy configurations
- Integrate proxy support for Gemini, Knowledge, and WebDav services
- Add fetch-socks and undici for advanced proxy handling
- Enhance proxy configuration with environment variable and session management
2025-03-11 09:56:40 +08:00
Vaayne
99e13386a7 fix(mcpToolUtils): Update response text to include a newline character 2025-03-11 09:55:59 +08:00
Vaayne
80fa674361 feat(MCPService): Implement IPC communication for server management and updates 2025-03-11 09:55:59 +08:00
Vaayne
ce458be9e4 refactor(GeminiProvider): remove unused tool filtering logic and update tools assignment 2025-03-11 09:44:34 +08:00
kangfenmao
1e9771307c fix(MessageContent): Prevent mutation of original message object 2025-03-10 23:01:14 +08:00
kangfenmao
902c16baf2 fix(AppsPage): Improve empty state rendering for apps list 2025-03-10 22:52:19 +08:00
kangfenmao
a3f540ff1c fix(ChatNavigation): Add unique keys to navigation info messages 2025-03-10 22:39:31 +08:00
George·Dong
04c60b57c4 feat: Add chat navigation button 2025-03-10 22:37:06 +08:00
kangfenmao
3733b838a5 chore: sort i18n keys 2025-03-10 22:23:11 +08:00
kangfenmao
419594d7f4 refactor(Sidebar): Simplify navigation and settings routing logic 2025-03-10 22:20:52 +08:00
kangfenmao
96103b77c8 fix(TranslatePage): Disable scroll sync by default 2025-03-10 18:01:40 +08:00
kangfenmao
32ab1e68e6 refactor(LLM): Reorganize system providers and add provider reordering utility 2025-03-10 17:54:45 +08:00
suyao
e75b064118 feat(constants): Add BibTeX file extension to supported text files 2025-03-10 17:33:02 +08:00
ousugo
336799eead feat(Models): Add 'qvq' to vision allowed models list 2025-03-10 17:32:09 +08:00
ousugo
1af3cb8419 fix: Refine special character removal in utility function 2025-03-10 17:09:33 +08:00
Chuqiao Feng
49922b960e fix: #2957 improve topic auto renaming & remove special characters from file name when topic exported (#3132)
* fix: refine special character removal for topic auto renaming #2957

* fix: remove special characters in topic title when used as file name #2957
2025-03-10 17:09:02 +08:00
shiro-yama
3d543fb633 fix: fix GeminiProvdier config tools has empty array or object make request 400 (#3090)
Co-authored-by: archer <archer@gmail.com>
2025-03-10 11:59:14 +08:00
Hao He
5ac659a9d5 Fix/improve file utils (#3116)
* Enhance update error logging and fix duplicate type import

- Improve error logging in AppUpdater with more detailed error information and timestamps
- Remove duplicate MCPServer type import in Inputbar component

* fix: ensure directory existence and optimize file operations
2025-03-10 11:47:09 +08:00
Vaayne
e2a0b2e8a1 fix(MCPToolsButton): Optimize useEffect dependencies for server enabling logic 2025-03-10 10:59:36 +08:00
kangfenmao
0e74c71e41 chore: Update project metadata and repository details
- Change author email to support@cherry-ai.com
- Update homepage URL to reflect new GitHub organization
2025-03-10 10:38:02 +08:00
kangfenmao
abbe42f251 refactor(MCPToolsButton): Update icon and no servers text
- Replace ToolOutlined icon with CodeOutlined
- Update no servers placeholder text to use a more specific translation key
2025-03-10 10:04:16 +08:00
kangfenmao
1cdf4b8abe refactor(Messages): Remove Suggestions component from Messages view 2025-03-09 22:23:23 +08:00
kangfenmao
f5bf195e7d fix(Messages): Improve auto-rename topic logic with message filtering 2025-03-09 22:21:07 +08:00
kangfenmao
6c4a19da59 refactor(MessageGroupModelList): Simplify display mode toggle interaction 2025-03-09 22:08:28 +08:00
kangfenmao
2d7b5d9cf5 fix: Improve topic context in history search and messages
Update SearchMessage and TopicMessages components to pass topic context to MessageItem, ensuring proper rendering of messages with their associated topics
2025-03-09 22:04:35 +08:00
one
9d98bcccd6 feat(message): add a compact style for the model list in message groups (#2962)
* feat(message): add a compact style for the model list in message groups

* refactor: use button as action rather than state

---------

Co-authored-by: 亢奋猫 <kangfenmao@qq.com>
2025-03-09 22:04:18 +08:00
lbc123456
f0807cfe74 fix:add State Cloud models (#2971)
* feat: 模型服务添加天翼云模型

* feat:add website

* fix: id is duplicate

---------

Co-authored-by: 李保成 <libaocheng@cndatacom.com>
Co-authored-by: 亢奋猫 <kangfenmao@qq.com>
2025-03-09 22:02:28 +08:00
one
173cd428b1 feat: synced scrolling for translation page 2025-03-09 21:35:32 +08:00
kangfenmao
d5699ee7ad fix(MessageTools): Improve empty tool responses check
Use lodash's isEmpty for more robust null/undefined handling when checking MCP tool responses
2025-03-09 21:23:45 +08:00
自由的世界人
af3674e8d2 fix: translate error handle (#3092) 2025-03-09 21:22:08 +08:00
kangfenmao
e6477f7f77 refactor(loader): Replace app.getPath with getTempDir in EpubLoader
Use the new getTempDir utility function from file.ts to generate temporary file paths, maintaining consistency with recent file path utility refactoring
2025-03-09 20:22:46 +08:00
George·Dong
8001144c00 fix: Correct MIME type for JPG images for Gemini 2.0 Pro 2025-03-09 17:37:02 +08:00
Hao He
663ab46c9f feat(loader): optimize EpubLoader memory usage with file streams (#3074)
* Enhance update error logging and fix duplicate type import

- Improve error logging in AppUpdater with more detailed error information and timestamps
- Remove duplicate MCPServer type import in Inputbar component

* feat(loader): optimize EpubLoader memory usage with file streams

Replace in-memory arrays with file streams for EPUB processing to reduce
memory consumption when handling large e-books. Use temporary files for
chapter content, add completion logs, and ensure proper cleanup.

This prevents memory overflow issues with large EPUB files (>5MB).
2025-03-09 17:36:19 +08:00
kangfenmao
ad8ef81783 refactor: Extract file path utility functions
Move hardcoded file path generation logic to dedicated utility functions in file.ts, improving code modularity and reducing duplication across services and IPC handlers
2025-03-09 17:33:46 +08:00
kangfenmao
123e9840fe fix: Standardize file creation timestamp to ISO string format
Ensure consistent ISO string representation of file creation timestamps in both file utility and knowledge content upload
2025-03-09 17:28:00 +08:00
FunJim
5c7881b938 feat: Enhance API Key Management in Provider Settings
- Add single key checking functionality
- Implement ability to remove individual API keys
- Improve UI with remove and check buttons for each key
- Disable actions during checking to prevent conflicts
- Add styled remove icon for key deletion
2025-03-09 17:26:07 +08:00
MyPrototypeWhat
787d084b12 Fix/message refactor bug (#3087)
*  feat: add Model Context Protocol (MCP) support (#2809)

*  feat: add Model Context Protocol (MCP) server configuration (main)

- Added `@modelcontextprotocol/sdk` dependency for MCP integration.
- Introduced MCP server configuration UI in settings with add, edit, delete, and activation functionalities.
- Created `useMCPServers` hook to manage MCP server state and actions.
- Added i18n support for MCP settings with translation keys.
- Integrated MCP settings into the application's settings navigation and routing.
- Implemented Redux state management for MCP servers.
- Updated `yarn.lock` with new dependencies and their resolutions.

* 🌟 feat: implement mcp service and integrate with ipc handlers

- Added `MCPService` class to manage Model Context Protocol servers.
- Implemented various handlers in `ipc.ts` for managing MCP servers including listing, adding, updating, deleting, and activating/deactivating servers.
- Integrated MCP related types into existing type declarations for consistency across the application.
- Updated `preload` to expose new MCP related APIs to the renderer process.
- Enhanced `MCPSettings` component to interact directly with the new MCP service for adding, updating, deleting servers and setting their active states.
- Introduced selectors in the MCP Redux slice for fetching active and all servers from the store.
- Moved MCP types to a centralized location in `@renderer/types` for reuse across different parts of the application.

* feat: enhance MCPService initialization to prevent recursive calls and improve error handling

* feat: enhance MCP integration by adding MCPTool type and updating related methods

* feat: implement streaming support for tool calls in OpenAIProvider and enhance message processing

* fix: finish_reason undefined

* fix: Improve translation error handling in MessageMenubar

---------

Co-authored-by: LiuVaayne <10231735+vaayne@users.noreply.github.com>
Co-authored-by: kangfenmao <kangfenmao@qq.com>
2025-03-09 17:25:23 +08:00
kangfenmao
f7956a6594 fix: Convert file created_at to ISO string format
Ensure consistent string representation of file creation timestamps across file storage and type definitions
2025-03-09 17:21:57 +08:00
kangfenmao
e6c8215dd5 fix: Default MCP tools button state to disabled 2025-03-09 17:00:35 +08:00
kangfenmao
4cdf0a7086 refactor: Remove deprecated userData path update logic 2025-03-09 16:19:38 +08:00
kangfenmao
6faf14d4dd fix: Improve MCP tool response handling and logging
- Add more descriptive console logging for tool call responses
- Use cloneDeep when storing MCP tool responses to prevent reference issues
- Simplify upsertMCPToolResponse method calls
2025-03-09 13:37:37 +08:00
kangfenmao
62bb2ffbc5 Revert "fix(mcp): 修复了mcp无法调用功能的问题 (#3047)"
This reverts commit a936dac264.
2025-03-09 11:11:25 +08:00
kangfenmao
640b95164b feat: Add support for enabled MCPs in message sending 2025-03-09 10:49:28 +08:00
kangfenmao
e5a48cf855 feat: Add "Tool Calling" localization across language files 2025-03-09 10:18:54 +08:00
juzheng
ea657a3606 fix: file extension to lowercase when uploading 2025-03-09 10:12:57 +08:00
one
ce837bc7ef feat: Add health check to check all the models at one time (#2613)
* feat: Add health check to check all the models at one time

* fix: add model avatars to the health-check list

* style: Use segmented instead of switch

* fix: remove redundant timing reports

* refactor: Extract small functions

* refactor: use more hooks to make the main component clearer

* fix: mask API keys with asterisks

* refactor: split health check popup and model list

- rename ModelHealthCheckPopup to HealthCheckPopup
- add HealthCheckModelList
- add maskApiKey to utils

* refactor: compute latency in checkApi

* fix: remove unused i18n keys

* refactor: use checkModel instead of checkApi for better semantics

* fix: update comments

* refactor: extract health checking functions to services

* refactor: extract model list

* refactor: render statuses on the existing model list

* fix: reset button style on completion

* fix: disable model card while checking

- remove unused i18n keys
- better window message

* refactor: show provider name in messages

* refactor: change default values

* refactor: fully migrate model list from ProviderSetting to ModelList
2025-03-08 22:24:56 +08:00
kangfenmao
4a19dbb082 feat: Enhance SettingsTab UI with styled select components and type safety
- Replace default Select components with StyledSelect for improved visual design
- Add explicit type casting for various select onChange handlers
- Improve type safety for message style, multi-model style, code style, and other settings
- Introduce StyledSelect with custom styling for consistent UI appearance
2025-03-08 20:58:34 +08:00
George·Dong
91ee2ed17a fix: number of context incorrect (#2653)
* fix: number of context incorrect

* feat: 优化上下文数显示样式

* fix: 上下文数显示不正确

修复无限上下文情况下,当前上下文数显示不正确的问题

* fix: slider display incorrect

* fix: Update infinity display style
2025-03-08 20:50:24 +08:00
kangfenmao
8bd5692014 refactor: Optimize message handling and event management
- Introduce messagesRef to track messages without causing re-renders
- Simplify event listener management with more concise useEffect hooks
- Improve auto-rename topic logic with current messages reference
- Remove commented-out code and unused event listeners
- Enhance type safety and reduce dependency complexity
2025-03-08 20:45:28 +08:00
kangfenmao
59fb3eba82 feat: Add tool calling support for models
- Introduce ToolsCallingIcon component for tool calling models
- Add isToolCallingModel function in models config
- Update ModelTags to support showing tool calling icon
- Add tooltips to model icons for better UX
- Update Chinese localization with tool calling translation
- Modify Inputbar and SelectModelButton to accommodate new icon
2025-03-08 20:10:38 +08:00