* 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>
* fix: update localization files for data migration warnings and path validation messages
* fix: update app data path validation and localization messages for installation path consistency
* fix: enhance app data flushing process by adding connection closure and delay in DataSettings component
* Revert "refactor(middleware): Add error property to CompletionResult and handle errors when checking API (#7407)"
This reverts commit 50d6f1f831.
* fix: use shouldThrow param in checkApi
* 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
- Removed unused MCP server handling from Inputbar and MessagesService.
- Updated ApiService to fetch active MCP servers directly from the store.
- Deprecated knowledgeBaseIds and enabledMCPs in Message types and related functions.
- Cleaned up related utility functions to enhance code clarity and maintainability.
* fix: openai response tool use
- Added OpenAIResponseStreamListener interface for handling OpenAI response streams.
- Implemented attachRawStreamListener method in OpenAIResponseAPIClient to manage raw output.
- Updated RawStreamListenerMiddleware to integrate OpenAI response handling.
- Refactored BaseApiClient to remove unused attachRawStreamListener method.
- Improved buildSdkMessages to handle OpenAI response formats.
* fix: remove logging from StreamAdapterMiddleware
- Removed Logger.info call from StreamAdapterMiddleware to streamline output and reduce unnecessary logging.
* fix: update attachRawStreamListener to return a Promise
- Changed attachRawStreamListener method in OpenAIResponseAPIClient to be asynchronous, returning a Promise for better handling of raw output.
- Updated RawStreamListenerMiddleware to await the result of attachRawStreamListener, ensuring proper flow of data handling.
* refactor: enhance attachRawStreamListener to return a ReadableStream
- Updated the attachRawStreamListener method in OpenAIResponseAPIClient to return a ReadableStream, allowing for more efficient handling of streamed responses.
- Modified RawStreamListenerMiddleware to accommodate the new return type, ensuring proper integration of the transformed stream into the middleware flow.
* refactor: update getResponseChunkTransformer to accept CompletionsContext
- Modified the getResponseChunkTransformer method in BaseApiClient and its implementations to accept a CompletionsContext parameter, enhancing the flexibility of response handling.
- Adjusted related middleware and client classes to ensure compatibility with the new method signature, improving the overall integration of response transformations.
* refactor: update getResponseChunkTransformer to accept CompletionsContext
- Modified the getResponseChunkTransformer method in AihubmixAPIClient to accept a CompletionsContext parameter, enhancing the flexibility of response handling.
- Ensured compatibility with the updated method signature across related client classes.
- Added error handling for tool fetching to log errors and return an empty array if a server fails to respond.
- Changed from Promise.all to Promise.allSettled to ensure all tool fetching attempts are accounted for, filtering out any rejected promises.
- Added debug logging in buildSdkMessages for better traceability.
- Improved handling of tool calls in the transform method to correctly index multiple tool uses.
- Enqueued additional response types to enhance the output structure for better integration with the streaming API.
- Refactored event listener attachment for clarity and maintainability.
* fix: series bugs of quick assistant
* fix: update quick assistant ID handling and improve error management in HomeWindow
* refactor(HomeWindow, Messages): streamline clipboard handling and improve component structure
- Removed unused imports and hotkey functionality from Messages component.
- Refactored clipboard management in HomeWindow to use refs for better performance.
- Enhanced user input handling and state management in HomeWindow.
- Updated InputBar to accept assistant prop instead of model for better clarity.
- Improved Footer component to handle copy functionality and pin state more effectively.
* Enhance Footer component: add rotation animation to pin icon and adjust margin
- Updated the Pin icon in the Footer component to include a rotation animation based on the pin state.
- Adjusted the margin of the PinButtonArea for improved layout consistency.
* refactor(HomeWindow): improve clipboard handling and input placeholder logic
- Updated clipboard reading logic to check for document focus in addition to startup settings.
- Consolidated key event handling to streamline input processing.
- Enhanced placeholder logic in InputBar to reflect the current assistant's name or model more accurately.
* fix: initialize messageContents and improve message handling in GeminiAPIClient; add new Gemini model to configuration
* refactor: streamline message handling in GeminiAPIClient; enhance message extraction from SDK payload
* 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>
* feat: Add pricing configuration and display for models
- Introduce model pricing fields in ModelEditContent
- Add price calculation and display in MessageTokens
- Update localization files with price-related translations
- Extend Model type with optional pricing information
* fix: Correct currency symbol placement in message token pricing display
* feat: Add custom currency support in model pricing configuration
- Introduce custom currency option in ModelEditContent
- Update localization files with custom currency translations
- Enhance currency symbol selection with custom input
- Improve input styling for pricing configuration
* fix(OpenAIProvider): ensure messages.content of the request is string
* Update ModelEditContent.tsx
* fix(model-price): remove duplicate button
* fix: build error
---------
Co-authored-by: 自由的世界人 <3196812536@qq.com>