@mindstudio-ai/remy 0.1.134 → 0.1.135
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 +9 -4
- package/dist/index.js +9 -4
- package/package.json +1 -1
package/dist/headless.js
CHANGED
|
@@ -2743,6 +2743,9 @@ ${summaryBlock.text}
|
|
|
2743
2743
|
return false;
|
|
2744
2744
|
}
|
|
2745
2745
|
}
|
|
2746
|
+
if (msg.role === "assistant" && Array.isArray(msg.content) && msg.content.length === 0) {
|
|
2747
|
+
return false;
|
|
2748
|
+
}
|
|
2746
2749
|
if (msg.role === "user" && msg.toolCallId && !toolUseIds.has(msg.toolCallId)) {
|
|
2747
2750
|
return false;
|
|
2748
2751
|
}
|
|
@@ -5589,10 +5592,12 @@ async function runTurn(params) {
|
|
|
5589
5592
|
saveSession(state);
|
|
5590
5593
|
return;
|
|
5591
5594
|
}
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
5595
|
+
if (contentBlocks.length > 0) {
|
|
5596
|
+
state.messages.push({
|
|
5597
|
+
role: "assistant",
|
|
5598
|
+
content: [...contentBlocks].sort((a, b) => a.startedAt - b.startedAt)
|
|
5599
|
+
});
|
|
5600
|
+
}
|
|
5596
5601
|
const toolCalls = getToolCalls(contentBlocks);
|
|
5597
5602
|
if (stopReason !== "tool_use" || toolCalls.length === 0) {
|
|
5598
5603
|
statusWatcher.stop();
|
package/dist/index.js
CHANGED
|
@@ -2452,6 +2452,9 @@ ${summaryBlock.text}
|
|
|
2452
2452
|
return false;
|
|
2453
2453
|
}
|
|
2454
2454
|
}
|
|
2455
|
+
if (msg.role === "assistant" && Array.isArray(msg.content) && msg.content.length === 0) {
|
|
2456
|
+
return false;
|
|
2457
|
+
}
|
|
2455
2458
|
if (msg.role === "user" && msg.toolCallId && !toolUseIds.has(msg.toolCallId)) {
|
|
2456
2459
|
return false;
|
|
2457
2460
|
}
|
|
@@ -5651,10 +5654,12 @@ async function runTurn(params) {
|
|
|
5651
5654
|
saveSession(state);
|
|
5652
5655
|
return;
|
|
5653
5656
|
}
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5657
|
+
if (contentBlocks.length > 0) {
|
|
5658
|
+
state.messages.push({
|
|
5659
|
+
role: "assistant",
|
|
5660
|
+
content: [...contentBlocks].sort((a, b) => a.startedAt - b.startedAt)
|
|
5661
|
+
});
|
|
5662
|
+
}
|
|
5658
5663
|
const toolCalls = getToolCalls(contentBlocks);
|
|
5659
5664
|
if (stopReason !== "tool_use" || toolCalls.length === 0) {
|
|
5660
5665
|
statusWatcher.stop();
|