We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4af067a commit 6e2f2dfCopy full SHA for 6e2f2df
1 file changed
packages/components/nodes/agentflow/HumanInput/HumanInput.ts
@@ -208,7 +208,7 @@ class HumanInput_Agentflow implements INode {
208
humanInputDescription = (nodeData.inputs?.humanInputDescription as string) || 'Do you want to proceed?'
209
const messages = [...pastChatHistory, ...runtimeChatHistory]
210
// Find the last message in the messages array
211
- const lastMessage = (messages[messages.length - 1] as any).content || ''
+ const lastMessage = messages.length > 0 ? (messages[messages.length - 1] as any).content || '' : ''
212
humanInputDescription = `${lastMessage}\n\n${humanInputDescription}`
213
if (isStreamable) {
214
const sseStreamer: IServerSideEventStreamer = options.sseStreamer as IServerSideEventStreamer
0 commit comments