@mindstudio-ai/remy 0.1.172 → 0.1.173

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.js CHANGED
@@ -7434,7 +7434,10 @@ var HeadlessSession = class {
7434
7434
  const limit = typeof rawLimit === "number" && Number.isFinite(rawLimit) ? Math.min(Math.max(1, rawLimit | 0), HISTORY_MAX_LIMIT) : HISTORY_DEFAULT_LIMIT;
7435
7435
  const rawBefore = parsed.before;
7436
7436
  const before = typeof rawBefore === "number" && Number.isFinite(rawBefore) ? Math.max(0, Math.min(rawBefore | 0, total)) : total;
7437
- const startIndex = Math.max(0, before - limit);
7437
+ let startIndex = Math.max(0, before - limit);
7438
+ while (startIndex > 0 && this.state.messages[startIndex].role === "user" && this.state.messages[startIndex].toolCallId) {
7439
+ startIndex--;
7440
+ }
7438
7441
  const endIndex = before;
7439
7442
  this.dispatchSimple(requestId, "history", () => ({
7440
7443
  messages: this.state.messages.slice(startIndex, endIndex),
package/dist/index.js CHANGED
@@ -8188,7 +8188,10 @@ var init_headless = __esm({
8188
8188
  const limit = typeof rawLimit === "number" && Number.isFinite(rawLimit) ? Math.min(Math.max(1, rawLimit | 0), HISTORY_MAX_LIMIT) : HISTORY_DEFAULT_LIMIT;
8189
8189
  const rawBefore = parsed.before;
8190
8190
  const before = typeof rawBefore === "number" && Number.isFinite(rawBefore) ? Math.max(0, Math.min(rawBefore | 0, total)) : total;
8191
- const startIndex = Math.max(0, before - limit);
8191
+ let startIndex = Math.max(0, before - limit);
8192
+ while (startIndex > 0 && this.state.messages[startIndex].role === "user" && this.state.messages[startIndex].toolCallId) {
8193
+ startIndex--;
8194
+ }
8192
8195
  const endIndex = before;
8193
8196
  this.dispatchSimple(requestId, "history", () => ({
8194
8197
  messages: this.state.messages.slice(startIndex, endIndex),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindstudio-ai/remy",
3
- "version": "0.1.172",
3
+ "version": "0.1.173",
4
4
  "description": "MindStudio coding agent",
5
5
  "repository": {
6
6
  "type": "git",