done tool fix

This commit is contained in:
dal 2025-08-18 10:43:15 -06:00
parent 6d1a0b6c86
commit 35e0fc27d7
No known key found for this signature in database
GPG Key ID: 16F4B0E1E9F61122
3 changed files with 6 additions and 6 deletions

View File

@ -39,7 +39,10 @@ export function createDoneToolDelta(context: DoneToolContext, doneToolState: Don
doneToolState,
options.toolCallId
);
const doneToolMessage = createDoneToolRawLlmMessageEntry(doneToolState, options.toolCallId);
const doneToolMessage = createDoneToolRawLlmMessageEntry(
doneToolState,
options.toolCallId || ''
);
const entries: UpdateMessageEntriesParams = {
messageId: context.messageId,

View File

@ -38,12 +38,8 @@ export function createDoneToolRawLlmMessageEntry(
type: 'tool-call',
toolCallId: id,
toolName: 'doneTool',
input: {},
input: { finalResponse: doneToolState.finalResponse || '' },
},
// Optionally include any accumulated text content
...(doneToolState.finalResponse
? [{ type: 'text' as const, text: doneToolState.finalResponse }]
: []),
],
};
}