feat: /messages chat endpoint support

This commit is contained in:
Timothy Jaeryang Baek
2025-03-26 01:10:27 -07:00
parent 7dcdb1b404
commit 1be6ad1250
3 changed files with 84 additions and 32 deletions

View File

@@ -293,18 +293,10 @@
} else if (type === 'chat:tags') {
chat = await getChatById(localStorage.token, $chatId);
allTags.set(await getAllTags(localStorage.token));
} else if (type === 'message') {
} else if (type === 'chat:message:delta' || type === 'message') {
message.content += data.content;
} else if (type === 'replace') {
} else if (type === 'chat:message' || type === 'replace') {
message.content = data.content;
} else if (type === 'action') {
if (data.action === 'continue') {
const continueButton = document.getElementById('continue-response-button');
if (continueButton) {
continueButton.click();
}
}
} else if (type === 'confirmation') {
eventCallback = cb;