opencode-gitlab-duo-agentic 0.2.15 → 0.2.17
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 +4 -31
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -456,23 +456,6 @@ function extractAgentTextDeltas(checkpoint, state) {
|
|
|
456
456
|
state.uiChatLog = next;
|
|
457
457
|
return out;
|
|
458
458
|
}
|
|
459
|
-
function extractToolRequests(checkpoint, state) {
|
|
460
|
-
const next = parseCheckpoint(checkpoint);
|
|
461
|
-
const requests = [];
|
|
462
|
-
for (let i = 0; i < next.length; i++) {
|
|
463
|
-
const item = next[i];
|
|
464
|
-
if (item.message_type !== "request") continue;
|
|
465
|
-
if (!item.tool_info) continue;
|
|
466
|
-
if (state.processedRequestIndices.has(i)) continue;
|
|
467
|
-
state.processedRequestIndices.add(i);
|
|
468
|
-
requests.push({
|
|
469
|
-
requestId: item.correlation_id ?? randomUUID(),
|
|
470
|
-
toolName: item.tool_info.name,
|
|
471
|
-
args: item.tool_info.args ?? {}
|
|
472
|
-
});
|
|
473
|
-
}
|
|
474
|
-
return requests;
|
|
475
|
-
}
|
|
476
459
|
function parseCheckpoint(raw) {
|
|
477
460
|
if (!raw) return [];
|
|
478
461
|
try {
|
|
@@ -957,16 +940,6 @@ var WorkflowSession = class {
|
|
|
957
940
|
this.#pendingApproval = true;
|
|
958
941
|
return;
|
|
959
942
|
}
|
|
960
|
-
const toolRequests = extractToolRequests(ckpt, this.#checkpoint);
|
|
961
|
-
for (const req of toolRequests) {
|
|
962
|
-
dlog(`checkpoint: tool-request name=${req.toolName} reqId=${req.requestId}`);
|
|
963
|
-
queue.push({
|
|
964
|
-
type: "tool-request",
|
|
965
|
-
requestId: req.requestId,
|
|
966
|
-
toolName: req.toolName,
|
|
967
|
-
args: req.args
|
|
968
|
-
});
|
|
969
|
-
}
|
|
970
943
|
if (isTurnComplete(status)) {
|
|
971
944
|
dlog(`checkpoint: turnComplete \u2192 close queue+connection`);
|
|
972
945
|
queue.close();
|
|
@@ -1526,9 +1499,9 @@ var DuoWorkflowModel = class {
|
|
|
1526
1499
|
dlog(`phase1: ${toolResults.length} total, ${freshResults.length} fresh`);
|
|
1527
1500
|
let sentToolResults = false;
|
|
1528
1501
|
for (const result of freshResults) {
|
|
1529
|
-
const
|
|
1530
|
-
if (
|
|
1531
|
-
const originalId = result.toolCallId.substring(0,
|
|
1502
|
+
const subIdx = result.toolCallId.indexOf("_sub_");
|
|
1503
|
+
if (subIdx !== -1) {
|
|
1504
|
+
const originalId = result.toolCallId.substring(0, subIdx);
|
|
1532
1505
|
const group = model.#multiCallGroups.get(originalId);
|
|
1533
1506
|
if (!group) {
|
|
1534
1507
|
model.#sentToolCallIds.add(result.toolCallId);
|
|
@@ -1627,7 +1600,7 @@ var DuoWorkflowModel = class {
|
|
|
1627
1600
|
controller.enqueue({ type: "text-end", id: textId });
|
|
1628
1601
|
}
|
|
1629
1602
|
if (Array.isArray(mapped)) {
|
|
1630
|
-
const subIds = mapped.map((_, i) => `${event.requestId}
|
|
1603
|
+
const subIds = mapped.map((_, i) => `${event.requestId}_sub_${i}`);
|
|
1631
1604
|
model.#multiCallGroups.set(event.requestId, {
|
|
1632
1605
|
subIds,
|
|
1633
1606
|
collected: /* @__PURE__ */ new Map()
|