Skip to content

Commit

Permalink
use correct key to determine toolUse in reconcilliation
Browse files Browse the repository at this point in the history
  • Loading branch information
atierian committed Oct 18, 2024
1 parent 8d480ca commit 5b5d2e2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ function reduceChunks(events) {
const content = Object.keys(groupedEvents).map((index) => {
const contentBlock = groupedEvents[index];
// toolUse blocks are sent as a single event.
if (contentBlock.length === 1 && contentBlock[0].toolUseId) {
return { toolUse: contentBlock[0] };
if (contentBlock.length === 1 && contentBlock[0].toolUse) {
return { toolUse: contentBlock[0].toolUse };
}
// text blocks are chunked so we join them.
return { text: contentBlock.join('') };
Expand Down

0 comments on commit 5b5d2e2

Please sign in to comment.