@mindstudio-ai/remy 0.1.59 → 0.1.60
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/headless.js +13 -0
- package/dist/index.js +13 -0
- package/package.json +1 -1
package/dist/headless.js
CHANGED
|
@@ -2523,6 +2523,16 @@ ${summaryBlock.text}
|
|
|
2523
2523
|
startIdx = checkpointIdx + 1;
|
|
2524
2524
|
}
|
|
2525
2525
|
const messagesToProcess = messages.slice(startIdx);
|
|
2526
|
+
const toolUseIds = /* @__PURE__ */ new Set();
|
|
2527
|
+
for (const msg of messagesToProcess) {
|
|
2528
|
+
if (msg.role === "assistant" && Array.isArray(msg.content)) {
|
|
2529
|
+
for (const block of msg.content) {
|
|
2530
|
+
if (block.type === "tool") {
|
|
2531
|
+
toolUseIds.add(block.id);
|
|
2532
|
+
}
|
|
2533
|
+
}
|
|
2534
|
+
}
|
|
2535
|
+
}
|
|
2526
2536
|
const cleaned = messagesToProcess.filter((msg) => {
|
|
2527
2537
|
if (Array.isArray(msg.content)) {
|
|
2528
2538
|
const blocks = msg.content;
|
|
@@ -2530,6 +2540,9 @@ ${summaryBlock.text}
|
|
|
2530
2540
|
return false;
|
|
2531
2541
|
}
|
|
2532
2542
|
}
|
|
2543
|
+
if (msg.role === "user" && msg.toolCallId && !toolUseIds.has(msg.toolCallId)) {
|
|
2544
|
+
return false;
|
|
2545
|
+
}
|
|
2533
2546
|
return true;
|
|
2534
2547
|
}).map((msg) => {
|
|
2535
2548
|
if (msg.role === "user" && typeof msg.content === "string" && msg.content.startsWith("@@automated::")) {
|
package/dist/index.js
CHANGED
|
@@ -2250,6 +2250,16 @@ ${summaryBlock.text}
|
|
|
2250
2250
|
startIdx = checkpointIdx + 1;
|
|
2251
2251
|
}
|
|
2252
2252
|
const messagesToProcess = messages.slice(startIdx);
|
|
2253
|
+
const toolUseIds = /* @__PURE__ */ new Set();
|
|
2254
|
+
for (const msg of messagesToProcess) {
|
|
2255
|
+
if (msg.role === "assistant" && Array.isArray(msg.content)) {
|
|
2256
|
+
for (const block of msg.content) {
|
|
2257
|
+
if (block.type === "tool") {
|
|
2258
|
+
toolUseIds.add(block.id);
|
|
2259
|
+
}
|
|
2260
|
+
}
|
|
2261
|
+
}
|
|
2262
|
+
}
|
|
2253
2263
|
const cleaned = messagesToProcess.filter((msg) => {
|
|
2254
2264
|
if (Array.isArray(msg.content)) {
|
|
2255
2265
|
const blocks = msg.content;
|
|
@@ -2257,6 +2267,9 @@ ${summaryBlock.text}
|
|
|
2257
2267
|
return false;
|
|
2258
2268
|
}
|
|
2259
2269
|
}
|
|
2270
|
+
if (msg.role === "user" && msg.toolCallId && !toolUseIds.has(msg.toolCallId)) {
|
|
2271
|
+
return false;
|
|
2272
|
+
}
|
|
2260
2273
|
return true;
|
|
2261
2274
|
}).map((msg) => {
|
|
2262
2275
|
if (msg.role === "user" && typeof msg.content === "string" && msg.content.startsWith("@@automated::")) {
|