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 7e13f01 commit 985ef5bCopy full SHA for 985ef5b
src/mapping.ts
@@ -204,7 +204,7 @@ export async function serializeNewMessagesInStep<TOOLS extends ToolSet>(
204
} satisfies Omit<MessageWithMetadata, "message" | "text" | "fileIds">;
205
const toolFields = { sources: step.sources };
206
const messages: MessageWithMetadata[] = await Promise.all(
207
- (step.toolResults.length > 0
+ (step.finishReason === "tool-calls"
208
? step.response.messages.slice(-2)
209
: step.content.length
210
? step.response.messages.slice(-1)
0 commit comments