cherry-studio/src/main/services
LiuVaayne 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>
2025-07-15 10:24:41 +08:00
..
mcp fix: ensure correct PATH assignment in shell environment 2025-05-23 15:25:01 +08:00
memory [1.5.0-rc] Feat/memory (#7689) 2025-07-15 10:24:41 +08:00
remotefile feat(knowledge): support doc2x, mistral, MacOS, MinerU... OCR (#3734) 2025-07-03 16:23:02 +08:00
urlschema feat(MCPSettings): enhance MCP server management and localization 2025-07-10 12:39:01 +08:00
AppService.ts fix: linux launch on boot (#7907) 2025-07-08 14:01:58 +08:00
AppUpdater.ts feat(AppUpdater): integrate User-Agent generation for autoUpdater req… (#7751) 2025-07-02 16:18:44 +08:00
AxiosProxy.ts refactor(AxiosProxy): improve proxy handling and initialization logic 2025-04-21 11:26:13 +08:00
BackupManager.ts feat: implement local cloud directory backup functionality (#6353) 2025-07-08 14:04:29 +08:00
CacheService.ts feat: add gemini files support 2025-01-07 16:49:11 +08:00
ConfigManager.ts feat(settings): add option to disable hardware acceleration (#7811) 2025-07-04 17:19:22 +08:00
ContextMenu.ts fix: support spell check for mini app (#7602) 2025-06-28 08:36:32 +08:00
CopilotService.ts refactor: replace console.log with Logger for improved logging consistency across the application 2025-05-11 19:25:50 +08:00
DxtService.ts [1.5.0-rc] feat(MCP): Add DXT format support for MCP server installation (#7618) 2025-07-14 22:37:56 +08:00
ExportService.ts fix: enhance ExportService to support nested bold and italic formatting (#6420) 2025-05-25 21:08:47 +08:00
FileStorage.ts fix(encoding): encoding detection and decoding logic (#8024) 2025-07-10 22:13:40 +08:00
FileSystemService.ts feat(knowledge): support doc2x, mistral, MacOS, MinerU... OCR (#3734) 2025-07-03 16:23:02 +08:00
KnowledgeService.ts [1.5.0-rc] Feat/memory (#7689) 2025-07-15 10:24:41 +08:00
MCPService.ts [1.5.0-rc] feat(MCP): Add DXT format support for MCP server installation (#7618) 2025-07-14 22:37:56 +08:00
MistralClientManager.ts feat(knowledge): support doc2x, mistral, MacOS, MinerU... OCR (#3734) 2025-07-03 16:23:02 +08:00
NotificationService.ts chore: remove electron-notification-state dependency and update notification settings 2025-05-21 14:03:24 +08:00
NutstoreService.ts fix: remove redundant local variables (#5654) 2025-05-04 19:56:56 +08:00
ObsidianVaultService.ts refactor: replace console.log with Logger for improved logging consistency across the application 2025-05-11 19:25:50 +08:00
ProtocolClient.ts refactor(ProviderSettings): add provider key by urlScheme (#7529) 2025-07-03 05:10:18 +08:00
ProxyManager.ts fix: remove undici dependency and clean up ProxyManager code (#6020) 2025-05-15 22:09:53 +08:00
PythonService.ts feat: implement Python MCP server using existing Pyodide infrastructure (#7506) 2025-06-25 18:21:10 +08:00
ReduxService.ts refactor: replace console.log with Logger for improved logging consistency across the application 2025-05-11 19:25:50 +08:00
S3Storage.ts feat: object storage backup (#7791) 2025-07-07 21:00:51 +08:00
SearchService.ts fix: remove redundant local variables (#5654) 2025-05-04 19:56:56 +08:00
SelectionService.ts fix(SelectionAssistant): [macOS] show actionWindow on fullscreen app (#8004) 2025-07-10 20:41:01 +08:00
ShortcutService.ts fix: global shortcut keys (#8084) 2025-07-15 02:23:39 +08:00
StoreSyncService.ts feat(SelectionAssistant): shortcut key to toggle on/off (#6983) 2025-06-11 13:32:49 +08:00
ThemeService.ts style: set eol to lf, code formatting (#7923) 2025-07-08 09:50:33 +08:00
TrayService.ts feat: SelectionAssistant macOS version / 划词助手macOS版 (#7561) 2025-07-03 14:31:31 +08:00
VertexAIService.ts Feat/vertex ai support (#6416) 2025-06-16 21:46:27 +08:00
WebDav.ts feat(restoreFromWebdav): make credentials and path optional (#6922) 2025-06-07 21:25:08 +08:00
WebviewService.ts fix(WebviewService): simplify user agent string modification by removing Chrome version replacement 2025-05-13 16:47:18 +08:00
WindowService.ts fix(WindowService): update default window dimensions to improve user experience (#7789) 2025-07-05 00:13:22 +08:00