李富豪 vor 7 Monaten
Ursprung
Commit
a11354b66f
2 geänderte Dateien mit 4 neuen und 6 gelöschten Zeilen
  1. 1 3
      app/client/platforms/deepSeek.ts
  2. 3 3
      app/components/DeepSeekChat.tsx

+ 1 - 3
app/client/platforms/deepSeek.ts

@@ -192,9 +192,7 @@ export class DeepSeekApi implements LLMApi {
               document: item.document,
             })),
           };
-          if (session.appId) {
-            await api.post('bigmodel/api/dialog/save', data);
-          }
+          await api.post('bigmodel/api/dialog/save', data);
         },
         onerror(e) {
           options.onError?.(e);

+ 3 - 3
app/components/DeepSeekChat.tsx

@@ -866,7 +866,7 @@ function _Chat() {
     }
   };
 
-  const doSubmit = (userInput: string, fileList?: any[]) => {
+  const doSubmit = (userInput: string) => {
     if (userInput.trim() === "") return;
     const matchCommand = chatCommands.match(userInput);
     if (matchCommand.matched) {
@@ -876,7 +876,7 @@ function _Chat() {
       return;
     }
     setIsLoading(true);
-    chatStore.onUserInput(fileList || [], userInput, attachImages).then(() => setIsLoading(false));
+    chatStore.onUserInput(fileList, userInput, attachImages).then(() => setIsLoading(false));
     setAttachImages([]);
     localStorage.setItem(LAST_INPUT_KEY, userInput);
     setUserInput("");
@@ -1615,7 +1615,7 @@ function _Chat() {
               style={{
                 width: 35, height: 35, borderRadius: '50%', background: '#4357d2', display: 'flex', justifyContent: 'center', alignItems: 'center', cursor: 'pointer'
               }}
-              onClick={() => doSubmit(userInput, fileList)}
+              onClick={() => doSubmit(userInput)}
             >
               <div style={{ transform: 'rotate(-45deg)', padding: '0px 0px 3px 5px' }}>
                 <SendOutlined style={{ color: '#FFFFFF' }} />