fix: chat memory lost between messages + per-note history
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m11s
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m11s
Chat (AIChat floating widget): conversationId was never captured from the API response, so every message created a new conversation with no context. Now creates the conversation upfront before streaming (same pattern as ChatContainer) so the ID persists across messages. Note history: was stored globally in UserAISettings, so enabling history on one note enabled it for ALL notes. Now each Note has its own historyEnabled boolean field. The "Enable history" action only affects the specific note. A migration adds the column with default false. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -142,7 +142,7 @@ export async function PUT(
|
||||
})
|
||||
|
||||
try {
|
||||
const historyEnabled = await isNoteHistoryEnabledForUser(session.user.id)
|
||||
const historyEnabled = existingNote.historyEnabled === true
|
||||
if (historyEnabled && shouldCaptureHistorySnapshot(updateData)) {
|
||||
const mode = await getNoteHistoryMode(session.user.id)
|
||||
if (mode === 'auto') {
|
||||
|
||||
Reference in New Issue
Block a user