@mcpjam/widget-react 0.1.2 → 0.1.3
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 +6 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -769,7 +769,9 @@ function useToolInputStreaming({
|
|
|
769
769
|
const outputKey = `${toolCallId}:${serialized}`;
|
|
770
770
|
if (lastToolOutputRef.current === outputKey) return;
|
|
771
771
|
lastToolOutputRef.current = outputKey;
|
|
772
|
-
bridge.sendToolResult(
|
|
772
|
+
bridge.sendToolResult(
|
|
773
|
+
toolOutput
|
|
774
|
+
);
|
|
773
775
|
}, [isReady, toolCallId, toolOutput, toolState, bridgeRef, reinitCount]);
|
|
774
776
|
useEffect(() => {
|
|
775
777
|
if (!isReady || toolState !== "output-error") return;
|
|
@@ -1158,7 +1160,9 @@ function McpAppsModal({
|
|
|
1158
1160
|
const resolvedToolInput = toolInputRef.current ?? {};
|
|
1159
1161
|
bridge.sendToolInput({ arguments: resolvedToolInput });
|
|
1160
1162
|
if (toolOutputRef.current) {
|
|
1161
|
-
bridge.sendToolResult(
|
|
1163
|
+
bridge.sendToolResult(
|
|
1164
|
+
toolOutputRef.current
|
|
1165
|
+
);
|
|
1162
1166
|
}
|
|
1163
1167
|
const appCaps = bridge.getAppCapabilities();
|
|
1164
1168
|
if (appCaps?.tools) {
|