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.
@@ -1 +1 @@
1
- {"version":3,"file":"useReactBridge.d.ts","sourceRoot":"","sources":["../../src/hooks/useReactBridge.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,qBAAqB,EACrB,oBAAoB,EAIrB,MAAM,UAAU,CAAC;AAElB,wBAAgB,cAAc,CAAC,EAC7B,gBAAgB,EAChB,cAAc,EACd,OAAO,EACP,aAAa,EACb,WAAW,EACX,YAAY,EACZ,eAAe,GAChB,EAAE,qBAAqB,GAAG,oBAAoB,CAgS9C"}
1
+ {"version":3,"file":"useReactBridge.d.ts","sourceRoot":"","sources":["../../src/hooks/useReactBridge.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,qBAAqB,EACrB,oBAAoB,EAIrB,MAAM,UAAU,CAAC;AAElB,wBAAgB,cAAc,CAAC,EAC7B,gBAAgB,EAChB,cAAc,EACd,OAAO,EACP,aAAa,EACb,WAAW,EACX,YAAY,EACZ,eAAe,GAChB,EAAE,qBAAqB,GAAG,oBAAoB,CAoS9C"}
package/dist/index.esm.js CHANGED
@@ -526,8 +526,9 @@ function useReactBridge({ onIntentDetected, currentContext, onError, onSpeechSta
526
526
  let previousResultResponse = null;
527
527
  while (currentToolCall && toolCallCount < maxToolCalls) {
528
528
  toolCallCount++;
529
- // Execute the current tool
530
- const toolResult = yield onIntentDetected(currentToolCall);
529
+ // Execute the current tool with isSequential flag for chained calls
530
+ const toolResultToolCall = Object.assign(Object.assign({}, currentToolCall), { isSequential: toolCallCount > 1 });
531
+ const toolResult = yield onIntentDetected(toolResultToolCall);
531
532
  // Step 3: Send tool result back to orchestrator
532
533
  if (lastRequestRef.current && currentResponse.sessionId) {
533
534
  const resultResponse = yield api.sendToolResult(currentResponse.sessionId, toolResult, lastRequestRef.current);