Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions server/jobs/helpers/scheduled-job-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ function agentActionCb() {
return;
}

// Final message from agent (onMessage event)
if (data.content && data.from && data.from !== "USER") {
if (!state.textResponse) state.textResponse = data.content;
}
// The final agent message is the complete reply for the last round, the same
// value chat-history persists for normal chats. Streamed chunks span every
// round, so they are only a fallback when no final message arrives (e.g. timeout).
if (data.content && data.from && data.from !== "USER")
state.textResponse = data.content;
},
close() {},
};
Expand Down
Loading