@mastra/ai-sdk 1.6.1 → 1.6.2-alpha.0
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 +9 -0
- package/dist/chat-route.d.ts +3 -2
- package/dist/chat-route.d.ts.map +1 -1
- package/dist/index.cjs +6 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/package.json +12 -12
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { TripWire, MessageList, aiV5ModelMessageToV2PromptMessage } from '@mastr
|
|
|
10
10
|
import { RequestContext } from '@mastra/core/di';
|
|
11
11
|
import { WorkingMemory, MessageHistory, SemanticRecall } from '@mastra/core/processors';
|
|
12
12
|
|
|
13
|
-
// ../../packages/_vendored/ai_v5/dist/chunk-
|
|
13
|
+
// ../../packages/_vendored/ai_v5/dist/chunk-GGFT3DUX.js
|
|
14
14
|
var marker = "vercel.ai.error";
|
|
15
15
|
var symbol = Symbol.for(marker);
|
|
16
16
|
var _a;
|
|
@@ -13871,13 +13871,15 @@ function extractV6NativeApproval(messages) {
|
|
|
13871
13871
|
const lastSep = part.approval.id.lastIndexOf(APPROVAL_ID_SEPARATOR);
|
|
13872
13872
|
if (lastSep === -1) continue;
|
|
13873
13873
|
const runId = part.approval.id.slice(0, lastSep);
|
|
13874
|
-
|
|
13874
|
+
const toolCallId = part.approval.id.slice(lastSep + APPROVAL_ID_SEPARATOR.length);
|
|
13875
|
+
if (!runId || !toolCallId) continue;
|
|
13875
13876
|
return {
|
|
13876
13877
|
resumeData: {
|
|
13877
13878
|
approved: part.approval.approved,
|
|
13878
13879
|
...part.approval.reason != null ? { reason: part.approval.reason } : {}
|
|
13879
13880
|
},
|
|
13880
|
-
runId
|
|
13881
|
+
runId,
|
|
13882
|
+
toolCallId
|
|
13881
13883
|
};
|
|
13882
13884
|
}
|
|
13883
13885
|
return null;
|
|
@@ -13943,6 +13945,7 @@ async function handleChatStream({
|
|
|
13943
13945
|
...defaultOptionsRest,
|
|
13944
13946
|
...restOptions,
|
|
13945
13947
|
...effectiveRunId && { runId: effectiveRunId },
|
|
13948
|
+
...nativeApproval?.toolCallId && { toolCallId: nativeApproval.toolCallId },
|
|
13946
13949
|
requestContext: requestContext || defaultOptions3?.requestContext,
|
|
13947
13950
|
...Object.keys(mergedProviderOptions).length > 0 && { providerOptions: mergedProviderOptions }
|
|
13948
13951
|
};
|