Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Apply the signed-in preference only when picking a surface for a new task
Bugfixer 2314ca359f45d
diff --git a/server/surface.test.ts b/server/surface.test.tsindex 3be61642e3..8fd95daf21 100644--- a/server/surface.test.ts+++ b/server/surface.test.ts@@ -204,12 +204,12 @@ describe("surfacePrompt", () => {expect(text).toMatch(/say which surface — the Browser tab or the cloud computer/);});- it("keeps a task on the computer where the bot already saw the site signed in, without a check that would start it", () => {+ it("starts a new task on the computer where the bot already saw its site signed in, without a check that would start it", () => {for (const computer of ["vm", "cloud"] as const) {const text = surfacePrompt({ computer, browser: true });const label = computer === "vm" ? "the Local VM" : "the cloud computer";expect(text).toContain(`The built-in browser and ${label} may not share sign-ins.`);- expect(text).toContain(`If you already saw the site signed in on ${label} with the account this task needs, keep the task on ${label} instead of asking the user to sign in again in the Browser tab, unless they asked for the Browser tab.`);+ expect(text).toContain(`When you pick the surface for a new task, if you already saw its site signed in on ${label} with the account it needs, pick ${label} instead of the Browser tab, unless the user asked for the Browser tab.`);expect(text).not.toMatch(/check whether the site is already signed in/);}expect(surfacePrompt({ computer: "vm", browser: false })).not.toContain("share sign-ins");diff --git a/server/surface.ts b/server/surface.tsindex 0438254d94..60fb8da16d 100644--- a/server/surface.ts+++ b/server/surface.ts@@ -228,7 +228,7 @@ export function surfacePrompt(// The two browsers usually share no cookies: "Web tasks → the built-in browser" alone sent a bot whose site was// signed in on the computer to a signed-out tab, where it asked the person to sign in again.text =- ` Two surfaces are mounted this turn: the built-in browser (the browser server's browser_navigate, browser_snapshot, browser_click, browser_fill and friends) and ${computer} (the computer server's tools). Web tasks → the built-in browser. Desktop apps, files and shell → ${computer} tools. Pick one surface for a task and stay on it; if you need the user to sign in, say which surface — the Browser tab or ${computer}. The built-in browser and ${computer} may not share sign-ins. If you already saw the site signed in on ${computer} with the account this task needs, keep the task on ${computer} instead of asking the user to sign in again in the Browser tab, unless they asked for the Browser tab.`;+ ` Two surfaces are mounted this turn: the built-in browser (the browser server's browser_navigate, browser_snapshot, browser_click, browser_fill and friends) and ${computer} (the computer server's tools). Web tasks → the built-in browser. Desktop apps, files and shell → ${computer} tools. Pick one surface for a task and stay on it; if you need the user to sign in, say which surface — the Browser tab or ${computer}. The built-in browser and ${computer} may not share sign-ins. When you pick the surface for a new task, if you already saw its site signed in on ${computer} with the account it needs, pick ${computer} instead of the Browser tab, unless the user asked for the Browser tab.`;} else if (computer) {text =` Everything you do on screen happens on ${computer}, web pages included, through its own browser; there is no separate built-in browser this turn. If you need the user to sign in, tell them it is on ${computer}.`;