feat: chat stream messages
This commit is contained in:
1 parent
bc71fa4d59
commit
5d2f7609f4
5 files changed
+131
-10
No files matched your search
@@ -84,6 +84,7 @@
|
||||
for (let entry of messages.value) {
|
||||
if (entry.id == it.id) {
|
||||
entry.type = it.kind;
|
||||
entry.format = it.format;
|
||||
entry.content = it.content;
|
||||
entry.threadId = it.threadId;
|
||||
return;
|
||||
@@ -108,6 +109,7 @@
|
||||
addMessage({
|
||||
id: it.id,
|
||||
type: it.kind,
|
||||
format: it.format,
|
||||
sender: it.sender,
|
||||
content: it.content,
|
||||
threadId: it.threadId,
|
||||
@@ -163,7 +165,6 @@
|
||||
}
|
||||
runListener.addRunId(event.runId);
|
||||
messageRunMap.value[event.messageId] = event.runId;
|
||||
ui.alert("Chat Run Message: " + JSON.stringify(event));
|
||||
}
|
||||
|
||||
function onRunUpdate (newRun) {
|
||||
@@ -335,7 +336,7 @@
|
||||
|
||||
async function startNewThread () {
|
||||
const res = await backend.sendAction("create-chat-thread", {chatId});
|
||||
console.log("Starting a nedeleteChatw thread", res);
|
||||
console.log("Starting a new thread", res);
|
||||
if (res.threadId != null) {
|
||||
currentThreadId.value = res.threadId;
|
||||
expandThread(res.threadId, true);
|
||||
|
||||
Reference in new issue
Block a user