acp-kernel 0.0.69-pr.293.158 → 0.0.70-pr.293.160
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/index.js
CHANGED
|
@@ -166,6 +166,10 @@ function collectSummaryAnchors(state, indexById, summaryIndexById) {
|
|
|
166
166
|
return anchors;
|
|
167
167
|
}
|
|
168
168
|
function pairSafeAnchorIndex(messages, index) {
|
|
169
|
+
let safe = index;
|
|
170
|
+
while (safe > 0 && safe < messages.length && messages[safe - 1].role === "assistant" && messages[safe].role === "assistant") {
|
|
171
|
+
safe--;
|
|
172
|
+
}
|
|
169
173
|
const resultIndexByCallId = /* @__PURE__ */ new Map();
|
|
170
174
|
messages.forEach((message, at) => {
|
|
171
175
|
if (message.contentType !== "tool-result") return;
|
|
@@ -174,7 +178,6 @@ function pairSafeAnchorIndex(messages, index) {
|
|
|
174
178
|
resultIndexByCallId.set(message.toolCallId, at);
|
|
175
179
|
}
|
|
176
180
|
});
|
|
177
|
-
let safe = index;
|
|
178
181
|
for (let guard = 0; guard < messages.length; guard++) {
|
|
179
182
|
let moved = safe;
|
|
180
183
|
for (let at = 0; at < safe && at < messages.length; at++) {
|