opencode-gitlab-duo-agentic 0.2.21 → 0.2.22

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.
Files changed (2) hide show
  1. package/dist/index.js +13 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -793,6 +793,7 @@ var WorkflowSession = class {
793
793
  #queue;
794
794
  #startRequestSent = false;
795
795
  #pendingApproval = false;
796
+ #resumed = false;
796
797
  #onWorkflowCreated;
797
798
  constructor(client, modelId, cwd, options) {
798
799
  this.#client = client;
@@ -801,6 +802,7 @@ var WorkflowSession = class {
801
802
  this.#cwd = cwd;
802
803
  if (options?.existingWorkflowId) {
803
804
  this.#workflowId = options.existingWorkflowId;
805
+ this.#resumed = true;
804
806
  }
805
807
  this.#onWorkflowCreated = options?.onWorkflowCreated;
806
808
  }
@@ -822,6 +824,7 @@ var WorkflowSession = class {
822
824
  this.#tokenService.clear();
823
825
  this.#closeConnection();
824
826
  this.#pendingApproval = false;
827
+ this.#resumed = false;
825
828
  this.#startRequestSent = false;
826
829
  }
827
830
  // ---------------------------------------------------------------------------
@@ -953,11 +956,16 @@ var WorkflowSession = class {
953
956
  const status = action.newCheckpoint.status;
954
957
  dlog(`checkpoint: status=${status} ckptLen=${ckpt.length}`);
955
958
  const deltas = extractAgentTextDeltas(ckpt, this.#checkpoint);
956
- for (const delta of deltas) {
957
- queue.push({ type: "text-delta", value: delta });
958
- }
959
- if (deltas.length > 0) {
960
- dlog(`checkpoint: ${deltas.length} text deltas`);
959
+ if (this.#resumed) {
960
+ dlog(`checkpoint: RESUMED \u2014 discarding ${deltas.length} old deltas, fast-forwarding state`);
961
+ this.#resumed = false;
962
+ } else {
963
+ for (const delta of deltas) {
964
+ queue.push({ type: "text-delta", value: delta });
965
+ }
966
+ if (deltas.length > 0) {
967
+ dlog(`checkpoint: ${deltas.length} text deltas`);
968
+ }
961
969
  }
962
970
  if (isToolApproval(status)) {
963
971
  dlog(`checkpoint: TOOL_APPROVAL \u2192 pendingApproval=true (waiting for DWS close)`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-gitlab-duo-agentic",
3
- "version": "0.2.21",
3
+ "version": "0.2.22",
4
4
  "description": "OpenCode plugin and provider for GitLab Duo Agentic workflows",
5
5
  "license": "MIT",
6
6
  "type": "module",