@mindstudio-ai/remy 0.1.152 → 0.1.153
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 +12 -10
- package/dist/index.js +12 -10
- package/dist/prompt/static/instructions.md +1 -1
- package/package.json +1 -1
package/dist/headless.js
CHANGED
|
@@ -486,18 +486,21 @@ async function* streamChat(params) {
|
|
|
486
486
|
})
|
|
487
487
|
]);
|
|
488
488
|
clearTimeout(stallTimer);
|
|
489
|
-
} catch {
|
|
489
|
+
} catch (err) {
|
|
490
490
|
clearTimeout(stallTimer);
|
|
491
|
-
|
|
492
|
-
|
|
491
|
+
try {
|
|
492
|
+
await reader.cancel();
|
|
493
|
+
} catch {
|
|
494
|
+
}
|
|
495
|
+
const isStall = err?.message === "stream_stall";
|
|
496
|
+
const errorMessage = isStall ? "Stream stalled \u2014 no data received for 5 minutes" : `Network error: stream interrupted \u2014 ${err?.message ?? "unknown"}`;
|
|
497
|
+
log2.error(isStall ? "Stream stalled" : "Stream interrupted", {
|
|
493
498
|
requestId,
|
|
494
499
|
...subAgentId && { subAgentId },
|
|
495
|
-
durationMs: Date.now() - startTime
|
|
500
|
+
durationMs: Date.now() - startTime,
|
|
501
|
+
error: errorMessage
|
|
496
502
|
});
|
|
497
|
-
yield {
|
|
498
|
-
type: "error",
|
|
499
|
-
error: "Stream stalled \u2014 no data received for 5 minutes"
|
|
500
|
-
};
|
|
503
|
+
yield { type: "error", error: errorMessage };
|
|
501
504
|
return;
|
|
502
505
|
}
|
|
503
506
|
const { done, value } = readResult;
|
|
@@ -1322,7 +1325,7 @@ var writePlanTool = {
|
|
|
1322
1325
|
clearable: false,
|
|
1323
1326
|
definition: {
|
|
1324
1327
|
name: "writePlan",
|
|
1325
|
-
description: "Write an implementation plan for user approval before making changes. Use this only for large, multi-step changes like new features, new interface types, or when the user explicitly asks to see a plan. Most work should be done autonomously without a plan. Write a clear markdown summary of what you intend to do in plain language \u2014 describe the changes from the user's perspective, not as a list of files and code paths. The plan is displayed standalone in the UI with approve/reject buttons
|
|
1328
|
+
description: "Write an implementation plan for user approval before making changes. Use this only for large, multi-step changes like new features, new interface types, or when the user explicitly asks to see a plan. Most work should be done autonomously without a plan. Write a clear markdown summary of what you intend to do in plain language \u2014 describe the changes from the user's perspective, not as a list of files and code paths. The plan is displayed standalone in the UI with approve/reject buttons attached; the plan content itself is just the substantive sections and ends when those do. Any wrap-up to the user \u2014 sign-offs, prompts for approval, offers to revise \u2014 belongs in your chat message alongside the plan, not inside it. If the user asks for revisions, call this tool again with updated content to overwrite the plan.",
|
|
1326
1329
|
inputSchema: {
|
|
1327
1330
|
type: "object",
|
|
1328
1331
|
properties: {
|
|
@@ -6778,7 +6781,6 @@ ${userMessage}` : header;
|
|
|
6778
6781
|
requestId,
|
|
6779
6782
|
error: err.message
|
|
6780
6783
|
});
|
|
6781
|
-
this.queue.drain();
|
|
6782
6784
|
}
|
|
6783
6785
|
this.applyPendingSummaries();
|
|
6784
6786
|
this.applyPendingBlockUpdates();
|
package/dist/index.js
CHANGED
|
@@ -171,18 +171,21 @@ async function* streamChat(params) {
|
|
|
171
171
|
})
|
|
172
172
|
]);
|
|
173
173
|
clearTimeout(stallTimer);
|
|
174
|
-
} catch {
|
|
174
|
+
} catch (err) {
|
|
175
175
|
clearTimeout(stallTimer);
|
|
176
|
-
|
|
177
|
-
|
|
176
|
+
try {
|
|
177
|
+
await reader.cancel();
|
|
178
|
+
} catch {
|
|
179
|
+
}
|
|
180
|
+
const isStall = err?.message === "stream_stall";
|
|
181
|
+
const errorMessage = isStall ? "Stream stalled \u2014 no data received for 5 minutes" : `Network error: stream interrupted \u2014 ${err?.message ?? "unknown"}`;
|
|
182
|
+
log.error(isStall ? "Stream stalled" : "Stream interrupted", {
|
|
178
183
|
requestId,
|
|
179
184
|
...subAgentId && { subAgentId },
|
|
180
|
-
durationMs: Date.now() - startTime
|
|
185
|
+
durationMs: Date.now() - startTime,
|
|
186
|
+
error: errorMessage
|
|
181
187
|
});
|
|
182
|
-
yield {
|
|
183
|
-
type: "error",
|
|
184
|
-
error: "Stream stalled \u2014 no data received for 5 minutes"
|
|
185
|
-
};
|
|
188
|
+
yield { type: "error", error: errorMessage };
|
|
186
189
|
return;
|
|
187
190
|
}
|
|
188
191
|
const { done, value } = readResult;
|
|
@@ -834,7 +837,7 @@ var init_writePlan = __esm({
|
|
|
834
837
|
clearable: false,
|
|
835
838
|
definition: {
|
|
836
839
|
name: "writePlan",
|
|
837
|
-
description: "Write an implementation plan for user approval before making changes. Use this only for large, multi-step changes like new features, new interface types, or when the user explicitly asks to see a plan. Most work should be done autonomously without a plan. Write a clear markdown summary of what you intend to do in plain language \u2014 describe the changes from the user's perspective, not as a list of files and code paths. The plan is displayed standalone in the UI with approve/reject buttons
|
|
840
|
+
description: "Write an implementation plan for user approval before making changes. Use this only for large, multi-step changes like new features, new interface types, or when the user explicitly asks to see a plan. Most work should be done autonomously without a plan. Write a clear markdown summary of what you intend to do in plain language \u2014 describe the changes from the user's perspective, not as a list of files and code paths. The plan is displayed standalone in the UI with approve/reject buttons attached; the plan content itself is just the substantive sections and ends when those do. Any wrap-up to the user \u2014 sign-offs, prompts for approval, offers to revise \u2014 belongs in your chat message alongside the plan, not inside it. If the user asks for revisions, call this tool again with updated content to overwrite the plan.",
|
|
838
841
|
inputSchema: {
|
|
839
842
|
type: "object",
|
|
840
843
|
properties: {
|
|
@@ -7513,7 +7516,6 @@ ${userMessage}` : header;
|
|
|
7513
7516
|
requestId,
|
|
7514
7517
|
error: err.message
|
|
7515
7518
|
});
|
|
7516
|
-
this.queue.drain();
|
|
7517
7519
|
}
|
|
7518
7520
|
this.applyPendingSummaries();
|
|
7519
7521
|
this.applyPendingBlockUpdates();
|
|
@@ -35,7 +35,7 @@ You will occasionally receive automated messages prefixed with `@@automated_mess
|
|
|
35
35
|
|
|
36
36
|
## Style
|
|
37
37
|
- Your messages are rendered as markdown. Use formatting (headers, bold, lists, code blocks) when it helps readability. You can include images using `` — use this to show the user screenshots, generated images, or other visual references inline in your messages.
|
|
38
|
-
- When offering suggestions or options the user might want to quickly select in a conversation, format them as clickable suggestion links: `[
|
|
38
|
+
- When offering suggestions or options the user might want to quickly select in a conversation, format them as clickable suggestion links: `[label](suggest:message sent on click)`. The label renders as a tappable chip and should be a few words — chip-sized, not sentence-sized. The `suggest:` payload can be longer; that's what gets sent as the user's next message when clicked. Use these liberally: when brainstorming, offering directions, listing options, or any time you're asking a question the user could answer with a quick tap. When explicitly gathering information from the user, however, always use the `promptUser` tool instead.
|
|
39
39
|
- Keep language accessible. Describe what the app *does*, not how it's implemented, unless the user demonstrates technical fluency.
|
|
40
40
|
- Always use full paths relative to the project root when mentioning files (`dist/interfaces/web/src/App.tsx`, not `App.tsx`). Paths will be rendered as clickable links for the user.
|
|
41
41
|
- Use inline `code` formatting only for things the user needs to type or search for.
|