Timothy Jaeryang Baek 3 月之前
父节点
当前提交
266899acc0
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/lib/components/chat/Suggestions.svelte

+ 2 - 2
src/lib/components/chat/Suggestions.svelte

@@ -53,10 +53,10 @@
 		}
 	};
 
-	onMount(() => {
+	$: if (suggestionPrompts) {
 		sortedPrompts = [...(suggestionPrompts ?? [])].sort(() => Math.random() - 0.5);
 		getFilteredPrompts(inputValue);
-	});
+	}
 </script>
 
 <div class="mb-1 flex gap-1 text-xs font-medium items-center text-gray-400 dark:text-gray-600">