Patch apiChatHandler to include agent chats (#3905)

patch apiChatHandler to include agent chats
This commit is contained in:
Sean Hatfield 2025-06-03 14:39:55 -07:00 committed by GitHub
parent 337d46d178
commit 0c9817ad59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -434,7 +434,6 @@ async function streamChat({
return eventListener
.streamAgentEvents(response, uuid)
.then(async ({ thoughts, textResponse }) => {
console.log({ thoughts, textResponse });
await WorkspaceChats.new({
workspaceId: workspace.id,
prompt: String(message),
@ -445,7 +444,8 @@ async function streamChat({
type: chatMode,
thoughts,
},
include: false,
include: true,
threadId: thread?.id || null,
apiSessionId: sessionId,
});
writeResponseChunk(response, {