@tangle-network/agent-app 0.45.30 → 0.45.31
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.
|
@@ -1428,7 +1428,7 @@ function createSandboxChatProducer(options) {
|
|
|
1428
1428
|
const partMap = /* @__PURE__ */ new Map();
|
|
1429
1429
|
const tracker = { seen: /* @__PURE__ */ new Map() };
|
|
1430
1430
|
const usage = {};
|
|
1431
|
-
const
|
|
1431
|
+
const announcedToolArgs = /* @__PURE__ */ new Map();
|
|
1432
1432
|
const settledTools = /* @__PURE__ */ new Set();
|
|
1433
1433
|
let stepCounter = 0;
|
|
1434
1434
|
let danglingToolsTerminalized = false;
|
|
@@ -1507,11 +1507,14 @@ function createSandboxChatProducer(options) {
|
|
|
1507
1507
|
const state = asRecord(persisted?.state);
|
|
1508
1508
|
const toolId = String(persisted?.id ?? "");
|
|
1509
1509
|
const toolName = String(persisted?.tool ?? "tool");
|
|
1510
|
-
|
|
1511
|
-
|
|
1510
|
+
const args = asRecord(state?.input) ?? {};
|
|
1511
|
+
const hasPopulatedArgs = Object.keys(args).length > 0;
|
|
1512
|
+
const announcedWithPopulatedArgs = announcedToolArgs.get(toolId);
|
|
1513
|
+
if (toolId && (announcedWithPopulatedArgs === void 0 || !announcedWithPopulatedArgs && hasPopulatedArgs && !settledTools.has(toolId))) {
|
|
1514
|
+
announcedToolArgs.set(toolId, hasPopulatedArgs);
|
|
1512
1515
|
yield {
|
|
1513
1516
|
type: "tool_call",
|
|
1514
|
-
call: { toolCallId: toolId, toolName, args
|
|
1517
|
+
call: { toolCallId: toolId, toolName, args }
|
|
1515
1518
|
};
|
|
1516
1519
|
}
|
|
1517
1520
|
const status = String(state?.status ?? "");
|