diff --git a/web/src/components/Chat/ChatInput.tsx b/web/src/components/Chat/ChatInput.tsx index 4fe6592b..c155bb22 100644 --- a/web/src/components/Chat/ChatInput.tsx +++ b/web/src/components/Chat/ChatInput.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2025-12-10 16:46:14 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-09 10:26:38 + * @Last Modified time: 2026-02-10 12:13:52 */ import { type FC, useEffect, useMemo } from 'react' import { Flex, Input, Form } from 'antd' @@ -60,6 +60,7 @@ const ChatInput: FC = ({ }, [fileList]) const handleSend = () => { + if (loading || !values || !values?.message || values?.message?.trim() === '') return onSend(values.message) } diff --git a/web/src/views/ApplicationConfig/components/Chat.tsx b/web/src/views/ApplicationConfig/components/Chat.tsx index 70194650..effb34c3 100644 --- a/web/src/views/ApplicationConfig/components/Chat.tsx +++ b/web/src/views/ApplicationConfig/components/Chat.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 16:27:39 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-09 10:52:55 + * @Last Modified time: 2026-02-10 12:18:23 */ /** * Chat debugging component for application testing @@ -61,6 +61,8 @@ const Chat: FC = ({ chatList, data, updateChatList, handleSave, sourc useEffect(() => { setIsCluster(source === 'multi_agent') + setFileList([]) + setMessage(undefined) }, [source]) /** Add user message to all chat lists */ @@ -388,7 +390,6 @@ const Chat: FC = ({ chatList, data, updateChatList, handleSave, sourc setFileList([...list || []]) } - console.log('chatList', chatList, fileList) return (
{chatList.length === 0 diff --git a/web/src/views/Workflow/components/Chat/Chat.tsx b/web/src/views/Workflow/components/Chat/Chat.tsx index cecfa5f6..95f43a9c 100644 --- a/web/src/views/Workflow/components/Chat/Chat.tsx +++ b/web/src/views/Workflow/components/Chat/Chat.tsx @@ -1,8 +1,8 @@ /* * @Author: ZhaoYing * @Date: 2026-02-06 21:10:56 - * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-06 21:10:56 + * @Last Modified by: ZhaoYing + * @Last Modified time: 2026-02-10 12:17:41 */ /** * Workflow Chat Component @@ -99,6 +99,8 @@ const Chat = forwardRef(({ appId setChatList([]) setVariables([]) setConversationId(null) + setMessage(undefined) + setFileList([]) } /** * Opens the variable configuration modal @@ -148,7 +150,7 @@ const Chat = forwardRef(({ appId return } - // setLoading(true) + setLoading(true) const message = msg setChatList(prev => [...prev, { role: 'user', @@ -284,6 +286,7 @@ const Chat = forwardRef(({ appId return newList }) setStreamLoading(false) + setLoading(false) break }