Merge branch 'main' of https://github.com/huggingface/chat-ui
Browse files
src/routes/conversation/[id]/+page.svelte
CHANGED
@@ -14,6 +14,7 @@
|
|
14 |
|
15 |
const hf = new HfInference();
|
16 |
|
|
|
17 |
let loading = false;
|
18 |
let pending = false;
|
19 |
|
@@ -43,7 +44,7 @@
|
|
43 |
for await (const data of response) {
|
44 |
pending = false;
|
45 |
|
46 |
-
if (!data) break;
|
47 |
|
48 |
if (!data.token.special) {
|
49 |
const lastMessage = messages.at(-1);
|
|
|
14 |
|
15 |
const hf = new HfInference();
|
16 |
|
17 |
+
let conversationId = $page.params.id;
|
18 |
let loading = false;
|
19 |
let pending = false;
|
20 |
|
|
|
44 |
for await (const data of response) {
|
45 |
pending = false;
|
46 |
|
47 |
+
if (!data || conversationId !== $page.params.id) break;
|
48 |
|
49 |
if (!data.token.special) {
|
50 |
const lastMessage = messages.at(-1);
|