### TL;DR
Added support for automatically saving user messages to Supermemory.
### What changed?
- Added a new `addMemory` option to `wrapVercelLanguageModel` that accepts either "always" or "never" (defaults to "never")
- Implemented the `addMemoryTool` function to save user messages to Supermemory
- Modified the middleware to check the `addMemory` setting and save the last user message when appropriate
- Initialized the Supermemory client in the middleware to enable memory storage
### How to test?
1. Set the `SUPERMEMORY_API_KEY` environment variable
2. Use the `wrapVercelLanguageModel` function with the new `addMemory: "always"` option
3. Send a user message through the model
4. Verify that the message is saved to Supermemory with the specified container tag
### Why make this change?
This change enables automatic memory creation from user messages, which improves the system's ability to build a knowledge base without requiring explicit memory creation calls. This is particularly useful for applications that want to automatically capture and store user interactions for future reference.
# Add document deletion functionality and fix UI theme issues
This PR adds the ability to delete documents and their associated memories across all content card types (Google Docs, Notes, Tweets, and Websites). Each card now includes:
- A delete button that appears on hover
- A confirmation dialog to prevent accidental deletions
- Proper event handling to avoid triggering card clicks when using delete controls
Additionally, this PR fixes various UI theme issues:
- Updates button styling in the ActionButtons component
- Improves theme consistency by replacing hardcoded colors with theme variables
- Fixes text color issues in login page components
- Ensures proper color contrast in various UI elements
The masonry layout was also improved to properly re-render when documents are removed.
### TL;DR
Upgraded Biome to v2.2.0 and added a new AI SDK package for supermemory integration.
### What changed?
- Updated Biome configuration with enhanced linting rules and formatting options
- Upgraded `@biomejs/biome` from v2.1.3 to v2.2.0
- Added a new `@supermemory/ai-sdk` package with:
- Infinite Chat Provider for connecting to various LLM providers with unlimited context
- Memory Tools for searching, adding, and fetching memories from supermemory
- Comprehensive test suite for both features
- Detailed README with usage examples and configuration options
- Removed unused ESLint and TypeScript configuration packages
### How to test?
1. Run `bun install` to update dependencies
2. Test the new AI SDK:
3. Verify Biome works with the updated configuration:
### Why make this change?
The new AI SDK package provides integration with Vercel's AI SDK, allowing developers to use supermemory's context management with various LLM providers. This enables unlimited context support and memory tools for AI agents. The Biome upgrade brings improved linting and formatting capabilities, enhancing code quality across the project.