@mastra/playground-ui 6.9.5 → 6.9.6
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/CHANGELOG.md +64 -0
- package/dist/index.cjs.js +18 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +18 -0
- package/dist/index.es.js.map +1 -1
- package/dist/src/types.d.ts +2 -2
- package/package.json +6 -6
package/dist/index.es.js
CHANGED
|
@@ -10419,6 +10419,24 @@ const initializeMessageState = (initialMessages) => {
|
|
|
10419
10419
|
args: part.toolInvocation.args,
|
|
10420
10420
|
result: part.toolInvocation.result
|
|
10421
10421
|
};
|
|
10422
|
+
} else if (part.toolInvocation.state === "call") {
|
|
10423
|
+
const toolCallId = part.toolInvocation.toolCallId;
|
|
10424
|
+
const pendingToolApprovals = message.metadata?.pendingToolApprovals;
|
|
10425
|
+
const suspensionData = pendingToolApprovals?.[toolCallId];
|
|
10426
|
+
if (suspensionData) {
|
|
10427
|
+
return {
|
|
10428
|
+
type: "tool-call",
|
|
10429
|
+
toolCallId,
|
|
10430
|
+
toolName: part.toolInvocation.toolName,
|
|
10431
|
+
args: part.toolInvocation.args,
|
|
10432
|
+
metadata: {
|
|
10433
|
+
mode: "stream",
|
|
10434
|
+
requireApprovalMetadata: {
|
|
10435
|
+
[toolCallId]: suspensionData
|
|
10436
|
+
}
|
|
10437
|
+
}
|
|
10438
|
+
};
|
|
10439
|
+
}
|
|
10422
10440
|
}
|
|
10423
10441
|
}
|
|
10424
10442
|
if (part.type === "file") {
|