@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.
- package/dist/headless.d.ts +8 -1
- package/dist/headless.js +9 -2
- package/dist/index.js +9 -2
- package/package.json +1 -1
package/dist/headless.d.ts
CHANGED
|
@@ -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
|
-
/**
|
|
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
|
-
/**
|
|
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.
|
|
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
|
-
/**
|
|
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.
|
|
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.
|