diff --git a/packages/react/src/context/stores/ThreadActions.ts b/packages/react/src/context/stores/ThreadActions.ts index da0cb15be..850feea1a 100644 --- a/packages/react/src/context/stores/ThreadActions.ts +++ b/packages/react/src/context/stores/ThreadActions.ts @@ -6,6 +6,7 @@ import { SpeechSynthesisAdapter } from "../../runtimes/speech/SpeechAdapterTypes export type AddToolResultOptions = { messageId: string; + toolName: string; toolCallId: string; result: any; }; diff --git a/packages/react/src/primitives/message/MessageContent.tsx b/packages/react/src/primitives/message/MessageContent.tsx index 080b0aea1..6fb9b159d 100644 --- a/packages/react/src/primitives/message/MessageContent.tsx +++ b/packages/react/src/primitives/message/MessageContent.tsx @@ -106,6 +106,7 @@ const MessageContentPartComponent: FC = ({ const addResult = (result: any) => addToolResult({ messageId: useMessage.getState().message.id, + toolName: part.toolName, toolCallId: part.toolCallId, result, });