@mcp-use/agent 2.0.24 → 2.0.25-canary.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/dist/.tsbuildinfo +1 -1
- package/dist/index.js +16 -13
- package/dist/index.js.map +1 -1
- package/dist/langchain.js +1 -1
- package/dist/llm/providers/openai-responses.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2163,12 +2163,15 @@ async function* streamResponsesTurn(params) {
|
|
|
2163
2163
|
const callId = typeof item.call_id === "string" ? item.call_id : `call_${nextIndex}`;
|
|
2164
2164
|
const name = typeof item.name === "string" ? item.name : "";
|
|
2165
2165
|
const idx = nextIndex++;
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2166
|
+
if (typeof item.id === "string") {
|
|
2167
|
+
callBuffers.set(item.id, {
|
|
2168
|
+
index: idx,
|
|
2169
|
+
callId,
|
|
2170
|
+
name,
|
|
2171
|
+
argsJson: "",
|
|
2172
|
+
started: true
|
|
2173
|
+
});
|
|
2174
|
+
}
|
|
2172
2175
|
yield {
|
|
2173
2176
|
type: "tool-call-start",
|
|
2174
2177
|
index: idx,
|
|
@@ -2179,15 +2182,15 @@ async function* streamResponsesTurn(params) {
|
|
|
2179
2182
|
continue;
|
|
2180
2183
|
}
|
|
2181
2184
|
if (type === "response.function_call_arguments.delta") {
|
|
2182
|
-
const
|
|
2185
|
+
const itemId = typeof parsed.item_id === "string" ? parsed.item_id : "";
|
|
2183
2186
|
const delta = typeof parsed.delta === "string" ? parsed.delta : "";
|
|
2184
|
-
const buf = callBuffers.get(
|
|
2187
|
+
const buf = callBuffers.get(itemId);
|
|
2185
2188
|
if (buf && delta.length > 0) {
|
|
2186
2189
|
buf.argsJson += delta;
|
|
2187
2190
|
yield {
|
|
2188
2191
|
type: "tool-call-args-delta",
|
|
2189
2192
|
index: buf.index,
|
|
2190
|
-
toolCallId: callId,
|
|
2193
|
+
toolCallId: buf.callId,
|
|
2191
2194
|
toolName: buf.name,
|
|
2192
2195
|
argsDelta: delta
|
|
2193
2196
|
};
|
|
@@ -2195,15 +2198,15 @@ async function* streamResponsesTurn(params) {
|
|
|
2195
2198
|
continue;
|
|
2196
2199
|
}
|
|
2197
2200
|
if (type === "response.function_call_arguments.done") {
|
|
2198
|
-
const
|
|
2201
|
+
const itemId = typeof parsed.item_id === "string" ? parsed.item_id : "";
|
|
2199
2202
|
const argsRaw = typeof parsed.arguments === "string" ? parsed.arguments : "";
|
|
2200
|
-
const buf = callBuffers.get(
|
|
2203
|
+
const buf = callBuffers.get(itemId);
|
|
2201
2204
|
if (buf) {
|
|
2202
2205
|
if (argsRaw) buf.argsJson = argsRaw;
|
|
2203
2206
|
yield {
|
|
2204
2207
|
type: "tool-call-ready",
|
|
2205
2208
|
index: buf.index,
|
|
2206
|
-
toolCallId: callId,
|
|
2209
|
+
toolCallId: buf.callId,
|
|
2207
2210
|
toolName: buf.name,
|
|
2208
2211
|
args: parseArgs(buf.argsJson || argsRaw)
|
|
2209
2212
|
};
|
|
@@ -2703,7 +2706,7 @@ function providerConfigFromOptions(provider, model, config) {
|
|
|
2703
2706
|
}
|
|
2704
2707
|
|
|
2705
2708
|
// src/version.ts
|
|
2706
|
-
var VERSION = "2.0.
|
|
2709
|
+
var VERSION = "2.0.25-canary.0";
|
|
2707
2710
|
function getPackageVersion() {
|
|
2708
2711
|
return VERSION;
|
|
2709
2712
|
}
|