nsarrazin HF Staff commited on
Commit
8f1772b
·
1 Parent(s): 034524b

fix: multi-turn bug in docker image

Browse files
src/routes/conversation/[id]/+page.svelte CHANGED
@@ -4,7 +4,7 @@
4
  import { isAborted } from "$lib/stores/isAborted";
5
  import { onMount } from "svelte";
6
  import { page } from "$app/stores";
7
- import { goto, invalidate } from "$app/navigation";
8
  import { base } from "$app/paths";
9
  import { shareConversation } from "$lib/shareConversation";
10
  import { ERROR_MESSAGES, error } from "$lib/stores/errors";
@@ -24,7 +24,6 @@
24
  import { createConvTreeStore } from "$lib/stores/convTree";
25
  import type { v4 } from "uuid";
26
  import { useSettingsStore } from "$lib/stores/settings.js";
27
- import { UrlDependency } from "$lib/types/UrlDependency.js";
28
 
29
  export let data;
30
 
@@ -283,7 +282,7 @@
283
  } finally {
284
  loading = false;
285
  pending = false;
286
- await invalidate(UrlDependency.Conversation);
287
  }
288
  }
289
 
@@ -361,7 +360,7 @@
361
 
362
  async function onContinue(event: CustomEvent<{ id: Message["id"] }>) {
363
  if (!data.shared) {
364
- writeMessage({ messageId: event.detail.id, isContinue: true });
365
  } else {
366
  await convFromShared()
367
  .then(async (convId) => {
 
4
  import { isAborted } from "$lib/stores/isAborted";
5
  import { onMount } from "svelte";
6
  import { page } from "$app/stores";
7
+ import { goto, invalidateAll } from "$app/navigation";
8
  import { base } from "$app/paths";
9
  import { shareConversation } from "$lib/shareConversation";
10
  import { ERROR_MESSAGES, error } from "$lib/stores/errors";
 
24
  import { createConvTreeStore } from "$lib/stores/convTree";
25
  import type { v4 } from "uuid";
26
  import { useSettingsStore } from "$lib/stores/settings.js";
 
27
 
28
  export let data;
29
 
 
282
  } finally {
283
  loading = false;
284
  pending = false;
285
+ await invalidateAll();
286
  }
287
  }
288
 
 
360
 
361
  async function onContinue(event: CustomEvent<{ id: Message["id"] }>) {
362
  if (!data.shared) {
363
+ await writeMessage({ messageId: event.detail.id, isContinue: true });
364
  } else {
365
  await convFromShared()
366
  .then(async (convId) => {