feat: reading indicator

This commit is contained in:
Timothy J. Baek
2024-01-07 03:19:34 -08:00
parent 6271ee64ab
commit 9083ee8a5d
3 changed files with 58 additions and 1 deletions
+4
View File
@@ -22,6 +22,7 @@
let stopResponseFlag = false;
let autoScroll = true;
let processing = '';
let selectedModels = [''];
@@ -192,6 +193,7 @@
console.log(docs);
if (docs.length > 0) {
processing = 'Reading';
const query = history.messages[parentId].content;
let relevantContexts = await Promise.all(
@@ -215,6 +217,7 @@
history.messages[parentId].raContent = RAGTemplate(contextString, query);
history.messages[parentId].contexts = relevantContexts;
await tick();
processing = '';
}
await Promise.all(
@@ -660,6 +663,7 @@
chatId={$chatId}
{selectedModels}
{selectedModelfiles}
{processing}
bind:history
bind:messages
bind:autoScroll