Revert "chore: cleanup context window ui, adjust for reasoning + added db migration" (#1169)
This commit is contained in:
parent
02dde68ea3
commit
d3b3449eb8
13 changed files with 142 additions and 873 deletions
|
|
@ -18,7 +18,6 @@ import {
|
|||
saveChat,
|
||||
saveMessages,
|
||||
} from '@/lib/db/queries';
|
||||
import { updateChatLastContextById } from '@/lib/db/queries';
|
||||
import { convertToUIMessages, generateUUID } from '@/lib/utils';
|
||||
import { generateTitleFromUserMessage } from '../../actions';
|
||||
import { createDocument } from '@/lib/ai/tools/create-document';
|
||||
|
|
@ -209,17 +208,6 @@ export async function POST(request: Request) {
|
|||
chatId: id,
|
||||
})),
|
||||
});
|
||||
|
||||
if (finalUsage) {
|
||||
try {
|
||||
await updateChatLastContextById({
|
||||
chatId: id,
|
||||
context: finalUsage,
|
||||
});
|
||||
} catch (err) {
|
||||
console.warn('Unable to persist last usage for chat', id, err);
|
||||
}
|
||||
}
|
||||
},
|
||||
onError: () => {
|
||||
return 'Oops, an error occurred!';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue