fix: embeded chat app input (#2159)

This commit is contained in:
zxhlyh 2024-01-24 12:37:12 +08:00 committed by GitHub
parent 48d5628fd4
commit 7bfdca7a53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -385,6 +385,7 @@ const Main: FC<IMainProps> = ({
const [messageTaskId, setMessageTaskId] = useState('') const [messageTaskId, setMessageTaskId] = useState('')
const [hasStopResponded, setHasStopResponded, getHasStopResponded] = useGetState(false) const [hasStopResponded, setHasStopResponded, getHasStopResponded] = useGetState(false)
const [shouldReload, setShouldReload] = useState(false) const [shouldReload, setShouldReload] = useState(false)
const [userQuery, setUserQuery] = useState('')
const [visionConfig, setVisionConfig] = useState<VisionSettings>({ const [visionConfig, setVisionConfig] = useState<VisionSettings>({
enabled: false, enabled: false,
number_limits: 2, number_limits: 2,
@ -622,6 +623,8 @@ const Main: FC<IMainProps> = ({
<div className='h-full overflow-y-auto' ref={chatListDomRef}> <div className='h-full overflow-y-auto' ref={chatListDomRef}>
<Chat <Chat
chatList={chatList} chatList={chatList}
query={userQuery}
onQueryChange={setUserQuery}
onSend={handleSend} onSend={handleSend}
isHideFeedbackEdit isHideFeedbackEdit
onFeedback={handleFeedback} onFeedback={handleFeedback}