reactbridge-sdk 0.2.19 → 0.2.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -528,8 +528,9 @@ function useReactBridge({ onIntentDetected, currentContext, onError, onSpeechSta
528
528
  let previousResultResponse = null;
529
529
  while (currentToolCall && toolCallCount < maxToolCalls) {
530
530
  toolCallCount++;
531
- // Execute the current tool
532
- const toolResult = yield onIntentDetected(currentToolCall);
531
+ // Execute the current tool with isSequential flag for chained calls
532
+ const toolResultToolCall = Object.assign(Object.assign({}, currentToolCall), { isSequential: toolCallCount > 1 });
533
+ const toolResult = yield onIntentDetected(toolResultToolCall);
533
534
  // Step 3: Send tool result back to orchestrator
534
535
  if (lastRequestRef.current && currentResponse.sessionId) {
535
536
  const resultResponse = yield api.sendToolResult(currentResponse.sessionId, toolResult, lastRequestRef.current);