فهرست منبع

预设问题修复

李富豪 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);