Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Train fixes: a dropped stream keeps Retry; an unconfirmed Local VM input keeps the driver's line

milind-soni458856dc8690
diff --git a/server/container-mcp.test.ts b/server/container-mcp.test.ts
index 221e389f6b..05a81a17df 100644
--- a/server/container-mcp.test.ts
+++ b/server/container-mcp.test.ts
@@ -142,6 +142,7 @@ posixOnly("Local VM Cua MCP bridge", () => {
...receipt,
result: { ...receipt.result, content: [{ type: "text", text: expect.stringMatching(/could not confirm.*type_text.*foreground.*clipboard_write/s) }] },
});
+ expect(results[index].result.content[0].text.startsWith(receipt.result.content[0]!.text), "keeps the driver's own line").toBe(true);
}
expect(results.slice(2)).toEqual(receipts.slice(2));
});
diff --git a/server/container-mcp.ts b/server/container-mcp.ts
index 3f1106509c..980dc8c075 100644
--- a/server/container-mcp.ts
+++ b/server/container-mcp.ts
@@ -32,7 +32,7 @@ function textInputResultLine(line: string): string {
if (!Array.isArray(content)) return line;
const [first, ...rest] = content;
if (first?.type !== "text" || typeof first.text !== "string" || !/^(?:Typed \d+ character\(s\) \(via targeted AT-SPI\)\.$|Set value of element \[)/u.test(first.text)) return line;
- const text = "The accessibility action could not confirm that the field changed. In Firefox ESR on the Local VM this route can leave a field empty. Check the field with get_window_state before trying again. If it is unchanged, use type_text with the field's window-relative x,y and delivery_mode: foreground, or focus the field and use clipboard_write followed by Ctrl+V. Check the resulting value.";
+ const text = `${first.text} The accessibility action could not confirm that the field changed. In Firefox ESR on the Local VM this route can leave a field empty. Check the field with get_window_state before trying again. If it is unchanged, use type_text with the field's window-relative x,y and delivery_mode: foreground, or focus the field and use clipboard_write followed by Ctrl+V. Check the resulting value.`;
return JSON.stringify({ ...frame, result: { ...result, content: [{ ...first, text }, ...rest] } });
}
diff --git a/src/components/FailedTurnFix.tsx b/src/components/FailedTurnFix.tsx
index aa8d0745a6..c6b8a67182 100644
--- a/src/components/FailedTurnFix.tsx
+++ b/src/components/FailedTurnFix.tsx
@@ -23,8 +23,9 @@ export function useFailedTurnFix(tool: NonNullable<Message["tool"]>, botId: stri
const dispatch = useStoreDispatch();
const bot = useStoreSelector((state) => (botId ? state.bots.find((candidate) => candidate.id === botId) : undefined));
const phone = useMediaQuery(PHONE_LAYOUT), admin = useOwnerOrAdmin() !== false, advanced = useAdvancedMode();
+ // A dropped stream keeps Retry (the engine calls it retriable); the line says how to go on without repeating work.
if (/^error: (?:(?:Error|Internal error|RetriableError): )*Stream ended without turnEnded\b/i.test(tool.name)) {
- return { action: null, control: line(t("chat.error.streamDroppedContinue")) };
+ return { control: line(t("chat.error.streamDroppedContinue")) };
}
// A My Cloud bot open in place: its spending and its model are My Cloud's, set on its own page.
const fix = botId && isPlaceId(botId) ? null : settingFix(tool);
diff --git a/src/components/FailedTurnRow.setting-fix.test.ts b/src/components/FailedTurnRow.setting-fix.test.ts
index 0517e3804b..e28242be78 100644
--- a/src/components/FailedTurnRow.setting-fix.test.ts
+++ b/src/components/FailedTurnRow.setting-fix.test.ts
@@ -75,11 +75,11 @@ describe("a failed turn one setting fixes", () => {
"Stream ended without turnEnded — connection likely dropped mid-stream",
"Error: RetriableError: Stream ended without turnEnded — connection likely dropped mid-stream",
"Internal error: Stream ended without turnEnded — connection likely dropped mid-stream (session/prompt)",
- ])("guides the person to continue in the same chat after %s", (cause) => {
+ ])("guides the person to continue in the same chat, beside Retry, after %s", (cause) => {
const html = show(failedTurnTool(cause));
expect(html).toContain("Check what already ran, then send a follow-up in this chat with only the work that remains.");
expect(html).toContain(cause);
- expect(buttons(html)).toEqual([]);
+ expect(buttons(html).some((label) => label.includes("Retry"))).toBe(true);
});
it("adds nothing to a failure no setting fixes, or for a bot it does not know", () => {