### TL;DR
Added support for conversation grouping in Supermemory middleware through a new `conversationId` parameter.
### What changed?
- Added a new `conversationId` option to the `withSupermemory` function to group messages into a single document for contextual memory generation
- Updated the middleware to use this conversation ID when adding memories, using a `customId` format of `conversation:{conversationId}`
- Created a new `getConversationContent` function that extracts the full conversation content from the prompt parameters
- Enhanced memory storage to save entire conversations rather than just the last user message
- Updated documentation and examples to demonstrate the new parameter usage
### How to test?
1. Import the `withSupermemory` function from the package
2. Create a model with memory using the new `conversationId` parameter:
```typescript
const modelWithMemory = withSupermemory(openai("gpt-4"), "user-123", {
conversationId: "conversation-456",
mode: "full",
addMemory: "always"
})
```
3. Use the model in a conversation and verify that messages are grouped by the conversation ID
4. Check that memories are being stored with the custom ID format `conversation:{conversationId}`
### Why make this change?
This enhancement improves the contextual understanding of the AI by allowing related messages to be grouped together as a single conversation document. By using a conversation ID, the system can maintain coherent memory across multiple interactions within the same conversation thread, providing better context retrieval and more relevant responses.
The issue is whenever a user is trying to log in with an email and a one-time code, the Chrome extension is not able to authenticate. The fix is to add a callback URL with a query parameter of `extension-auth-success` equal to `true`, which will allow the Chrome extension to identify and verify the auth whenever a user is trying to log in into the Chrome extension.
### 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 markdown rendering support to memory content display
- Auto-detect and format JSON responses in code blocks
- Convert terminal commands to bash code blocks
- Improve code block styling with monospace font and compact spacing
### Enhanced the Connect AI Modal with manual configuration options and improved MCP integration.
### What changed?
- Added a new "Manual Config" tab in the MCP URL section that generates and displays API keys for authentication
- Implemented automatic API key generation for manual MCP configuration
- Added URL parameter support (`?mcp=manual`) to directly open the MCP modal with manual configuration
- Improved the UI with better tab labels and more descriptive instructions
- Added copy functionality for configuration JSON with visual feedback
- Refactored the ConnectAIModal component to accept new props: `openInitialClient` and `openInitialTab`
- Added state management for API keys and copied status