Skip to content

Commit 8770d19

Browse files
committed
fix: fix add string user input to history of user messages
1 parent 104dec2 commit 8770d19

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
@@ -980,16 +980,16 @@ const ChatMessage = ({ open, chatflowid, isAgentCanvas, isDialog, previews, setP
980980

981981
if (typeof selectedInput === 'string') {
982982
if (selectedInput !== undefined && selectedInput.trim() !== '') input = selectedInput
983-
984-
if (input.trim()) {
985-
inputHistory.addToHistory(input)
986-
}
987983
} else if (typeof selectedInput === 'object') {
988984
input = Object.entries(selectedInput)
989985
.map(([key, value]) => `${key}: ${value}`)
990986
.join('\n')
991987
}
992988

989+
if (input.trim()) {
990+
inputHistory.addToHistory(input)
991+
}
992+
993993
setLoading(true)
994994
clearAgentflowNodeStatus()
995995

0 commit comments

Comments
 (0)