Skip to content

Commit 0c01757

Browse files
committed
fix: fix add string user input to history of user messages
1 parent 56c86d8 commit 0c01757

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

packages/ui/src/views/chatmessage/ChatMessage.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,16 +1023,16 @@ const ChatMessage = ({ open, chatflowid, isAgentCanvas, isDialog, previews, setP
10231023

10241024
if (typeof selectedInput === 'string') {
10251025
if (selectedInput !== undefined && selectedInput.trim() !== '') input = selectedInput
1026-
1027-
if (input.trim()) {
1028-
inputHistory.addToHistory(input)
1029-
}
10301026
} else if (typeof selectedInput === 'object') {
10311027
input = Object.entries(selectedInput)
10321028
.map(([key, value]) => `${key}: ${value}`)
10331029
.join('\n')
10341030
}
10351031

1032+
if (input.trim()) {
1033+
inputHistory.addToHistory(input)
1034+
}
1035+
10361036
setLoading(true)
10371037
clearAgentflowNodeStatus()
10381038

0 commit comments

Comments
 (0)