29af30b8d2
* feat(Memory): add memory management functionality with settings modal and integration into sidebar
* Add user memory search to chat completion flow
Enable assistants to use memory search results for more personalized
responses when enableMemory is true. Add enableMemory flag to Assistant
type.
* Add MemoryService and memory types interfaces
* Add memory settings tab to AssistantSettings
* feat(memory): implement Phase 1 core backend infrastructure
- Add Memory IPC channels for full CRUD operations
- Create main process MemoryService with LibSQL storage
- Implement memory database schema with history tracking
- Add IPC handlers for all memory operations
- Update preload API to expose memory functionality
- Update renderer MemoryService to use IPC instead of mock data
- Add comprehensive error handling and logging
- Support memory deduplication using SHA256 hashes
- Implement audit trail for all memory changes
Core features:
- Memory add/search/list/delete/update operations
- Full history tracking for changes
- User/agent/run filtering support
- Prepared for vector embeddings (Phase 2)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* ✨ feat: Implement memory vector search and hybrid search with LibSQL native vector support
- Implemented native vector support using `F32_BLOB` for storing embeddings directly in LibSQL.
- Created vector index using `libsql_vector_idx()` for efficient similarity search.
- Implemented `vectorSearch()` using `vector_top_k()` for fast nearest neighbor search based on cosine similarity.
- Implemented `hybridSearch()` combining text search and vector similarity search.
- Added `addBatchMemories()` to efficiently add multiple memories with embeddings.
- Added embedding model configuration via `setEmbeddingModel()`.
- Integrated embedding generation using `EmbeddingService`.
- Updated database schema with vector column and index.
- Added methods for embedding conversion and similarity calculations.
- Updated documentation with vector search details and schema changes.
- Improved memory management with embedding caching and clearing.
- Added `findSimilarMemories` to avoid duplicates
- Added embedding stats and cache methods
* feat(memory): add EmbeddingService and VectorSearch for memory embedding and search functionality
* fix(memory): update vector operations to match libsql documentation
- Fix vector32() function usage by removing quotes from embedding parameters
- Replace vector_top_k with standard queries to avoid index dependency
- Make embedding dimensions flexible by removing fixed 1536 dimension
- Add NULL checks for embeddings in all vector operations
- Update memory update method to regenerate embeddings
- Use parameterized queries to prevent SQL injection
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* update implement plan
* feat(memory): implement Phase 3 - UI and integration components
- Create Memory Page UI with full CRUD operations
- Add, delete, search, and filter memories
- User and date range filtering
- Bulk operations support
- Implement Memory Processing Pipeline
- Automatic fact extraction from conversations
- Intelligent memory updates (add/update/delete)
- Background processing for non-blocking UI
- Integrate memory search into ApiService
- Inject relevant memories into conversation context
- Post-conversation memory processing
- Assistant-specific memory isolation
- Add Assistant Memory Settings
- Toggle memory per assistant
- View memory statistics
- Configure from assistant settings panel
- Complete memory feature integration
- Redux store already implemented
- Memory service backend ready
- Full end-to-end functionality
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* docs: update memory feature implementation plan to reflect Phase 3 completion
- Mark Phase 3 (UI and Integration) as completed
- Update implementation progress to 90%
- Document all completed components and features
- Add usage instructions for the memory feature
- List key implementation files for reference
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Revert "feat(memory): implement Phase 3 - UI and integration components"
This reverts commit 422463d0f7.
* ✨ feat: Implement memory management for assistants
- Introduced `MemoryProcessor` to handle fact extraction, memory updates, and searches.
- Added `AssistantMemorySettings` component to allow enabling/disabling memory and viewing memory statistics.
- Integrated memory functionality with assistant settings.
- Implemented memory-related prompts and schema validation.
- Added memory service calls for adding, updating, deleting, and searching memories.
* fix: Update memory settings form handling in AssistantMemorySettings component
* feat(memory): implement Phase 3 - UI and integration components
- Create Memory Page UI with full CRUD operations
- Add, delete, search, and filter memories
- User and date range filtering
- Bulk operations support
- Implement Memory Processing Pipeline
- Automatic fact extraction from conversations
- Intelligent memory updates (add/update/delete)
- Background processing for non-blocking UI
- Integrate memory search into ApiService
- Inject relevant memories into conversation context
- Post-conversation memory processing
- Assistant-specific memory isolation
- Add Assistant Memory Settings
- Toggle memory per assistant
- View memory statistics
- Configure from assistant settings panel
- Complete memory feature integration
- Redux store already implemented
- Memory service backend ready
- Full end-to-end functionality
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: update memory search method and integrate form handling in AssistantMemorySettings
* feat(memory): enhance memory service with new IPC channels and configuration updates
* refactor: remove VectorSearch service and update memory configuration methods
- Deleted the VectorSearch service implementation from the memory services.
- Updated the memory configuration method in the preload index from `updateConfig` to `setConfig`.
- Adjusted the corresponding call in the MemoryService to reflect the new method name.
* refactor(memory): remove embedding cache and related methods from MemoryService
* feat(memory): update MemoryService initialization to handle configuration updates and errors
* feat(memory): centralize SQL queries for MemoryService to improve maintainability
* feat: Enhance memory management with user context and CRUD operations
- Updated memory feature analysis with current implementation status and new functionalities.
- Added user context management, allowing automatic filtering based on selected user.
- Implemented full CRUD operations for memories, including add, edit, and delete functionalities.
- Introduced user management system with validation rules for user IDs.
- Enhanced internationalization support for memory features across multiple languages.
- Improved UI components for memory management, including user switching and memory editing modals.
- Updated MemoryService and MemoryProcessor to handle user-specific memory operations.
- Added comprehensive testing and documentation for new features.
* feat(memory): enhance UI components and user interactions in MemoriesPage
* feat(memory): integrate user context into memory operations and enhance user management
* feat(memory): add user deletion and reset functionality for specific users
* feat(memory): enhance localization for user management and memory operations in multiple languages
* feat(memory): remove reset functionality and add user listing feature in memory service
* feat(memory): enhance memory processing by adding fallback models and improving configuration handling
* feat(memory): refactor fact extraction and memory update logic to use fetchGenerate for LLM calls
* feat(memory): iinject memory to chat
* feat(memory): enhance memory handling by ensuring fallback to empty array and improving logging in memory search
* feat(memory): implement pagination for memory list operations
- Add offset parameter to MemoryListOptions interface for pagination support
- Update MemoryService.list() method to properly handle offset parameter
- Implement client-side pagination with 50 items per page default
- Add pagination controls with page size options (20, 50, 100, 200)
- Include pagination state management (currentPage, pageSize)
- Load all memories at once and paginate on client side for better search performance
- Reset pagination when switching users or performing searches
- Update memory CRUD operations to maintain current pagination state
- Add styled pagination component with consistent design
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(memory): correct state variable name in user switch handler
* feat(memory): add comprehensive memory feature guide in Chinese
* feat: Enhance memory management and citation handling
- Updated BaseApiClient to retrieve memory references from cache and format them for use.
- Modified CitationBlock to include memory references in rendering logic.
- Enhanced CitationsList to display memory citations with appropriate formatting.
- Improved MemoriesPage layout and functionality, including debounced search and user management.
- Refactored MemoryProcessor to handle memory updates and search queries more effectively.
- Updated API service to include memory in external tool results.
- Adjusted memory-related types and schemas for better integration.
- Enhanced createCitationBlock utility to accommodate memory data.
* feat(memory): update memory localization keys and descriptions for improved clarity
* feat(memory): add descriptions to memory localization files and improve error handling in MemoryService
* ✨ style: Remove blank lines and fix typo in settings
- Removed blank lines in README files.
- Fixed a typo in the assistant settings label for the memory tab.
revert: revert format changes
revert: revert format changes
* feat(memory): enhance memory update logic and improve prompt clarity
* feat(memory): implement global memory toggle and enhance memory settings UI
* feat(memory): refine hybrid search to focus on vector similarity and update localization files
* feat(i18n): add memory configuration prompts in multiple languages
---------
Co-authored-by: Claude <noreply@anthropic.com>
234 lines
8.0 KiB
TypeScript
234 lines
8.0 KiB
TypeScript
export enum IpcChannel {
|
|
App_GetCacheSize = 'app:get-cache-size',
|
|
App_ClearCache = 'app:clear-cache',
|
|
App_SetLaunchOnBoot = 'app:set-launch-on-boot',
|
|
App_SetLanguage = 'app:set-language',
|
|
App_ShowUpdateDialog = 'app:show-update-dialog',
|
|
App_CheckForUpdate = 'app:check-for-update',
|
|
App_Reload = 'app:reload',
|
|
App_Info = 'app:info',
|
|
App_Proxy = 'app:proxy',
|
|
App_SetLaunchToTray = 'app:set-launch-to-tray',
|
|
App_SetTray = 'app:set-tray',
|
|
App_SetTrayOnClose = 'app:set-tray-on-close',
|
|
App_SetTheme = 'app:set-theme',
|
|
App_SetAutoUpdate = 'app:set-auto-update',
|
|
App_SetFeedUrl = 'app:set-feed-url',
|
|
App_HandleZoomFactor = 'app:handle-zoom-factor',
|
|
App_Select = 'app:select',
|
|
App_HasWritePermission = 'app:has-write-permission',
|
|
App_Copy = 'app:copy',
|
|
App_SetStopQuitApp = 'app:set-stop-quit-app',
|
|
App_SetAppDataPath = 'app:set-app-data-path',
|
|
App_GetDataPathFromArgs = 'app:get-data-path-from-args',
|
|
App_FlushAppData = 'app:flush-app-data',
|
|
App_IsNotEmptyDir = 'app:is-not-empty-dir',
|
|
App_RelaunchApp = 'app:relaunch-app',
|
|
App_IsBinaryExist = 'app:is-binary-exist',
|
|
App_GetBinaryPath = 'app:get-binary-path',
|
|
App_InstallUvBinary = 'app:install-uv-binary',
|
|
App_InstallBunBinary = 'app:install-bun-binary',
|
|
|
|
App_QuoteToMain = 'app:quote-to-main',
|
|
|
|
Notification_Send = 'notification:send',
|
|
Notification_OnClick = 'notification:on-click',
|
|
|
|
Webview_SetOpenLinkExternal = 'webview:set-open-link-external',
|
|
|
|
// Open
|
|
Open_Path = 'open:path',
|
|
Open_Website = 'open:website',
|
|
|
|
Minapp = 'minapp',
|
|
|
|
Config_Set = 'config:set',
|
|
Config_Get = 'config:get',
|
|
|
|
MiniWindow_Show = 'miniwindow:show',
|
|
MiniWindow_Hide = 'miniwindow:hide',
|
|
MiniWindow_Close = 'miniwindow:close',
|
|
MiniWindow_Toggle = 'miniwindow:toggle',
|
|
MiniWindow_SetPin = 'miniwindow:set-pin',
|
|
|
|
// Mcp
|
|
Mcp_AddServer = 'mcp:add-server',
|
|
Mcp_RemoveServer = 'mcp:remove-server',
|
|
Mcp_RestartServer = 'mcp:restart-server',
|
|
Mcp_StopServer = 'mcp:stop-server',
|
|
Mcp_ListTools = 'mcp:list-tools',
|
|
Mcp_CallTool = 'mcp:call-tool',
|
|
Mcp_ListPrompts = 'mcp:list-prompts',
|
|
Mcp_GetPrompt = 'mcp:get-prompt',
|
|
Mcp_ListResources = 'mcp:list-resources',
|
|
Mcp_GetResource = 'mcp:get-resource',
|
|
Mcp_GetInstallInfo = 'mcp:get-install-info',
|
|
Mcp_ServersChanged = 'mcp:servers-changed',
|
|
Mcp_ServersUpdated = 'mcp:servers-updated',
|
|
Mcp_CheckConnectivity = 'mcp:check-connectivity',
|
|
|
|
//copilot
|
|
Copilot_GetAuthMessage = 'copilot:get-auth-message',
|
|
Copilot_GetCopilotToken = 'copilot:get-copilot-token',
|
|
Copilot_SaveCopilotToken = 'copilot:save-copilot-token',
|
|
Copilot_GetToken = 'copilot:get-token',
|
|
Copilot_Logout = 'copilot:logout',
|
|
Copilot_GetUser = 'copilot:get-user',
|
|
|
|
// obsidian
|
|
Obsidian_GetVaults = 'obsidian:get-vaults',
|
|
Obsidian_GetFiles = 'obsidian:get-files',
|
|
|
|
// nutstore
|
|
Nutstore_GetSsoUrl = 'nutstore:get-sso-url',
|
|
Nutstore_DecryptToken = 'nutstore:decrypt-token',
|
|
Nutstore_GetDirectoryContents = 'nutstore:get-directory-contents',
|
|
|
|
//aes
|
|
Aes_Encrypt = 'aes:encrypt',
|
|
Aes_Decrypt = 'aes:decrypt',
|
|
|
|
Gemini_UploadFile = 'gemini:upload-file',
|
|
Gemini_Base64File = 'gemini:base64-file',
|
|
Gemini_RetrieveFile = 'gemini:retrieve-file',
|
|
Gemini_ListFiles = 'gemini:list-files',
|
|
Gemini_DeleteFile = 'gemini:delete-file',
|
|
|
|
// VertexAI
|
|
VertexAI_GetAuthHeaders = 'vertexai:get-auth-headers',
|
|
VertexAI_ClearAuthCache = 'vertexai:clear-auth-cache',
|
|
|
|
Windows_ResetMinimumSize = 'window:reset-minimum-size',
|
|
Windows_SetMinimumSize = 'window:set-minimum-size',
|
|
|
|
KnowledgeBase_Create = 'knowledge-base:create',
|
|
KnowledgeBase_Reset = 'knowledge-base:reset',
|
|
KnowledgeBase_Delete = 'knowledge-base:delete',
|
|
KnowledgeBase_Add = 'knowledge-base:add',
|
|
KnowledgeBase_Remove = 'knowledge-base:remove',
|
|
KnowledgeBase_Search = 'knowledge-base:search',
|
|
KnowledgeBase_Rerank = 'knowledge-base:rerank',
|
|
KnowledgeBase_Check_Quota = 'knowledge-base:check-quota',
|
|
|
|
//file
|
|
File_Open = 'file:open',
|
|
File_OpenPath = 'file:openPath',
|
|
File_Save = 'file:save',
|
|
File_Select = 'file:select',
|
|
File_Upload = 'file:upload',
|
|
File_Clear = 'file:clear',
|
|
File_Read = 'file:read',
|
|
File_Delete = 'file:delete',
|
|
File_DeleteDir = 'file:deleteDir',
|
|
File_Get = 'file:get',
|
|
File_SelectFolder = 'file:selectFolder',
|
|
File_CreateTempFile = 'file:createTempFile',
|
|
File_Write = 'file:write',
|
|
File_WriteWithId = 'file:writeWithId',
|
|
File_SaveImage = 'file:saveImage',
|
|
File_Base64Image = 'file:base64Image',
|
|
File_SaveBase64Image = 'file:saveBase64Image',
|
|
File_Download = 'file:download',
|
|
File_Copy = 'file:copy',
|
|
File_BinaryImage = 'file:binaryImage',
|
|
File_Base64File = 'file:base64File',
|
|
File_GetPdfInfo = 'file:getPdfInfo',
|
|
Fs_Read = 'fs:read',
|
|
|
|
// file service
|
|
FileService_Upload = 'file-service:upload',
|
|
FileService_List = 'file-service:list',
|
|
FileService_Delete = 'file-service:delete',
|
|
FileService_Retrieve = 'file-service:retrieve',
|
|
|
|
Export_Word = 'export:word',
|
|
|
|
Shortcuts_Update = 'shortcuts:update',
|
|
|
|
// backup
|
|
Backup_Backup = 'backup:backup',
|
|
Backup_Restore = 'backup:restore',
|
|
Backup_BackupToWebdav = 'backup:backupToWebdav',
|
|
Backup_RestoreFromWebdav = 'backup:restoreFromWebdav',
|
|
Backup_ListWebdavFiles = 'backup:listWebdavFiles',
|
|
Backup_CheckConnection = 'backup:checkConnection',
|
|
Backup_CreateDirectory = 'backup:createDirectory',
|
|
Backup_DeleteWebdavFile = 'backup:deleteWebdavFile',
|
|
|
|
// zip
|
|
Zip_Compress = 'zip:compress',
|
|
Zip_Decompress = 'zip:decompress',
|
|
|
|
// system
|
|
System_GetDeviceType = 'system:getDeviceType',
|
|
System_GetHostname = 'system:getHostname',
|
|
|
|
// DevTools
|
|
System_ToggleDevTools = 'system:toggleDevTools',
|
|
|
|
// events
|
|
BackupProgress = 'backup-progress',
|
|
ThemeUpdated = 'theme:updated',
|
|
UpdateDownloadedCancelled = 'update-downloaded-cancelled',
|
|
RestoreProgress = 'restore-progress',
|
|
UpdateError = 'update-error',
|
|
UpdateAvailable = 'update-available',
|
|
UpdateNotAvailable = 'update-not-available',
|
|
DownloadProgress = 'download-progress',
|
|
UpdateDownloaded = 'update-downloaded',
|
|
DownloadUpdate = 'download-update',
|
|
|
|
DirectoryProcessingPercent = 'directory-processing-percent',
|
|
|
|
FullscreenStatusChanged = 'fullscreen-status-changed',
|
|
|
|
HideMiniWindow = 'hide-mini-window',
|
|
ShowMiniWindow = 'show-mini-window',
|
|
|
|
ReduxStateChange = 'redux-state-change',
|
|
ReduxStoreReady = 'redux-store-ready',
|
|
|
|
// Search Window
|
|
SearchWindow_Open = 'search-window:open',
|
|
SearchWindow_Close = 'search-window:close',
|
|
SearchWindow_OpenUrl = 'search-window:open-url',
|
|
|
|
//Store Sync
|
|
StoreSync_Subscribe = 'store-sync:subscribe',
|
|
StoreSync_Unsubscribe = 'store-sync:unsubscribe',
|
|
StoreSync_OnUpdate = 'store-sync:on-update',
|
|
StoreSync_BroadcastSync = 'store-sync:broadcast-sync',
|
|
|
|
// Provider
|
|
Provider_AddKey = 'provider:add-key',
|
|
|
|
//Selection Assistant
|
|
Selection_TextSelected = 'selection:text-selected',
|
|
Selection_ToolbarHide = 'selection:toolbar-hide',
|
|
Selection_ToolbarVisibilityChange = 'selection:toolbar-visibility-change',
|
|
Selection_ToolbarDetermineSize = 'selection:toolbar-determine-size',
|
|
Selection_WriteToClipboard = 'selection:write-to-clipboard',
|
|
Selection_SetEnabled = 'selection:set-enabled',
|
|
Selection_SetTriggerMode = 'selection:set-trigger-mode',
|
|
Selection_SetFilterMode = 'selection:set-filter-mode',
|
|
Selection_SetFilterList = 'selection:set-filter-list',
|
|
Selection_SetFollowToolbar = 'selection:set-follow-toolbar',
|
|
Selection_SetRemeberWinSize = 'selection:set-remeber-win-size',
|
|
Selection_ActionWindowClose = 'selection:action-window-close',
|
|
Selection_ActionWindowMinimize = 'selection:action-window-minimize',
|
|
Selection_ActionWindowPin = 'selection:action-window-pin',
|
|
Selection_ProcessAction = 'selection:process-action',
|
|
Selection_UpdateActionData = 'selection:update-action-data',
|
|
|
|
// Memory
|
|
Memory_Add = 'memory:add',
|
|
Memory_Search = 'memory:search',
|
|
Memory_List = 'memory:list',
|
|
Memory_Delete = 'memory:delete',
|
|
Memory_Update = 'memory:update',
|
|
Memory_Get = 'memory:get',
|
|
Memory_SetConfig = 'memory:set-config',
|
|
Memory_DeleteUser = 'memory:delete-user',
|
|
Memory_GetUsersList = 'memory:get-users-list'
|
|
}
|