@mindstudio-ai/remy 0.1.223 → 0.1.224

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.
@@ -131,7 +131,14 @@ declare class HeadlessSession {
131
131
  * `state.models`. Omitting `models` (or sending an empty object) resets
132
132
  * every agent to "use server defaults". */
133
133
  private handleChangeModels;
134
- /** Cancel the running turn and drain the queue. Returns the drained items. */
134
+ /**
135
+ * Cancel the running turn and flush the follow-ups that belonged to it
136
+ * (`chain`/`background`), while preserving `source: 'user'` items — those are
137
+ * independent user intent, not tied to the aborted run. The preserved user
138
+ * messages run next: `runSingleTurn` swallows the abort, so `handleMessage`
139
+ * falls through to `drainQueueLoop` with `running` still held. Returns the
140
+ * flushed items (for the cancel command's resume/discard UX).
141
+ */
135
142
  private handleCancel;
136
143
  /**
137
144
  * Remove pending queued messages — all user messages, or one by id.
package/dist/headless.js CHANGED
@@ -8180,7 +8180,14 @@ var HeadlessSession = class {
8180
8180
  allowedModelsByType: ALLOWED_MODELS_BY_TYPE
8181
8181
  };
8182
8182
  }
8183
- /** Cancel the running turn and drain the queue. Returns the drained items. */
8183
+ /**
8184
+ * Cancel the running turn and flush the follow-ups that belonged to it
8185
+ * (`chain`/`background`), while preserving `source: 'user'` items — those are
8186
+ * independent user intent, not tied to the aborted run. The preserved user
8187
+ * messages run next: `runSingleTurn` swallows the abort, so `handleMessage`
8188
+ * falls through to `drainQueueLoop` with `running` still held. Returns the
8189
+ * flushed items (for the cancel command's resume/discard UX).
8190
+ */
8184
8191
  handleCancel() {
8185
8192
  if (this.currentAbort) {
8186
8193
  this.currentAbort.abort();
@@ -8190,7 +8197,7 @@ var HeadlessSession = class {
8190
8197
  pending.resolve(USER_CANCELLED_RESULT);
8191
8198
  this.pendingTools.delete(id);
8192
8199
  }
8193
- return this.queue.drain();
8200
+ return this.queue.removeWhere((item) => item.source !== "user");
8194
8201
  }
8195
8202
  /**
8196
8203
  * Remove pending queued messages — all user messages, or one by id.
package/dist/index.js CHANGED
@@ -9019,7 +9019,14 @@ var init_headless = __esm({
9019
9019
  allowedModelsByType: ALLOWED_MODELS_BY_TYPE
9020
9020
  };
9021
9021
  }
9022
- /** Cancel the running turn and drain the queue. Returns the drained items. */
9022
+ /**
9023
+ * Cancel the running turn and flush the follow-ups that belonged to it
9024
+ * (`chain`/`background`), while preserving `source: 'user'` items — those are
9025
+ * independent user intent, not tied to the aborted run. The preserved user
9026
+ * messages run next: `runSingleTurn` swallows the abort, so `handleMessage`
9027
+ * falls through to `drainQueueLoop` with `running` still held. Returns the
9028
+ * flushed items (for the cancel command's resume/discard UX).
9029
+ */
9023
9030
  handleCancel() {
9024
9031
  if (this.currentAbort) {
9025
9032
  this.currentAbort.abort();
@@ -9029,7 +9036,7 @@ var init_headless = __esm({
9029
9036
  pending.resolve(USER_CANCELLED_RESULT);
9030
9037
  this.pendingTools.delete(id);
9031
9038
  }
9032
- return this.queue.drain();
9039
+ return this.queue.removeWhere((item) => item.source !== "user");
9033
9040
  }
9034
9041
  /**
9035
9042
  * Remove pending queued messages — all user messages, or one by id.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindstudio-ai/remy",
3
- "version": "0.1.223",
3
+ "version": "0.1.224",
4
4
  "description": "Remy coding agent",
5
5
  "repository": {
6
6
  "type": "git",