reactbridge-sdk 0.2.18 → 0.2.19

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,CA6R9C"}
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"}
package/dist/index.esm.js CHANGED
@@ -532,7 +532,10 @@ function useReactBridge({ onIntentDetected, currentContext, onError, onSpeechSta
532
532
  if (lastRequestRef.current && currentResponse.sessionId) {
533
533
  const resultResponse = yield api.sendToolResult(currentResponse.sessionId, toolResult, lastRequestRef.current);
534
534
  // Check if result is identical to previous one (prevent infinite loops on duplicate responses)
535
- const currentResultString = JSON.stringify(resultResponse);
535
+ const currentResultString = JSON.stringify({
536
+ message: resultResponse.message,
537
+ toolCall: resultResponse.toolCall,
538
+ });
536
539
  if (previousResultResponse === currentResultString) {
537
540
  console.warn("Identical tool response detected. Exiting loop to prevent infinite loop.");
538
541
  currentToolCall = null;