Commit Graph

240 Commits

Author SHA1 Message Date
kangfenmao
e834ae7a4e feat: add server restart functionality to MCPService
- Implemented a new method to restart MCP servers, enhancing server management capabilities.
- Updated the existing server activation logic to include a restart option when necessary.
- Ensured that server state is properly managed during the restart process.
2025-03-16 21:58:36 +08:00
kangfenmao
450f9a4343 refactor: improve logging messages in MCPService and clean up useMCPServers hook
- Updated logging messages in MCPService for clarity and consistency.
- Removed unused dispatch and initial server loading logic from useMCPServers hook to streamline the code.
2025-03-16 21:29:58 +08:00
suyao
60884ae35c fix: correct proxy URL parsing in ProxyManager 2025-03-16 10:27:28 +08:00
Hao He
f1e7f90326 refactor: optimize file loader with switch-case structure
* 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

* refactor: optimize file loader with switch-case structure
2025-03-14 13:30:21 +08:00
Hao He
2d1d644c3c Fix/fs-rmdir-deprecation (#3296) 2025-03-13 20:45:45 +08:00
suyao
c02a06ba7b refactor(Proxy): Improve system proxy monitoring and configuration handling 2025-03-13 00:01:17 +08:00
suyao
58b730320f refactor(Proxy): Update proxy configuration handling 2025-03-13 00:01:17 +08:00
kangfenmao
92b70a043e feat(MCPService, ModelSettings): Enhance path handling and model filtering
- Add enhanced PATH generation for MCP service across different platforms
- Improve model filtering with new function calling model type
- Refactor MCP service type definitions and transport initialization
- Add platform-specific path handling for various development environments
2025-03-12 19:01:30 +08:00
Vaayne
af41c8c741 fix(MCPService): Improve server addition and status update error handling; add localized error messages 2025-03-12 18:40:39 +08:00
kangfenmao
b27f9a58b4 refactor(MessageOperations): Improve stream message pause and selector handling 2025-03-12 11:09:52 +08:00
kangfenmao
88b932cdd0 feat: add function call model type 2025-03-11 19:42:46 +08:00
kangfenmao
0b8ebd55df refactor(MCP): Simplify IPC handlers and improve server management 2025-03-11 13:52:36 +08:00
kangfenmao
3e7446ec2e refactor(MCPService): Rename MCP service file and implement comprehensive server management 2025-03-11 10:08:38 +08:00
kangfenmao
a557f1a6da feat(ReduxService): Implement comprehensive Redux state management service for main process 2025-03-11 10:07:29 +08:00
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
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
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
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
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
4cdf0a7086 refactor: Remove deprecated userData path update logic 2025-03-09 16:19:38 +08:00
Herio
543712360a 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
2025-03-08 11:16:00 +08:00
LiuVaayne
cc84356020 feat(MCP): support gemini and claude models (#2936) 2025-03-06 19:32:34 +08:00
icinggslits
ee337cd12a feat: Windows Control Overlay button hover effect 2025-03-06 19:29:10 +08:00
icinggslits
1494015ebd feat: Improve devtools font on Windows 2025-03-06 11:35:29 +08:00
LiuVaayne
92dec0ac37 feat: support MCP sse client (#2880)
*  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

* feat: Enhance MCPServer and MCPTool interfaces with optional properties and unique IDs

* fix(mcp): Refactor SSE transport initialization to use URL object

* fix(OpenAIProvider): correct inputSchema properties reference in tool parameters

* feat(MCPSettings): enhance server settings UI with new fields and improved layout

* feat(MCPSettings): add multilingual support for MCP server settings

* fix: remove unnecessary console log statements
2025-03-06 11:35:29 +08:00
LiuVaayne
eda82fa23e 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
2025-03-06 11:35:29 +08:00
kangfenmao
bdf883dcbf feat(app-update): Refactor update handling and add manual update dialog
- Modify AppUpdater to separate update dialog logic
- Add new IPC handler for manually showing update dialog
- Update renderer hooks and store to track downloaded update state
- Switch import for UpdateInfo from electron-updater to builder-util-runtime
2025-03-05 14:33:10 +08:00
SuYao
b9b8148fba feat: support table and hyperlink when export to word (#2837)
* feat(export): Enhance markdown-to-docx export with table support

Add comprehensive table rendering capabilities to the ExportService, including:
- Support for table headers and body rows
- Configurable cell styling and alignment
- Handling of inline text formatting within table cells

* feat(export): Add hyperlink support in markdown-to-docx export

Enhance ExportService to handle hyperlinks during document export:
- Implement link detection in inline tokens
- Create ExternalHyperlink with proper styling
- Preserve link text and URL in exported document
2025-03-05 11:16:45 +08:00
kangfenmao
1fee12b103 feat: Implement comprehensive data restore functionality with progress tracking
- Added RestorePopup component for visualizing restore process
- Enhanced BackupManager with detailed restore progress tracking
- Implemented file copy progress and stage tracking during restore
- Updated localization files with restore progress translations
- Integrated restore progress reporting to renderer process
2025-03-03 22:32:55 +08:00
kangfenmao
8ed978b78e feat: Add comprehensive backup progress tracking and UI
- Implemented detailed backup progress tracking in BackupManager
- Added new BackupPopup component for backup process visualization
- Enhanced backup process with file copy progress and stage tracking
- Updated localization files with backup progress translations
- Integrated backup progress reporting to renderer process
2025-03-03 22:22:29 +08:00
kangfenmao
9b98da5315 docs: Add comprehensive documentation for KnowledgeService concurrent processing mechanism
- Created detailed technical documentation explaining the KnowledgeService's task queue and workload management
- Added JSDoc comment to KnowledgeService.ts to provide high-level overview
- Documented key aspects of concurrent task processing, including workload evaluation, task state management, and resource optimization strategies
2025-03-02 20:36:13 +08:00
icinggslits
0115b3da3a feat: Improve file upload for the knowledge base (#2544)
* feat: Improve file upload for the knowledge base

* feat: Improve file upload for the knowledge base

* feat: Improve file upload for the knowledge base

---------

Co-authored-by: 亢奋猫 <kangfenmao@qq.com>
2025-03-02 20:21:23 +08:00
suyao
9e35644738 fix: Fix app quit exceptionally on MacOS's full screen mode add Add Escape key support for exiting fullscreen mode 2025-03-02 19:53:12 +08:00
kangfenmao
7a4be73dc0 revert: some proxy errors in main process (#2294) 2025-03-01 23:17:44 +08:00
kangfenmao
46e4695f5f style: Refine Segmented component styling with transparent background and rounded corners 2025-03-01 01:44:02 +08:00
suyao
0e7a7ceec9 fix: The proxy configuration is not correctly passed. 2025-03-01 00:42:56 +08:00
kangfenmao
5534510670 feat: Enhance UI styling and interaction details
- Update window vibrancy to 'sidebar' for better visual effect
- Refine input bar styling with softer background and rounded corners
- Adjust toolbar button sizes and styling
- Modify topic position selection to use Segmented component
- Tweak light theme background opacity
2025-02-28 23:25:36 +08:00
onevcat
f21007c619 Remove unused protocol register and open url code 2025-02-28 08:19:04 +08:00
SuYao
9d3ca4f1f0 fix: some proxy errors in main process (#2294)
* formatter proxy config type

* fix: some proxy errors in main process

* chore: Remove debug logging in ProxyManager
2025-02-27 16:46:05 +08:00
NJczh
2355f80d31 fix:修复备份恢复完成后可能无权限清理临时目录 (#2247) 2025-02-27 16:40:47 +08:00
eeee0717
041360825c fix bug: uniqueIds is null when uploaded directory 2025-02-24 21:40:17 +08:00
SagoLu
695ea33ebd fix:修复在备份和恢复备份时由于无法删除临时目录导致的功能终止 (#2224)
* refactor: Remove chat settings toolbar button from input bar

* fix:修复在备份时,由于临时文件只读导致的备份失败

* fix:修复在恢复备份时,由于临时文件只读导致的备份失败

---------

Co-authored-by: kangfenmao <kangfenmao@qq.com>
2025-02-24 12:56:19 +08:00
sijie-chan
241b63c6b2 fix: 添加多个目录到知识库多个进度之间展示混淆 2025-02-24 12:40:00 +08:00
kangfenmao
c8293ab326 fix: Remove LM Studio provider from initial state 2025-02-22 22:31:37 +08:00