Skip to content

Commit

Permalink
feat: add toolName to addToolResult callback (#735)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yonom authored Sep 6, 2024
1 parent 456d8f1 commit 31616d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/react/src/context/stores/ThreadActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { SpeechSynthesisAdapter } from "../../runtimes/speech/SpeechAdapterTypes

export type AddToolResultOptions = {
messageId: string;
toolName: string;
toolCallId: string;
result: any;
};
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/primitives/message/MessageContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ const MessageContentPartComponent: FC<MessageContentPartComponentProps> = ({
const addResult = (result: any) =>
addToolResult({
messageId: useMessage.getState().message.id,
toolName: part.toolName,
toolCallId: part.toolCallId,
result,
});
Expand Down

0 comments on commit 31616d3

Please sign in to comment.