Merge branch 'release/v0.2.4' of github.com:SuanmoSuanyangTechnology/MemoryBear into release/v0.2.4
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
* @Author: ZhaoYing
|
* @Author: ZhaoYing
|
||||||
* @Date: 2025-12-10 16:46:14
|
* @Date: 2025-12-10 16:46:14
|
||||||
* @Last Modified by: ZhaoYing
|
* @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 { type FC, useEffect, useMemo } from 'react'
|
||||||
import { Flex, Input, Form } from 'antd'
|
import { Flex, Input, Form } from 'antd'
|
||||||
@@ -60,6 +60,7 @@ const ChatInput: FC<ChatInputProps> = ({
|
|||||||
}, [fileList])
|
}, [fileList])
|
||||||
|
|
||||||
const handleSend = () => {
|
const handleSend = () => {
|
||||||
|
if (loading || !values || !values?.message || values?.message?.trim() === '') return
|
||||||
onSend(values.message)
|
onSend(values.message)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: ZhaoYing
|
* @Author: ZhaoYing
|
||||||
* @Date: 2026-02-03 16:27:39
|
* @Date: 2026-02-03 16:27:39
|
||||||
* @Last Modified by: ZhaoYing
|
* @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
|
* Chat debugging component for application testing
|
||||||
@@ -61,6 +61,8 @@ const Chat: FC<ChatProps> = ({ chatList, data, updateChatList, handleSave, sourc
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setIsCluster(source === 'multi_agent')
|
setIsCluster(source === 'multi_agent')
|
||||||
|
setFileList([])
|
||||||
|
setMessage(undefined)
|
||||||
}, [source])
|
}, [source])
|
||||||
|
|
||||||
/** Add user message to all chat lists */
|
/** Add user message to all chat lists */
|
||||||
@@ -388,7 +390,6 @@ const Chat: FC<ChatProps> = ({ chatList, data, updateChatList, handleSave, sourc
|
|||||||
setFileList([...list || []])
|
setFileList([...list || []])
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('chatList', chatList, fileList)
|
|
||||||
return (
|
return (
|
||||||
<div className="rb:relative rb:h-full rb:flex rb:flex-col">
|
<div className="rb:relative rb:h-full rb:flex rb:flex-col">
|
||||||
{chatList.length === 0
|
{chatList.length === 0
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: ZhaoYing
|
* @Author: ZhaoYing
|
||||||
* @Date: 2026-02-06 21:10:56
|
* @Date: 2026-02-06 21:10:56
|
||||||
* @Last Modified by: ZhaoYing
|
* @Last Modified by: ZhaoYing
|
||||||
* @Last Modified time: 2026-02-06 21:10:56
|
* @Last Modified time: 2026-02-10 12:17:41
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Workflow Chat Component
|
* Workflow Chat Component
|
||||||
@@ -99,6 +99,8 @@ const Chat = forwardRef<ChatRef, { appId: string; graphRef: GraphRef }>(({ appId
|
|||||||
setChatList([])
|
setChatList([])
|
||||||
setVariables([])
|
setVariables([])
|
||||||
setConversationId(null)
|
setConversationId(null)
|
||||||
|
setMessage(undefined)
|
||||||
|
setFileList([])
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Opens the variable configuration modal
|
* Opens the variable configuration modal
|
||||||
@@ -148,7 +150,7 @@ const Chat = forwardRef<ChatRef, { appId: string; graphRef: GraphRef }>(({ appId
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// setLoading(true)
|
setLoading(true)
|
||||||
const message = msg
|
const message = msg
|
||||||
setChatList(prev => [...prev, {
|
setChatList(prev => [...prev, {
|
||||||
role: 'user',
|
role: 'user',
|
||||||
@@ -284,6 +286,7 @@ const Chat = forwardRef<ChatRef, { appId: string; graphRef: GraphRef }>(({ appId
|
|||||||
return newList
|
return newList
|
||||||
})
|
})
|
||||||
setStreamLoading(false)
|
setStreamLoading(false)
|
||||||
|
setLoading(false)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user