Parcourir la source

免登录版本注释掉 【拓展问题】功能

Ryuiso il y a 1 semaine
Parent
commit
cb608c6f34
1 fichiers modifiés avec 72 ajouts et 72 suppressions
  1. 72 72
      app/components/chat.tsx

+ 72 - 72
app/components/chat.tsx

@@ -617,37 +617,37 @@ export function ChatActions(props: {
     }
     }
   }, [chatStore, currentModel, models]);
   }, [chatStore, currentModel, models]);
 
 
-  const fetchGuessList = async (record: { content: string; role: string }) => {
-    try {
-      const data = {
-        appId: session.appId,
-        messages: [
-          {
-            content: record.content,
-            role: record.role,
-          }
-        ],
-        chat_id: session.chat_id,
-      }
-      let url = '';
-      if (chatStore.chatMode === 'LOCAL') {
-        url = '/deepseek/api/async/completions';
-      } else {
-        url = '/bigmodel/api/async/completions';
-      }
-      const res = await api.post(url, data);
-      setGuessList(res.data);
-    } catch (error) {
-      console.error(error);
-    }
-  }
-
-  useEffect(() => {
-    setGuessList([]);
-    if (chatStore.message.content) {
-      fetchGuessList(chatStore.message);
-    }
-  }, [chatStore.message]);
+  // const fetchGuessList = async (record: { content: string; role: string }) => {
+  //   try {
+  //     const data = {
+  //       appId: session.appId,
+  //       messages: [
+  //         {
+  //           content: record.content,
+  //           role: record.role,
+  //         }
+  //       ],
+  //       chat_id: session.chat_id,
+  //     }
+  //     let url = '';
+  //     if (chatStore.chatMode === 'LOCAL') {
+  //       url = '/deepseek/api/async/completions';
+  //     } else {
+  //       url = '/bigmodel/api/async/completions';
+  //     }
+  //     const res = await api.post(url, data);
+  //     setGuessList(res.data);
+  //   } catch (error) {
+  //     console.error(error);
+  //   }
+  // }
+
+  // useEffect(() => {
+  //   setGuessList([]);
+  //   if (chatStore.message.content) {
+  //     fetchGuessList(chatStore.message);
+  //   }
+  // }, [chatStore.message]);
 
 
   useEffect(() => {
   useEffect(() => {
     if (props.isClickStop) {
     if (props.isClickStop) {
@@ -659,45 +659,45 @@ export function ChatActions(props: {
   return (
   return (
     <div className={styles["chat-input-actions"]}>
     <div className={styles["chat-input-actions"]}>
       {
       {
-        props.sendStatus &&
-        <div style={{ color: '#8096ca', fontSize: 13, overflowX: 'auto' }}>
-          <div>
-            你还可以尝试提问:
-          </div>
-          {
-            guessList.length === 0 ?
-              <Space style={{ margin: '10px 0' }}>
-                <Skeleton.Button size="small" active={true} />
-                <Skeleton.Button size="small" active={true} />
-                <Skeleton.Button size="small" active={true} />
-              </Space>
-              :
-              <div style={{ display: 'flex', margin: '10px 0', overflowX: 'auto' }}>
-                {
-                  guessList.map((item, index) => {
-                    return (
-                      <div
-                        style={{
-                          padding: '5px 10px',
-                          background: '#f2f4f8',
-                          borderRadius: 5,
-                          margin: '0 10px 10px 0',
-                          cursor: 'pointer',
-                        }}
-                        onClick={() => {
-                          props.setUserInput(item);
-                          props.doSubmit(item)
-                        }}
-                        key={index}
-                      >
-                        {item}
-                      </div>
-                    )
-                  })
-                }
-              </div>
-          }
-        </div>
+        // props.sendStatus &&
+        // <div style={{ color: '#8096ca', fontSize: 13, overflowX: 'auto' }}>
+        //   <div>
+        //     你还可以尝试提问:
+        //   </div>
+        //   {
+        //     guessList.length === 0 ?
+        //       <Space style={{ margin: '10px 0' }}>
+        //         <Skeleton.Button size="small" active={true} />
+        //         <Skeleton.Button size="small" active={true} />
+        //         <Skeleton.Button size="small" active={true} />
+        //       </Space>
+        //       :
+        //       <div style={{ display: 'flex', margin: '10px 0', overflowX: 'auto' }}>
+        //         {
+        //           guessList.map((item, index) => {
+        //             return (
+        //               <div
+        //                 style={{
+        //                   padding: '5px 10px',
+        //                   background: '#f2f4f8',
+        //                   borderRadius: 5,
+        //                   margin: '0 10px 10px 0',
+        //                   cursor: 'pointer',
+        //                 }}
+        //                 onClick={() => {
+        //                   props.setUserInput(item);
+        //                   props.doSubmit(item)
+        //                 }}
+        //                 key={index}
+        //               >
+        //                 {item}
+        //               </div>
+        //             )
+        //           })
+        //         }
+        //       </div>
+        //   }
+        // </div>
       }
       }
       {/* {couldStop && (
       {/* {couldStop && (
         <ChatAction
         <ChatAction
@@ -2159,7 +2159,7 @@ function _Chat() {
                 <p style={{ textAlign: 'center' }}>
                 <p style={{ textAlign: 'center' }}>
                   {getDesc()}
                   {getDesc()}
                 </p>
                 </p>
-                <p>我猜您可能想问:</p>
+                {/* <p>我猜您可能想问:</p>
                 {
                 {
                   questionList.map((item, index) => {
                   questionList.map((item, index) => {
                     return (
                     return (
@@ -2188,7 +2188,7 @@ function _Chat() {
                       </div>
                       </div>
                     )
                     )
                   })
                   })
-                }
+                } */}
               </div>
               </div>
             </>
             </>
         }
         }