瀏覽代碼

预设问题修复

李富豪 6 月之前
父節點
當前提交
6146e14f34
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      app/components/chat.tsx

+ 10 - 0
app/components/chat.tsx

@@ -1076,6 +1076,16 @@ function _Chat() {
     await fetchApplicationList();
   }
 
+  useEffect(() => {
+    const search = location.search;
+    const params = new URLSearchParams(search);
+    const chatMode = params.get('chatMode');
+
+    if (chatMode) {
+      setSelectedFruit(chatMode as "ONLINE" | "LOCAL");
+    }
+  }, [])
+
   useEffect(() => {
     if (appValue) {
       fetchDefaultQuestion(appValue);