Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Onboarding: Claude, ChatGPT and OpenCode as first choices (#6514)
Milind Soni5e7c989fa81d
diff --git a/src/components/CloudEngineSignIn.test.ts b/src/components/CloudEngineSignIn.test.tsindex 006efc760a..37e3f9affd 100644--- a/src/components/CloudEngineSignIn.test.ts+++ b/src/components/CloudEngineSignIn.test.ts@@ -105,6 +105,24 @@ it("offers Grok as a third choice when this Cloud computer has the Grok CLI, andexpect(render().html).toContain('data-engine-setup="grok"');});+it("offers OpenCode next to Claude and ChatGPT before it is installed, and opens its install on this server", () => {+ const openCode = engine("opencodeGo", "opencodeGo", "device-code", { displayName: "OpenCode", authentication: undefined,+ snapshot: { state: "unavailable" }, install: { docsUrl: "https://opencode.ai/docs/", server: { standalone: { version: "1", downloadBytes: 1 } } } });+ store.instances = [claude, codex, openCode];+ const { html } = render();+ for (const label of ["OpenCode", "Free models, no account needed."]) expect(html).toContain(label);+ expect(html.indexOf('data-cloud-choice="opencode"')).toBeGreaterThan(html.indexOf('data-cloud-choice="codex"'));+ expect(html).toContain("grid-cols-3");+ choose("opencode");+ expect(render().html).toContain('data-engine-setup="opencodeGo"');+ // With Grok as well, four tiles in two rows, Grok last.+ store.instances = [claude, codex, openCode, engine("grok", "grokAgent", "device-code")];+ f.values = [];+ const four = render().html;+ expect(four).toContain("grid-cols-2");+ expect(four.indexOf('data-cloud-choice="grok"')).toBeGreaterThan(four.indexOf('data-cloud-choice="opencode"'));+});+it("leaves Grok out where this Cloud computer has no Grok CLI (an older image)", () => {store.instances = [claude, codex, engine("grok", "grokAgent", "device-code", { snapshot: { state: "unavailable", reason: "`grok` CLI not found" } })];const { html } = render();diff --git a/src/components/CloudEngineSignIn.tsx b/src/components/CloudEngineSignIn.tsxindex a983d3aa84..ca22ba804a 100644--- a/src/components/CloudEngineSignIn.tsx+++ b/src/components/CloudEngineSignIn.tsx@@ -16,8 +16,8 @@ import { withViewTransition } from "@/components/onboarding/view-transition";import { useStore, type InstanceInfo } from "@/state/store";import { openKeySettings } from "./keys/key-focus";-type Choice = "claude" | "codex" | "grok";-type ChoiceKind = "claudeAgent" | "codex" | "grokAgent";+type Choice = "claude" | "codex" | "opencode" | "grok";+type ChoiceKind = "claudeAgent" | "codex" | "opencodeGo" | "grokAgent";export function cloudEngine(instances: readonly InstanceInfo[], driverKind: ChoiceKind): InstanceInfo | undefined {return instances.find((instance) => instance.driverKind === driverKind && instance.access !== "custom" && !instance.readOnly);@@ -38,6 +38,10 @@ export function useCloudEngineChoices() {const choices: Array<{ id: Choice; driverKind: ChoiceKind; label: string; hint: string }> = [{ id: "claude", driverKind: "claudeAgent", label: t("cloudSignIn.claude"), hint: t("cloudSignIn.claudeHint") },{ id: "codex", driverKind: "codex", label: t("cloudSignIn.codex"), hint: t("cloudSignIn.codexHint") },+ // The server installs OpenCode's own build here, so it is offered before it is installed.+ ...(cloudEngine(state.instances, "opencodeGo")+ ? [{ id: "opencode" as const, driverKind: "opencodeGo" as const, label: t("cloudSignIn.opencode"), hint: t("cloudSignIn.opencodeHint") }]+ : []),...(cloudEngine(state.instances, "grokAgent")?.snapshot.state === "available"? [{ id: "grok" as const, driverKind: "grokAgent" as const, label: t("cloudSignIn.grok"), hint: t("cloudSignIn.grokHint") }]: []),@@ -52,7 +56,7 @@ export type CloudEngineChoices = ReturnType<typeof useCloudEngineChoices>;export function cloudEngineChoices(engines: CloudEngineChoices, { handing = false, columns }: { handing?: boolean; columns?: string } = {}): ReactNode {const { instances, dispatch, open, setOpen, checking, recheck, choices, live } = engines;return <>- <div role="group" aria-label={t("cloudSignIn.title")} inert={handing} className={cn("mt-8 grid gap-3 transition-opacity duration-300 ease-out", columns ?? (choices.length === 3 ? "grid-cols-3" : "grid-cols-2"), handing && "opacity-40")}>+ {choices.length > 0 && <div role="group" aria-label={t("cloudSignIn.title")} inert={handing} className={cn("mt-8 grid gap-3 transition-opacity duration-300 ease-out", columns ?? (choices.length === 3 ? "grid-cols-3" : "grid-cols-2"), handing && "opacity-40")}>{choices.map((choice, i) => {const picked = open === choice.id;const instance = cloudEngine(instances, choice.driverKind);@@ -91,7 +95,7 @@ export function cloudEngineChoices(engines: CloudEngineChoices, { handing = fals</button>);})}- </div>+ </div>}{choices.map((choice) => {const instance = cloudEngine(instances, choice.driverKind);diff --git a/src/components/HelperSetup.tsx b/src/components/HelperSetup.tsxindex 703ec26228..8b949dcbb2 100644--- a/src/components/HelperSetup.tsx+++ b/src/components/HelperSetup.tsx@@ -82,7 +82,8 @@ export function chipAction(chip: Exclude<IntroChip, "ai">): Action {function IntroConnectAi({ onClose }: { onClose: () => void }) {const { state } = useStore();- return <ConnectAiDialog tested={useWelcomeAi(state.instances, true)} onClose={onClose} />;+ const [chosen, setChosen] = useState<string | null>(null);+ return <ConnectAiDialog tested={useWelcomeAi(state.instances, true, chosen)} onChoose={setChosen} onClose={onClose} />;}/** What is still missing, as chips under MausBot's follow-up (Simple mode): at most INTRO_CHIPS, and one that was tappeddiff --git a/src/components/cloud-welcome/CloudWelcome.test.ts b/src/components/cloud-welcome/CloudWelcome.test.tsindex 3e15750b19..16ff2c5a1e 100644--- a/src/components/cloud-welcome/CloudWelcome.test.ts+++ b/src/components/cloud-welcome/CloudWelcome.test.ts@@ -41,6 +41,8 @@ const CLOUD = { name: "Studio Cloud", origin: "https://omb-u-1a2b3c4d5e6f.fly.deconst quiet: CloudSendNotice = { ready: true, bots: [], updatedBots: [], skills: 0, logins: 0, onePassword: false, settings: 0, signature: "", dismissed: false, running: false, last: null, whole: null };const claude = { instanceId: "claude", driverKind: "claudeAgent", displayName: "Claude", access: "subscription", authentication: { method: "paste-code" }, snapshot: { state: "available", authenticated: false }, models: { default: "", options: [] } };const codex = { ...claude, instanceId: "codex", driverKind: "codex", displayName: "Codex" };+const openCode = { instanceId: "opencodeGo", driverKind: "opencodeGo", displayName: "OpenCode", access: "subscription",+ install: { server: { standalone: { version: "1", downloadBytes: 1 } } }, snapshot: { state: "unavailable" }, models: { default: "", options: [] } };const credit = { instanceId: "trial", driverKind: "openai-compat", displayName: "Trial credit · Claude", readOnly: true, trialCredit: "active", snapshot: { state: "available" }, models: { default: "", options: [] } };let host: HTMLDivElement;@@ -146,7 +148,7 @@ describe("CloudWelcome", () => {expect(host.querySelector("[data-bring-update]")).toBeNull();expect(host.querySelector('[aria-current="step"]')!.getAttribute("data-welcome-rail")).toBe("bring");expect([...document.body.querySelectorAll("button")].map((node) => node.textContent?.trim())).toEqual([- "1Bring your stuffYour bots and chats (Not done yet)", "2Connect your AIClaude or ChatGPT (Not done yet)", "3Files and appsOptional (Not done yet)",+ "1Bring your stuffYour bots and chats (Not done yet)", "2Connect your AIClaude, ChatGPT or OpenCode (Not done yet)", "3Files and appsOptional (Not done yet)","Skip setup", "Continue",]);expect(sent()).toEqual([]);@@ -263,20 +265,31 @@ describe("CloudWelcome", () => {expect(hintsPut().at(-1)).toEqual(expect.arrayContaining([welcomeStepHint("engine")]));});- it("with no AI working, leads with the Claude sign-in and folds the other ways under it", () => {+ it("with no AI working, leads with the Claude, ChatGPT and OpenCode setups and folds the other ways under them", () => {fixture.state.config.onboarding = { ...EMPTY_ONBOARDING, hintsSeen: [welcomeStepHint("bring")] };+ // The Cloud refuses the ChatGPT plan's own sign-in: ChatGPT is Codex's.+ const plan = { ...codex, instanceId: "chatgpt", displayName: "ChatGPT plan", authentication: { method: "browser-pkce" },+ snapshot: { state: "unavailable", authenticated: false, chatgptPlan: true, authenticationUnavailableReason: "Not on a Cloud." } };+ fixture.state.instances = [claude, codex, plan, openCode];render();expect(host.querySelector('[data-welcome-step="engine"]')).not.toBeNull();+ expect(text()).toContain("Your bots think with your own Claude or ChatGPT plan, or with OpenCode. Set one up once on My Cloud.");+ expect([...host.querySelectorAll("[data-welcome-recommended]")].map((node) => node.getAttribute("data-welcome-recommended"))).toEqual(["claude", "codex", "opencodeGo"]);+ const plain = (name: string) => `Use the ${name} account you already have. You sign in on their own website, so your password stays with them.`;expect(host.querySelector('[data-welcome-recommended="claude"] [data-engine-setup="claude"]')?.getAttribute("data-description"), "one plain line, not the setup's own")- .toBe("Use the Claude account you already have. You sign in on their own website, so your password stays with them.");+ .toBe(plain("Claude"));+ expect(host.querySelector('[data-welcome-recommended="codex"] [data-engine-setup="codex"]')?.getAttribute("data-description")).toBe(plain("ChatGPT"));+ expect(host.querySelector('[data-welcome-recommended="opencodeGo"] [data-engine-setup="opencodeGo"]')?.hasAttribute("data-description"), "OpenCode installs with nothing to sign in to")+ .toBe(false);expect(host.querySelector("[data-cloud-choice]")).toBeNull();fixture.state.instances = [{ ...claude, authentication: undefined }, codex];render();expect(host.querySelector('[data-welcome-recommended="claude"] [data-engine-setup="claude"]')?.hasAttribute("data-description"), "a sign-in finished in Terminal keeps its own instructions").toBe(false);click("Other ways");- expect(host.querySelector('[data-cloud-choice="codex"]')).not.toBeNull();- expect(host.querySelector('[data-cloud-choice="claude"]'), "the recommended way is not offered twice").toBeNull();+ expect(host.querySelector('[data-cloud-choice="codex"]'), "ChatGPT is not offered twice").toBeNull();+ expect(host.querySelector('[data-cloud-choice="claude"]'), "Claude is not offered twice").toBeNull();+ expect(host.querySelector('[role="group"][aria-label]'), "no empty row of tiles").toBeNull();expect(host.querySelector('[data-cloud-choice="api-key"]')).not.toBeNull();click("Skip for now");expect(host.querySelector('[data-welcome-step="files"]')).not.toBeNull();@@ -314,6 +327,26 @@ describe("CloudWelcome", () => {expect(checks).toEqual(["claude", "codex", "codex"]);});+ it("checks OpenCode with one tiny real message once it is installed here, and Continue moves on", async () => {+ fixture.state.config.onboarding = { ...EMPTY_ONBOARDING, hintsSeen: [welcomeStepHint("bring")] };+ fixture.state.instances = [claude, codex, openCode];+ const checks: string[] = [];+ const config = fixture.api.getMockImplementation()!;+ fixture.api.mockImplementation(async (path: string, init?: RequestInit) => {+ const check = /^\/api\/instances\/([\w.-]+)\/check$/.exec(path);+ if (!check) return config(path, init);+ checks.push(check[1]!);+ return { ok: true };+ });+ render();+ fixture.state = { ...fixture.state, instances: [claude, codex, { ...openCode, snapshot: { state: "available", authenticated: true, freeFallback: true } }] };+ render();+ await vi.waitFor(() => expect(text()).toContain("OpenCode is working"));+ expect(checks).toEqual(["opencodeGo"]);+ click("Continue");+ expect(host.querySelector('[data-welcome-step="files"]')).not.toBeNull();+ });+it("in the app on a Cloud of the person's own, the folders card says this computer's files are used by themselves, with nothing to press", async () => {fixture.state.config.onboarding = { ...EMPTY_ONBOARDING, hintsSeen: [welcomeStepHint("bring"), welcomeStepHint("engine")] };fixture.plan = { status: "paid", tier: "pro", home: true };diff --git a/src/components/cloud-welcome/WelcomeSteps.tsx b/src/components/cloud-welcome/WelcomeSteps.tsxindex 5cd9bd114a..234ec12fb5 100644--- a/src/components/cloud-welcome/WelcomeSteps.tsx+++ b/src/components/cloud-welcome/WelcomeSteps.tsx@@ -1,6 +1,6 @@import { useEffect, useRef, useState, type Ref } from "react";import { Check, ChevronDown, CircleAlert, FolderOpen, Plug } from "lucide-react";-import { cloudEngine, cloudEngineChoices, useCloudEngineChoices } from "@/components/CloudEngineSignIn";+import { cloudEngineChoices, useCloudEngineChoices } from "@/components/CloudEngineSignIn";import { useCloudPlanSnapshot } from "@/components/CloudTrialNotice";import { engineReady } from "@/components/EngineLibrary";import { EngineCheckLine } from "@/components/EngineLiveCheck";@@ -9,12 +9,13 @@ import { usd } from "@/lib/cloud-plan";import { welcomeCredit } from "@/lib/cloud-welcome";import { cn } from "@/lib/cn";import { t } from "@/lib/i18n";-import { plainSignIn } from "@/lib/onboarding";+import { firstAis, signInFollows } from "@/lib/onboarding";import { useStore, type Bot } from "@/state/store";import { CARD, CARD_IDLE, CardIcon, Footer, PRIMARY, QUIET, SECONDARY, StepHeading } from "./parts";/** Connecting an AI: an AI that already works when the step opens (one signed in here, or the plan's credit) is used as- * it is and the step finishes itself; otherwise one recommended sign-in, every other way folded under it. */+ * it is and the step finishes itself; otherwise Claude's, ChatGPT's and OpenCode's own setups, every other way folded+ * under them. */export function WelcomeEngine({ name, headingRef, onFinish }: { name: string; headingRef: Ref<HTMLHeadingElement>; onFinish: () => void }) {const engines = useCloudEngineChoices();const plan = useCloudPlanSnapshot(window.ogb?.cloudPlan);@@ -27,9 +28,9 @@ export function WelcomeEngine({ name, headingRef, onFinish }: { name: string; he// eslint-disable-next-line react-hooks/exhaustive-deps}, []);if (readyOnOpen.current) return null;- const claude = cloudEngine(engines.instances, "claudeAgent");- const claudeCheck = claude && engines.live.checks[claude.instanceId];- const others = { ...engines, choices: engines.choices.filter((choice) => choice.id !== "claude") };+ const first = firstAis(engines.instances, engineReady);+ const shown = new Set(first.map(({ instance }) => instance.driverKind));+ const others = { ...engines, choices: engines.choices.filter((choice) => !shown.has(choice.driverKind)) };return <section aria-labelledby="cloud-welcome-step" data-welcome-step="engine" className="flex flex-col"><StepHeading headingRef={headingRef} title={t("cloudSetup.engine.title")} sub={t("cloudWelcome.engine.sub", { name })} />{credit?.state === "active" && <p role="status" data-welcome-credit className="mt-5 flex items-start gap-2.5 rounded-xl bg-success/12 px-3.5 py-3 text-[13px] leading-relaxed text-ink">@@ -40,11 +41,15 @@ export function WelcomeEngine({ name, headingRef, onFinish }: { name: string; he<CircleAlert size={16} aria-hidden="true" className="mt-px shrink-0 text-warning" /><span>{t(credit.state === "used_up" ? "cloudSignIn.creditUsedUp" : "cloudSignIn.creditEnded")}</span></p>}- {claude && <div data-welcome-recommended={claude.instanceId} className="mt-6 rounded-2xl border border-hairline/50 bg-card px-4 py-4">- {engineReady(claude)- ? claudeCheck && <EngineCheckLine name={claude.displayName} check={claudeCheck} onRetry={() => void engines.live.run(claude.instanceId)} />- : <EngineSetup instance={claude} unframed description={plainSignIn(claude) ? t("onboarding.engines.signInHint", { name: claude.displayName }) : undefined} />}- </div>}+ {first.map(({ kind, instance }, index) => {+ const name = kind === "chatgpt" ? t("cloudSignIn.codex") : instance.displayName;+ const check = engines.live.checks[instance.instanceId];+ return <div key={kind} data-welcome-recommended={instance.instanceId} className={cn(index ? "mt-3" : "mt-6", "rounded-2xl border border-hairline/50 bg-card px-4 py-4")}>+ {engineReady(instance)+ ? check && <EngineCheckLine name={name} check={check} onRetry={() => void engines.live.run(instance.instanceId)} />+ : <EngineSetup instance={instance} unframed description={signInFollows(instance) ? t("onboarding.engines.signInHint", { name }) : undefined} />}+ </div>;+ })}<button type="button" data-welcome-other-ways aria-expanded={more} onClick={() => setMore((value) => !value)}className="mt-4 flex items-center gap-1.5 self-start rounded-md px-1.5 py-1 text-[13px] font-medium text-ink-secondary transition-colors hover:text-ink motion-reduce:transition-none">{t("onboarding.engines.otherWays")}diff --git a/src/components/onboarding/ConnectAi.test.ts b/src/components/onboarding/ConnectAi.test.tsindex cd19ebdaf4..4475ab910a 100644--- a/src/components/onboarding/ConnectAi.test.ts+++ b/src/components/onboarding/ConnectAi.test.ts@@ -1,5 +1,5 @@// @vitest-environment happy-dom-import { act, createElement } from "react";+import { act, createElement, useState } from "react";import { createRoot, type Root } from "react-dom/client";import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";import type { ManagedDesktopBridge } from "../../../electron/managed-desktop.mjs";@@ -34,10 +34,11 @@ const { useWelcomeAi } = await import("./welcome-ai");const { useStore } = await import("@/state/store");const { track } = await import("@/lib/analytics");-/** As the first screen has it: the AI it stands on, tested once, handed to the block. */+/** As the first screen has it: the AI it stands on, tested once, handed to the block, with the one picked there. */function FirstScreenAi({ hosted = false }: { hosted?: boolean }) {const { state } = useStore();- return createElement(ConnectAi, { hosted, tested: useWelcomeAi(state.instances, !hosted) });+ const [chosen, setChosen] = useState<string | null>(null);+ return createElement(ConnectAi, { hosted, tested: useWelcomeAi(state.instances, !hosted, chosen), onChoose: setChosen });}(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }).IS_REACT_ACT_ENVIRONMENT = true;@@ -45,6 +46,10 @@ const engine = (instanceId: string, driverKind: string, displayName: string, reainstanceId, driverKind, displayName, install: { docsUrl: "https://example.test" },snapshot: { state: ready ? "available" : "unavailable", authenticated: ready }, models: { default: "m", options: [] },});+/** Not installed yet: the app installs its own copy. */+const openCode = (): InstanceInfo => ({ ...engine("opencodeGo", "opencodeGo", "OpenCode", false),+ install: { docsUrl: "https://example.test", server: { standalone: { version: "1", downloadBytes: 1 } } } } as InstanceInfo);+const freeOpenCode = (): InstanceInfo => ({ ...openCode(), snapshot: { state: "available", authenticated: true, freeFallback: true } });const bridge = { onState: vi.fn(), state: vi.fn() } as unknown as ManagedDesktopBridge;let host: HTMLDivElement, root: Root;const text = () => host.textContent ?? "";@@ -95,13 +100,13 @@ describe("connecting an AI on the first screen", () => {expect(text()).not.toContain("Couldn't check your AI connections");});- it("leads with one recommended way, then lists every other way, with no status list and no engine talk", async () => {+ it("leads with Claude's, ChatGPT's and OpenCode's own setups, then lists every other way, with no status list and no engine talk", async () => {+ f.instances.push(openCode());await show();- expect([...host.querySelectorAll("[data-engine-setup]")].map((node) => node.getAttribute("data-engine-setup"))).toEqual(["claude"]);- expect(host.querySelector("[data-ai-recommended]")?.getAttribute("data-ai-recommended")).toBe("claude");+ expect([...host.querySelectorAll("[data-engine-setup]")].map((node) => node.getAttribute("data-engine-setup"))).toEqual(["claude", "codex", "opencodeGo"]);+ expect([...host.querySelectorAll("[data-ai-recommended]")].map((node) => node.getAttribute("data-ai-recommended"))).toEqual(["claude", "codex", "opencodeGo"]);const rows = [...host.querySelectorAll("button[aria-expanded]")].map((node) => node.textContent);- expect(rows).toHaveLength(2);- expect(rows).toContain("Codex");+ expect(rows).toEqual(["Grok"]);expect(text()).not.toContain("Other ways");for (const word of [/\bengines?\b/i, /\bReady\b/, /Needs setup/i, /to set up/i, /provider/i]) expect(text()).not.toMatch(word);});@@ -116,11 +121,14 @@ describe("connecting an AI on the first screen", () => {engine("codex", "codex", "Codex", false),{ ...engine("droid", "droidAgent", "Droid", false), install: { docsUrl: "https://example.test", server: { package: "droid" } } },{ ...engine("local", "openai-compat", "Local models", false), access: "custom" },+ openCode(),];const setup = (id: string) => host.querySelector(`[data-engine-setup="${id}"]`);const plain = (name: string) => `Use the ${name} account you already have. You sign in on their own website, so your password stays with them.`;await show();expect(setup("claude")?.getAttribute("data-description")).toBe(plain("Claude"));+ expect(setup("codex")?.hasAttribute("data-description"), "Codex is finished in Terminal: its setup keeps its own instructions").toBe(false);+ expect(setup("opencodeGo")?.hasAttribute("data-description"), "OpenCode installs with nothing to sign in to").toBe(false);await otherWays();const openRow = async (name: string) => {const row = [...host.querySelectorAll<HTMLButtonElement>("button[aria-expanded]")].find((button) => button.textContent?.includes(name))!;@@ -130,10 +138,8 @@ describe("connecting an AI on the first screen", () => {expect(setup("grok")?.getAttribute("data-description")).toBe(plain("Grok"));await openRow("Droid");expect(setup("droid")?.getAttribute("data-description"), "the app installs it, then the sign-in follows").toBe(plain("Droid"));- for (const [id, name] of [["kimi", "Kimi"], ["codex", "Codex"]]) {- await openRow(name);- expect(setup(id)?.hasAttribute("data-description"), `${name} is finished in Terminal: its setup keeps its own instructions`).toBe(false);- }+ await openRow("Kimi");+ expect(setup("kimi")?.hasAttribute("data-description"), "Kimi is finished in Terminal: its setup keeps its own instructions").toBe(false);await openRow("Local models");expect(setup("local")?.getAttribute("data-intent")).toBe("inject");expect(setup("local")?.hasAttribute("data-description")).toBe(false);@@ -216,6 +222,29 @@ describe("connecting an AI on the first screen", () => {expect(host.querySelector("[data-ai-recommended]")?.getAttribute("data-ai-recommended")).toBe("claude");});+ it("counts OpenCode's free model once the person picked OpenCode here, after it answered its test message", async () => {+ f.instances = [engine("claude", "claudeAgent", "Claude", false), openCode()];+ await show();+ await act(async () => { host.querySelector<HTMLElement>('[data-ai-recommended="opencodeGo"] [data-engine-setup]')!.click(); });+ expect(f.checks, "nothing to test until it is installed").toEqual([]);+ f.instances = [engine("claude", "claudeAgent", "Claude", false), freeOpenCode()];+ await show();+ expect(f.checks).toEqual(["/api/instances/opencodeGo/check"]);+ expect(host.querySelector("[data-ai-connected]")?.textContent).toBe("Connected · OpenCode");+ expect(host.querySelector("[data-ai-backup]")).toBeNull();+ });++ it("offers the ChatGPT plan's own sign-in for ChatGPT, and no ChatGPT setup once a ChatGPT account works", async () => {+ const plan: InstanceInfo = { ...engine("chatgpt", "codex", "ChatGPT plan", false), authentication: { method: "browser-pkce" } } as InstanceInfo;+ f.instances = [engine("claude", "claudeAgent", "Claude", false), engine("codex", "codex", "Codex", false), plan];+ await show();+ expect([...host.querySelectorAll("[data-ai-recommended]")].map((node) => node.getAttribute("data-ai-recommended"))).toEqual(["claude", "chatgpt"]);+ f.check = () => Promise.resolve({ ok: false, error: "No answer." });+ f.instances = [engine("claude", "claudeAgent", "Claude", false), engine("codex", "codex", "Codex", true), plan];+ await show();+ expect([...host.querySelectorAll("[data-ai-recommended]")].map((node) => node.getAttribute("data-ai-recommended"))).toEqual(["claude"]);+ });+it("offers the organization sign-in under Other ways on this computer's own window only", async () => {await show();await otherWays();diff --git a/src/components/onboarding/ConnectAi.tsx b/src/components/onboarding/ConnectAi.tsxindex b850c9ffa4..810fa9e447 100644--- a/src/components/onboarding/ConnectAi.tsx+++ b/src/components/onboarding/ConnectAi.tsx@@ -8,7 +8,7 @@ import { cn } from "@/lib/cn";import { t } from "@/lib/i18n";import { engineDisplayName } from "@/lib/engine-name";import { modelgoOfferable } from "@/lib/modelgo-offer";-import { aiChoices, aiWorks, organisationSignIn, plainSignIn } from "@/lib/onboarding";+import { aiChoices, aiWorks, firstAis, organisationSignIn, signInFollows } from "@/lib/onboarding";import { api, useStore, type InstanceInfo } from "@/state/store";import { freeFallback } from "../../../shared/ai-ranking";import { OrganisationRow } from "./beats/OrganisationRow";@@ -18,7 +18,7 @@ import type { WelcomeAiNow } from "./welcome-ai";* instead of the setup's technical one. */function setupFor(instance: InstanceInfo) {if (instance.access === "custom") return { intent: "inject" as const };- return plainSignIn(instance)+ return signInFollows(instance)? { intent: "cloud" as const, description: t("onboarding.engines.signInHint", { name: engineDisplayName(instance) }) }: { intent: "cloud" as const };}@@ -43,10 +43,11 @@ function OtherWay({ instance, open, onToggle }: { instance: InstanceInfo; open:);}-/** Every way to connect an AI, until one has answered a test message (`tested`, from useWelcomeAi): the recommended- * one's own setup first, then the organization and every other AI. One that didn't answer says why, with Check again;- * OpenCode's free model is only ever a backup. */-export function ConnectAi({ hosted = false, tested }: { hosted?: boolean; tested: WelcomeAiNow | null }) {+/** Every way to connect an AI, until one has answered a test message (`tested`, from useWelcomeAi): Claude's, ChatGPT's+ * and OpenCode's own setups first (else the recommended one's), then the organization and every other AI. One that+ * didn't answer says why, with Check again; OpenCode's free model is only a backup until the person picks it+ * (`onChoose`). */+export function ConnectAi({ hosted = false, tested, onChoose }: { hosted?: boolean; tested: WelcomeAiNow | null; onChoose?: (instanceId: string) => void }) {const { state, dispatch } = useStore();const organisation = organisationSignIn(window.ogb, { hosted });const [failed, setFailed] = useState(false);@@ -78,7 +79,11 @@ export function ConnectAi({ hosted = false, tested }: { hosted?: boolean; testedconst connected = tested && aiWorks(tested) ? tested.instance : undefined;const backup = state.instances.find((instance) => engineReady(instance) && freeFallback(instance));- const { recommended, others } = aiChoices(state.instances.filter((instance) => instance.install && !engineReady(instance)));+ const offered = state.instances.filter((instance) => instance.install && !engineReady(instance));+ const first = firstAis(state.instances, engineReady).map(({ instance }) => instance).filter((instance) => offered.includes(instance));+ const { recommended } = aiChoices(offered);+ const leading = first.length ? first : recommended ? [recommended] : [];+ const others = offered.filter((instance) => !leading.includes(instance));const modelgoReady = state.instances.some((instance) => instance.driverKind === "modelgo" && engineReady(instance));// Hosted: the organization provides the AI and refuses a key of the person's own.const showModelgo = !hosted && !modelgoReady && modelgoOfferable(state.config?.managedPolicy);@@ -120,9 +125,14 @@ export function ConnectAi({ hosted = false, tested }: { hosted?: boolean; tested{t("onboarding.engines.freeBackup", { name: engineDisplayName(backup) })}</p>)}- {recommended ? (- <div data-ai-recommended={recommended.instanceId} className="animate-rise w-full rounded-2xl bg-card p-4 text-left">- <EngineSetup instance={recommended} {...setupFor(recommended)} className="border-0 bg-transparent p-0" />+ {leading.length ? (+ <div className="flex w-full flex-col gap-3">+ {leading.map((instance) => (+ <div key={instance.instanceId} data-ai-recommended={instance.instanceId} className="animate-rise w-full rounded-2xl bg-card p-4 text-left"+ onClickCapture={() => onChoose?.(instance.instanceId)}>+ <EngineSetup instance={instance} {...setupFor(instance)} className="border-0 bg-transparent p-0" />+ </div>+ ))}</div>) : !tested && !backup && !failed ? (<p className="text-[13px] text-ink-secondary" aria-live="polite">{t("common.checking")}</p>@@ -163,7 +173,9 @@ export function ConnectAi({ hosted = false, tested }: { hosted?: boolean; tested}/** "Connect an AI": every way to connect one, over the first screen or the chat, until it is closed. */-export function ConnectAiDialog({ hosted = false, tested, onClose }: { hosted?: boolean; tested: WelcomeAiNow | null; onClose: () => void }) {+export function ConnectAiDialog({ hosted = false, tested, onChoose, onClose }: {+ hosted?: boolean; tested: WelcomeAiNow | null; onChoose?: (instanceId: string) => void; onClose: () => void;+}) {return (<divclassName="ui-scrim fixed inset-0 z-[60] flex items-center justify-center p-4"@@ -191,7 +203,7 @@ export function ConnectAiDialog({ hosted = false, tested, onClose }: { hosted?:</div><div className="ui-modal-divider shrink-0" /><div className="min-h-0 overflow-y-auto p-4 [scrollbar-width:thin]">- <ConnectAi hosted={hosted} tested={tested} />+ <ConnectAi hosted={hosted} tested={tested} onChoose={onChoose} /></div></div></div>diff --git a/src/components/onboarding/MeetScreen.tsx b/src/components/onboarding/MeetScreen.tsxindex b0c2056378..0b5e7dd7ab 100644--- a/src/components/onboarding/MeetScreen.tsx+++ b/src/components/onboarding/MeetScreen.tsx@@ -7,11 +7,12 @@ import { brand, productName } from "@/lib/brand";import { cn } from "@/lib/cn";import { DEFAULT_BOT_NAME, myDefaultBot, useViewerEmail } from "@/lib/default-bot";import { activeLocale, t } from "@/lib/i18n";-import { aiChoices, aiWorks } from "@/lib/onboarding";-import { useStore } from "@/state/store";+import { aiChoices, aiWorks, firstAis, type FirstAiKind } from "@/lib/onboarding";+import { useStore, type InstanceInfo } from "@/state/store";+import { freeFallback } from "../../../shared/ai-ranking";import { ConnectAiDialog } from "./ConnectAi";import { PILL, SignInPill, useSignInPill } from "./SignInPill";-import { useWelcomeAi } from "./welcome-ai";+import { aiRuns, useWelcomeAi } from "./welcome-ai";const MASCOT_SIZE = 72;const PLACEHOLDER_MS = 700;@@ -54,27 +55,43 @@ function DemoComposer({ reduced, onTyping }: { reduced: boolean; onTyping: (typi}/** The first run's first screen: the app's name, its mascot and a composer typing one sentence, then one pill. With- * no AI working yet the pill is the sign-in, and Next comes once the AI has answered its test message. */+ * no AI working yet the pills are the sign-ins (Claude, ChatGPT and OpenCode), and Next comes once the AI has answered+ * its test message. */export function MeetScreen({ hosted, onNext }: { hosted: boolean; onNext: () => void }) {const { state } = useStore();const reduced = usePrefersReducedMotion();const maus = myDefaultBot(state.bots, useViewerEmail());- // An AI counts once it answered a test message (or cannot be sent one); OpenCode's free model never does.- const tested = useWelcomeAi(state.instances, !hosted);+ // An AI counts once it answered a test message (or cannot be sent one); OpenCode's free model only once picked here.+ const [chosen, setChosen] = useState<string | null>(null);+ const tested = useWelcomeAi(state.instances, !hosted, chosen);const ready = aiWorks(tested);const known = state.instances.length > 0;const [asking, setAsking] = useState(false);useEffect(() => {if (!hosted && known && !ready && tested?.state !== "testing") setAsking(true);}, [hosted, known, ready, tested?.state]);+ const works = (instance: InstanceInfo) => aiRuns(instance) && !freeFallback(instance);+ // Picked and installed, still listing its models: its pill waits until its test message.+ const settling = (instance: InstanceInfo | undefined) => Boolean(instance && instance.instanceId === chosen && engineReady(instance) && !aiRuns(instance));+ const first = firstAis(state.instances, works).filter(({ instance }) => !works(instance) && (instance.install || engineReady(instance)));const { recommended } = aiChoices(state.instances.filter((instance) => instance.install && !engineReady(instance)));- const pill = useSignInPill(recommended);+ const choice = (kind: FirstAiKind) => first.find((entry) => entry.kind === kind)?.instance;+ const lead = first.length ? undefined : recommended;+ const pills = {+ claude: useSignInPill(choice("claude") ?? lead),+ chatgpt: useSignInPill(choice("chatgpt")),+ opencode: useSignInPill(choice("opencode")),+ };+ const shown = first.length ? first : [{ kind: "claude" as const, instance: lead }];const [dialog, setDialog] = useState(false);const [typing, setTyping] = useState(false);const logo = brand().logo;const face = typing ? "listening" : "idle";- const failure = pill.error ?? (tested?.state === "failed" ? tested.error ?? t("onboarding.engines.noAnswer", { name: tested.instance.displayName }) : null);+ const testing = tested?.state === "testing" ? tested.instance.instanceId : null;+ const waitsFor = shown.some(({ instance }) => instance?.instanceId === testing) ? testing : shown[0]?.instance?.instanceId;+ const failure = shown.map(({ kind }) => pills[kind].error).find(Boolean)+ ?? (tested?.state === "failed" ? tested.error ?? t("onboarding.engines.noAnswer", { name: tested.instance.displayName }) : null);const signingIn = asking && !ready;return (<div className="relative h-full min-h-[600px] w-full text-center">@@ -96,14 +113,23 @@ export function MeetScreen({ hosted, onNext }: { hosted: boolean; onNext: () =>{t("onboarding.hosted.intro")}</p>)}- <div className="absolute left-1/2 top-[calc(50%+200px)] flex w-[320px] max-w-[calc(100%-32px)] -translate-x-1/2 flex-col items-center">+ <div className={cn("absolute left-1/2 flex w-[320px] max-w-[calc(100%-32px)] -translate-x-1/2 flex-col items-center",+ signingIn ? "top-[min(calc(50%+200px),calc(100%-180px))]" : "top-[calc(50%+200px)]")}>{asking && ready && tested && (<p role="status" data-ai-connected="" className="absolute -top-8 flex items-center gap-1.5 whitespace-nowrap text-[13px] leading-[18px] text-success"><Check size={14} strokeWidth={2.5} aria-hidden="true" />{t("onboarding.meet.connected", { name: tested.instance.displayName })}</p>)}{signingIn ? (- <SignInPill pill={pill} instance={recommended} waiting={tested?.state === "testing"} onDialog={() => setDialog(true)} />+ <div data-first-ais="" className="flex flex-col items-center gap-2">+ {shown.map(({ kind, instance }, index) => (+ <SignInPill key={kind} pill={pills[kind]} instance={instance} quiet={index > 0}+ name={kind === "chatgpt" ? t("cloudSignIn.codex") : undefined}+ setUp={kind === "chatgpt" && instance?.snapshot.state !== "available"}+ waiting={(testing !== null && instance?.instanceId === waitsFor) || settling(instance)}+ onDialog={() => setDialog(true)} onPick={instance && (() => setChosen(instance.instanceId))} />+ ))}+ </div>) : (<button type="button" data-primary="" onClick={onNext} className={cn(PILL, asking && "animate-fade-in [animation-duration:150ms]")}>{t("onboarding.meet.next")}@@ -118,7 +144,7 @@ export function MeetScreen({ hosted, onNext }: { hosted: boolean; onNext: () =>)}{signingIn && failure && <p role="alert" className="mt-2 text-[13px] leading-[18px] text-danger">{failure}</p>}</div>- {dialog && <ConnectAiDialog hosted={hosted} tested={tested} onClose={() => setDialog(false)} />}+ {dialog && <ConnectAiDialog hosted={hosted} tested={tested} onChoose={setChosen} onClose={() => setDialog(false)} />}</div>);}diff --git a/src/components/onboarding/SignInPill.tsx b/src/components/onboarding/SignInPill.tsxindex 2179a1d689..8a4fd9d63f 100644--- a/src/components/onboarding/SignInPill.tsx+++ b/src/components/onboarding/SignInPill.tsx@@ -2,6 +2,7 @@ import { useCallback, useEffect, useRef, useState } from "react";import { ArrowUp, Check, Copy, LoaderCircle } from "lucide-react";import { claudeSignInLink } from "@/components/ClaudeSignIn";import { chatgptPlanLink, deviceSignInProvider, type DeviceSignInStatus } from "@/components/DeviceSignIn";+import { engineReady } from "@/components/EngineLibrary";import { needsSignIn } from "@/components/EngineSetup";import { openExternalLink } from "@/lib/app-links";import { useCopyFeedback } from "@/lib/copy-text";@@ -16,6 +17,7 @@ const POLL_MAX_MS = 30_000;const POLL_STALLS = 3;const POLL_TIMEOUT_MS = 10_000;export const PILL = "ui-button ui-button-pill ui-button-lg ui-button-primary w-[288px] max-w-full";+const QUIET_PILL = "ui-button ui-button-pill ui-button-lg w-[288px] max-w-full";type Slot =| { kind: "start" }@@ -67,6 +69,7 @@ export function useSignInPill(instance: InstanceInfo | undefined) {try {await api(`${base}/install`, { method: "POST" });try { await refreshInstances(); } catch {}+ try { await refreshModels(id); } catch {}if (live.current) setSlot({ kind: "start" });} catch (cause) { fail(cause); }};@@ -185,20 +188,27 @@ function PasteSlot({ name, onSubmit }: { name: string; onSubmit: (code: string)}/** The first screen's 288×36 slot while an AI is still to connect: its one button, the field for the code a provider- * shows, or the code to enter on the provider's page. */-export function SignInPill({ pill, instance, waiting, onDialog }: {+ * shows, or the code to enter on the provider's page. A `quiet` pill is one of the choices under the first, and one+ * that already works (OpenCode's free backup) is used as it is once picked. */+export function SignInPill({ pill, instance, name = instance?.displayName ?? "", quiet = false, setUp = false, waiting, onDialog, onPick }: {pill: PillState;instance: InstanceInfo | undefined;+ name?: string;+ quiet?: boolean;+ /** Its command-line app isn't here yet: the pill says Set up, not Install or Connect. */+ setUp?: boolean;/** The test message after a sign-in is under way: the pill waits with it. */waiting: boolean;onDialog: () => void;+ /** The person picked this AI. */+ onPick?: () => void;}) {const { slot, install, start, submit } = pill;- const name = instance?.displayName ?? "";+ const look = quiet ? QUIET_PILL : PILL;if (waiting || slot.kind === "busy" || slot.kind === "waiting") {const link = slot.kind === "waiting" ? slot.link : null;return (- <button type="button" data-sign-in="waiting" className={PILL} aria-disabled={!link}+ <button type="button" data-sign-in="waiting" className={look} aria-disabled={!link}onClick={() => link && void openExternalLink(link).catch(() => {})}><LoaderCircle size={14} aria-hidden="true" className="shrink-0 animate-spin" />{t("onboarding.meet.waiting", { name })}</button>@@ -206,13 +216,19 @@ export function SignInPill({ pill, instance, waiting, onDialog }: {}if (slot.kind === "paste") return <PasteSlot name={name} onSubmit={(code) => void submit(code)} />;if (slot.kind === "code") return <CodeSlot code={slot.code} />;- const way = pillWay(instance);- const label = way === "install" ? t("onboarding.meet.install", { name })+ const way = instance && engineReady(instance) ? "use" : pillWay(instance);+ const label = setUp && (way === "install" || way === "dialog") ? t("onboarding.meet.setUp", { name })+ : way === "install" ? t("onboarding.meet.install", { name }): way === "sign-in" ? t("onboarding.meet.signIn", { name }): instance ? t("onboarding.meet.connectNamed", { name }) : t("onboarding.meet.connectAi");return (- <button type="button" data-primary="" data-sign-in={way} className={PILL}- onClick={() => (way === "install" ? void install() : way === "sign-in" ? void start() : onDialog())}>+ <button type="button" data-primary={quiet ? undefined : ""} data-sign-in={way} className={look}+ onClick={() => {+ onPick?.();+ if (way === "install") void install();+ else if (way === "sign-in") void start();+ else if (way === "dialog") onDialog();+ }}>{label}</button>);diff --git a/src/components/onboarding/WelcomeFlow.test.ts b/src/components/onboarding/WelcomeFlow.test.tsindex fc6db38c59..2965640a90 100644--- a/src/components/onboarding/WelcomeFlow.test.ts+++ b/src/components/onboarding/WelcomeFlow.test.ts@@ -36,6 +36,8 @@ const freeOpenCode: InstanceInfo = {instanceId: "opencodeGo", driverKind: "opencodeGo", displayName: "OpenCode", install: { docsUrl: "https://example.test" },snapshot: { state: "available", authenticated: true, freeFallback: true }, models: { default: "opencode/big-pickle", options: [] }, aiTest: "passed",};+const notInstalledOpenCode = { ...freeOpenCode, snapshot: { state: "unavailable" }, aiTest: undefined,+ install: { docsUrl: "https://example.test", server: { standalone: { version: "1", downloadBytes: 1 } } } } as InstanceInfo;const signIn = (): InstanceInfo => ({ ...claude(false), snapshot: { state: "available", authenticated: false }, authentication: { method: "paste-code" } } as InstanceInfo);const maus = { id: "maus", threadId: "t", name: "MausBot", title: "", description: "", notifications: true, color: "chrome", unread: false,modelSelection: { instanceId: "claude", model: "m" }, messages: [], defaultBot: {}, chiefOfStaff: true };@@ -192,6 +194,63 @@ describe("with no AI working yet", () => {expect(text()).toContain("Introducing your Chief of Staff");});+ it("offers Claude, ChatGPT and OpenCode as equal pills, Claude first and the one Enter presses", async () => {+ const plan = { instanceId: "chatgpt", driverKind: "codex", displayName: "ChatGPT plan", install: { docsUrl: "https://example.test" },+ snapshot: { state: "available", authenticated: false }, authentication: { method: "browser-pkce" }, models: { default: "m", options: [] } } as InstanceInfo;+ f.state = { ...f.state, instances: [signIn(), plan, notInstalledOpenCode] };+ await show();+ const pills = [...host.querySelectorAll("[data-first-ais] button")].map((node) => node.textContent);+ expect(pills).toEqual(["Sign in with Claude", "Sign in with ChatGPT", "Install OpenCode"]);+ expect([...host.querySelectorAll("[data-primary]")].map((node) => node.textContent), "one primary pill").toEqual(["Sign in with Claude"]);+ expect(button("Other ways to connect")).toBeDefined();+ expect(button("Set up later")).toBeDefined();+ });++ it("says Set up ChatGPT, not Install, while Codex isn't on this computer yet", async () => {+ const plan = { instanceId: "chatgpt", driverKind: "codex", displayName: "ChatGPT plan", snapshot: { state: "unavailable" },+ install: { docsUrl: "https://example.test", server: { package: "@openai/codex" } }, authentication: { method: "browser-pkce" }, models: { default: "m", options: [] } } as InstanceInfo;+ const claudeToInstall = { ...claude(false), install: { docsUrl: "https://example.test", server: { package: "@anthropic-ai/claude-code" } } } as InstanceInfo;+ f.state = { ...f.state, instances: [claudeToInstall, plan, { ...plan, instanceId: "codex", install: { docsUrl: "https://example.test" } }] };+ await show();+ expect([...host.querySelectorAll("[data-first-ais] button")].map((node) => node.textContent)).toEqual(["Install Claude", "Set up ChatGPT"]);+ await press("Set up ChatGPT");+ expect(f.api).toHaveBeenCalledWith("/api/instances/chatgpt/install", { method: "POST" });+ // Without an install the app can run, it opens the dialog under the same label.+ f.state = { ...f.state, instances: [claudeToInstall, { ...plan, install: { docsUrl: "https://example.test" } }] };+ await show();+ await press("Set up ChatGPT");+ expect(host.querySelector("[data-connect-ai]")).not.toBeNull();+ });++ it("installs OpenCode from its pill and counts its free model once it answered, since the person picked it", async () => {+ f.state = { ...f.state, instances: [signIn(), notInstalledOpenCode] };+ await show();+ await press("Install OpenCode");+ expect(f.api).toHaveBeenCalledWith("/api/instances/opencodeGo/install", { method: "POST" });+ // Installed, still listing its models: its pill waits.+ f.state = { ...f.state, instances: [signIn(), { ...freeOpenCode, snapshot: { state: "available", authenticated: true }, models: { default: "", options: [] }, aiTest: undefined }] };+ await show();+ expect(button("Waiting for OpenCode…")).toBeDefined();+ expect(button("Next")).toBeUndefined();+ expect(f.checks).toEqual([]);+ f.state = { ...f.state, instances: [signIn(), { ...freeOpenCode, aiTest: undefined }] };+ await show();+ await act(async () => {});+ expect(f.checks).toEqual(["/api/instances/opencodeGo/check"]);+ expect(text()).toContain("Connected to OpenCode");+ expect(button("Next")!.disabled).toBe(false);+ });++ it("uses an OpenCode that already works once its pill is pressed, and not before", async () => {+ f.state = { ...f.state, instances: [freeOpenCode, claude(false)] };+ await show();+ expect(button("Next")).toBeUndefined();+ await press("Connect OpenCode");+ await act(async () => {});+ expect(text()).toContain("Connected to OpenCode");+ expect(button("Next")!.disabled).toBe(false);+ });+it("opens every other way in the Connect an AI dialog, where OpenCode's free model is only a backup", async () => {f.state = { ...f.state, instances: [freeOpenCode, claude(false)] };await show();diff --git a/src/components/onboarding/welcome-ai.ts b/src/components/onboarding/welcome-ai.tsindex 7c4b5c190d..a93cca59a2 100644--- a/src/components/onboarding/welcome-ai.ts+++ b/src/components/onboarding/welcome-ai.ts@@ -9,7 +9,7 @@ type Known = { state: AiTestState; error?: string };const keyOf = (instance: InstanceInfo) => `${instance.instanceId}\n${aiSignInKey(instance.snapshot)}`;/** As the new-bot default sees it: an AI that offers no model yet (OpenCode still listing them) can't run a bot. */-const runs = (instance: InstanceInfo) =>+export const aiRuns = (instance: InstanceInfo) =>engineReady(instance) && Boolean(instance.models.default.trim() || instance.models.options.some((option) => option.id.trim()));export type WelcomeAiNow = NonNullable<ReturnType<typeof welcomeAi<InstanceInfo>>> & {@@ -21,8 +21,9 @@ export type WelcomeAiNow = NonNullable<ReturnType<typeof welcomeAi<InstanceInfo>/** The AI the welcome stands on (welcomeAi), after one tiny test message through the server's check when this sign-in* hasn't had one: the server shares a test already under way, and its result also settles the new-bot default. A check- * that can't be made trusts the AI as before. `enabled` is false for a viewer who can't run checks. */-export function useWelcomeAi(instances: readonly InstanceInfo[], enabled = true): WelcomeAiNow | null {+ * that can't be made trusts the AI as before. `enabled` is false for a viewer who can't run checks; `chosen` is the AI the+ * person picked on the welcome, which counts even as OpenCode's free backup. */+export function useWelcomeAi(instances: readonly InstanceInfo[], enabled = true, chosen: string | null = null): WelcomeAiNow | null {const [answers, setAnswers] = useState<Record<string, Known>>({});const asked = useRef(new Set<string>());const live = useRef(true);@@ -46,7 +47,7 @@ export function useWelcomeAi(instances: readonly InstanceInfo[], enabled = true)}, []);const known = (instance: InstanceInfo): Known | undefined => answers[keyOf(instance)]?? (instance.aiTest && instance.aiTest !== "testing" ? { state: instance.aiTest, ...(instance.aiTestError ? { error: instance.aiTestError } : {}) } : undefined);- const found = welcomeAi(instances, runs, (instance) => known(instance)?.state);+ const found = welcomeAi(instances, aiRuns, (instance) => known(instance)?.state, (instance) => instance.instanceId === chosen);const asking = enabled && found?.state === "testing" ? keyOf(found.instance) : null;useEffect(() => {if (asking) ask(asking);diff --git a/src/lib/onboarding.test.ts b/src/lib/onboarding.test.tsindex f47932d7bf..645ae8da2b 100644--- a/src/lib/onboarding.test.ts+++ b/src/lib/onboarding.test.ts@@ -1,6 +1,7 @@import { afterEach, describe, expect, it, vi } from "vitest";import {aiChoices,+ firstAis,aiWorks,beatsFor,cloudSignInDue,@@ -179,6 +180,32 @@ describe("connecting an AI in the welcome", () => {});});+describe("the welcome's first three ways to connect an AI", () => {+ type Row = { id: string; driverKind: string; access?: string; readOnly?: boolean; ready?: boolean;+ authentication?: { method?: string }; snapshot?: { authenticationUnavailableReason?: string } };+ const row = (id: string, driverKind: string, extra: Partial<Row> = {}): Row => ({ id, driverKind, ...extra });+ const first = (rows: Row[]) => firstAis(rows, (r) => r.ready === true).map(({ kind, instance }) => [kind, instance.id]);++ it("are Claude, ChatGPT and OpenCode, in that order, whatever order they are listed in", () => {+ expect(first([row("opencodeGo", "opencodeGo"), row("grok", "grokAgent"), row("codex", "codex"), row("claude", "claudeAgent")]))+ .toEqual([["claude", "claude"], ["chatgpt", "codex"], ["opencode", "opencodeGo"]]);+ expect(first([row("grok", "grokAgent")])).toEqual([]);+ });++ it("use ChatGPT's plan sign-in where it can work here, Codex's own on a Cloud, and one already working first", () => {+ const codex = row("codex", "codex", { authentication: { method: "device-code" } });+ const plan = row("chatgpt", "codex", { authentication: { method: "browser-pkce" } });+ expect(first([codex, plan])).toEqual([["chatgpt", "chatgpt"]]);+ expect(first([codex, { ...plan, snapshot: { authenticationUnavailableReason: "Not on a Cloud." } }])).toEqual([["chatgpt", "codex"]]);+ expect(first([{ ...codex, ready: true }, plan])).toEqual([["chatgpt", "codex"]]);+ });++ it("are never an API key, a custom endpoint or an organization's model", () => {+ expect(first([row("claudeApi", "claudeAgent", { access: "api" }), row("company", "claudeAgent", { readOnly: true }),+ row("endpoint", "codex", { access: "custom" })])).toEqual([]);+ });+});+describe("the AI the welcome stands on", () => {type Ai = { id: string; driverKind: string; ready: boolean; aiTest?: "testing" | "passed" | "failed" | "untestable"; snapshot?: { freeFallback?: boolean } };const ai = (id: string, driverKind: string, extra: Partial<Ai> = {}): Ai => ({ id, driverKind, ready: true, ...extra });@@ -193,6 +220,14 @@ describe("the AI the welcome stands on", () => {expect(stand([])).toBeNull();});+ it("is OpenCode's free model once the person picked OpenCode on the welcome, after any other ready AI", () => {+ const backup = ai("opencodeGo", "opencodeGo", { snapshot: { freeFallback: true }, aiTest: "passed" });+ const picked = (instance: Ai) => instance.id === "opencodeGo";+ const found = welcomeAi([backup], (instance) => instance.ready, (instance) => instance.aiTest, picked);+ expect(found && { id: found.instance.id, state: found.state }).toEqual({ id: "opencodeGo", state: "passed" });+ expect(welcomeAi([backup, ai("claude", "claudeAgent")], (instance) => instance.ready, (instance) => instance.aiTest, picked)?.instance.id).toBe("claude");+ });+it("is the best ready AI, waiting on its test, and works once it answered", () => {expect(stand([ai("grok", "grokAgent"), ai("claude", "claudeAgent")])).toEqual({ id: "claude", state: "testing" });expect(stand([ai("grok", "grokAgent"), ai("claude", "claudeAgent", { aiTest: "testing" })])).toEqual({ id: "claude", state: "testing" });diff --git a/src/lib/onboarding.ts b/src/lib/onboarding.tsindex 7d3f799b0f..7e1805611e 100644--- a/src/lib/onboarding.ts+++ b/src/lib/onboarding.ts@@ -176,15 +176,47 @@ export function aiChoices<Instance extends AiChoice>(instances: readonly Instancreturn { recommended, others: instances.filter((instance) => instance !== recommended) };}+export type FirstAiKind = "claude" | "chatgpt" | "opencode";++interface FirstAi extends AiChoice {+ authentication?: { method?: string };+ snapshot?: { freeFallback?: boolean; authenticationUnavailableReason?: string };+}++const FIRST_AIS: ReadonlyArray<[FirstAiKind, string]> = [["claude", "claudeAgent"], ["chatgpt", "codex"], ["opencode", "opencodeGo"]];++/** The welcome's three first ways to connect an AI, in this order: a Claude account, a ChatGPT account through Codex and+ * OpenCode. Each is the provider's own sign-in that can work here: one already `ready` first, then ChatGPT's plan sign-in+ * in the browser, else the first listed (on a Cloud, which refuses the plan sign-in, Codex's own). */+export function firstAis<Instance extends FirstAi>(+ instances: readonly Instance[],+ ready: (instance: Instance) => boolean = () => false,+): Array<{ kind: FirstAiKind; instance: Instance }> {+ const own = instances.filter((instance) => !instance.readOnly && instance.access !== "api" && instance.access !== "custom"+ && !instance.snapshot?.authenticationUnavailableReason);+ return FIRST_AIS.flatMap(([kind, driverKind]) => {+ const group = own.filter((instance) => instance.driverKind === driverKind);+ const instance = group.find(ready) ?? group.find((candidate) => candidate.authentication?.method === "browser-pkce") ?? group[0];+ return instance ? [{ kind, instance }] : [];+ });+}++/** OpenCode's free models need no account, so its setup keeps its own words instead of the plain sign-in line. */+export function signInFollows(instance: SignInStep & { driverKind: string }): boolean {+ return plainSignIn(instance) && instance.driverKind !== "opencodeGo";+}+/** The AI the welcome's Connect an AI step stands on: the best ready AI (the same ranking) that isn't OpenCode's free- * backup, passing over one whose test message got no answer. An AI not tested yet is `testing`; none ready is null. */+ * backup unless the person `chose` it on the welcome, passing over one whose test message got no answer. An AI not+ * tested yet is `testing`; none ready is null. */export function welcomeAi<Instance extends RankableAi>(instances: readonly Instance[],ready: (instance: Instance) => boolean,test: (instance: Instance) => AiTestState | undefined,+ chose: (instance: Instance) => boolean = () => false,): { instance: Instance; state: AiTestState } | null {let silent: Instance | undefined;- for (const instance of rankAis(instances.filter((candidate) => ready(candidate) && !freeFallback(candidate)))) {+ for (const instance of rankAis(instances.filter((candidate) => ready(candidate) && (!freeFallback(candidate) || chose(candidate))))) {const state = test(instance) ?? "testing";if (state !== "failed") return { instance, state };silent ??= instance;diff --git a/src/locales/en.json b/src/locales/en.jsonindex 7e4f7c6bf8..e731bc0afc 100644--- a/src/locales/en.json+++ b/src/locales/en.json@@ -1633,6 +1633,8 @@"cloudSignIn.keyHint": "Runs on your API key.","cloudSignIn.codex": "ChatGPT","cloudSignIn.codexHint": "Use your ChatGPT plan with Codex.",+ "cloudSignIn.opencode": "OpenCode",+ "cloudSignIn.opencodeHint": "Free models, no account needed.","cloudSignIn.grok": "Grok","cloudSignIn.grokHint": "Use your grok.com subscription with Grok Build.","cloudSignIn.apiKey": "Use an API key",@@ -1703,7 +1705,7 @@"cloudWelcome.skip": "Skip setup","cloudWelcome.step.bring": "Bring your stuff","cloudWelcome.step.bringHint": "Your bots and chats",- "cloudWelcome.step.engineHint": "Claude or ChatGPT",+ "cloudWelcome.step.engineHint": "Claude, ChatGPT or OpenCode","cloudWelcome.step.files": "Files and apps","cloudWelcome.step.filesHint": "Optional","cloudWelcome.bring.title": "What should {name} start with?",@@ -1726,7 +1728,7 @@"cloudWelcome.bring.move": "Move","cloudWelcome.bring.mausBotStays": "Stays on My Cloud: everyone on a team gets their own","cloudWelcome.bring.moveFailed": "Couldn't move {bot}. It's still on My Cloud, unchanged.",- "cloudWelcome.engine.sub": "Your bots think with your own Claude or ChatGPT plan. Sign in once on {name}.",+ "cloudWelcome.engine.sub": "Your bots think with your own Claude or ChatGPT plan, or with OpenCode. Set one up once on {name}.","cloudWelcome.engine.credit": "You have {amount} of Claude credit, so your bots can start right now. Sign in whenever you're ready.","cloudWelcome.engine.creditPlain": "Your trial comes with Claude credit, so your bots can start right now. Sign in whenever you're ready.","cloudWelcome.engine.useCredit": "Use my credit for now",@@ -3529,6 +3531,7 @@"onboarding.meet.connectNamed": "Connect {name}","onboarding.meet.signIn": "Sign in with {name}","onboarding.meet.install": "Install {name}",+ "onboarding.meet.setUp": "Set up {name}","onboarding.meet.waiting": "Waiting for {name}…","onboarding.meet.paste": "Paste the code from {name}","onboarding.meet.pasteSubmit": "Use this code",diff --git a/src/locales/es.json b/src/locales/es.jsonindex 98fb6beee2..f5ecc51fc0 100644--- a/src/locales/es.json+++ b/src/locales/es.json@@ -1135,7 +1135,6 @@"cloudWelcome.skip": "Omitir la configuración","cloudWelcome.step.bring": "Trae tus cosas","cloudWelcome.step.bringHint": "Tus bots y chats",- "cloudWelcome.step.engineHint": "Claude o ChatGPT","cloudWelcome.step.files": "Archivos y apps","cloudWelcome.step.filesHint": "Opcional","cloudWelcome.bring.title": "¿Con qué debería empezar {name}?",@@ -1156,7 +1155,6 @@"cloudWelcome.bring.move": "Mover","cloudWelcome.bring.mausBotStays": "Se queda en My Cloud: cada persona del equipo tiene el suyo","cloudWelcome.bring.moveFailed": "No se pudo mover {bot}. Sigue en My Cloud, sin cambios.",- "cloudWelcome.engine.sub": "Tus bots piensan con tu propio plan de Claude o ChatGPT. Inicia sesión una vez en {name}.","cloudWelcome.engine.credit": "Tienes {amount} de crédito de Claude, así que tus bots pueden empezar ahora mismo. Inicia sesión cuando quieras.","cloudWelcome.engine.creditPlain": "Tu prueba incluye crédito de Claude, así que tus bots pueden empezar ahora mismo. Inicia sesión cuando quieras.","cloudWelcome.engine.useCredit": "Usar mi crédito por ahora",diff --git a/src/locales/it.json b/src/locales/it.jsonindex 885138c4f7..5174abfb09 100644--- a/src/locales/it.json+++ b/src/locales/it.json@@ -1252,7 +1252,6 @@"cloudWelcome.skip": "Salta la configurazione","cloudWelcome.step.bring": "Porta le tue cose","cloudWelcome.step.bringHint": "I tuoi bot e le chat",- "cloudWelcome.step.engineHint": "Claude o ChatGPT","cloudWelcome.step.files": "File e app","cloudWelcome.step.filesHint": "Facoltativo","cloudWelcome.bring.title": "Da cosa parte {name}?",@@ -1274,7 +1273,6 @@"cloudWelcome.bring.move": "Sposta","cloudWelcome.bring.mausBotStays": "Resta su My Cloud: ognuno nel team ha il suo","cloudWelcome.bring.moveFailed": "Impossibile spostare {bot}. È ancora su My Cloud, senza modifiche.",- "cloudWelcome.engine.sub": "I tuoi bot pensano con il tuo piano Claude o ChatGPT. Accedi una volta su {name}.","cloudWelcome.engine.credit": "Hai {amount} di credito Claude, così i tuoi bot possono partire subito. Accedi quando vuoi.","cloudWelcome.engine.creditPlain": "La prova include credito Claude, così i tuoi bot possono partire subito. Accedi quando vuoi.","cloudWelcome.engine.useCredit": "Usa il mio credito per ora",diff --git a/src/locales/ja.json b/src/locales/ja.jsonindex ba88ab95eb..7ebf8e0ea8 100644--- a/src/locales/ja.json+++ b/src/locales/ja.json@@ -1410,7 +1410,6 @@"cloudWelcome.skip": "セットアップをスキップ","cloudWelcome.step.bring": "データを移行","cloudWelcome.step.bringHint": "ボットとチャット",- "cloudWelcome.step.engineHint": "ClaudeまたはChatGPT","cloudWelcome.step.files": "ファイルとアプリ","cloudWelcome.step.filesHint": "任意","cloudWelcome.bring.title": "{name}を何から始めますか?",@@ -1432,7 +1431,6 @@"cloudWelcome.bring.move": "移動","cloudWelcome.bring.mausBotStays": "My Cloud に残ります。チームでは各自に専用のものがあります","cloudWelcome.bring.moveFailed": "{bot} を移動できませんでした。My Cloud に変更なく残っています。",- "cloudWelcome.engine.sub": "ボットは、お客様ご自身のClaudeまたはChatGPTのプランで思考します。{name}で一度サインインしてください。","cloudWelcome.engine.credit": "{amount}分のClaudeクレジットがあるため、ボットはすぐに使い始められます。サインインは準備ができたときで構いません。","cloudWelcome.engine.creditPlain": "トライアルにはClaudeクレジットが含まれているため、ボットはすぐに使い始められます。サインインは準備ができたときで構いません。","cloudWelcome.engine.useCredit": "当面はクレジットを使う",diff --git a/src/locales/ko.json b/src/locales/ko.jsonindex d4ffb85bcf..cbf8613710 100644--- a/src/locales/ko.json+++ b/src/locales/ko.json@@ -1333,7 +1333,6 @@"cloudWelcome.skip": "설정 건너뛰기","cloudWelcome.step.bring": "내 것 가져오기","cloudWelcome.step.bringHint": "봇과 채팅",- "cloudWelcome.step.engineHint": "Claude 또는 ChatGPT","cloudWelcome.step.files": "파일과 앱","cloudWelcome.step.filesHint": "선택","cloudWelcome.bring.title": "{name}을(를) 무엇으로 시작할까요?",@@ -1355,7 +1354,6 @@"cloudWelcome.bring.move": "옮기기","cloudWelcome.bring.mausBotStays": "My Cloud에 남아요. 팀에서는 각자 자기 것을 받아요","cloudWelcome.bring.moveFailed": "{bot}을(를) 옮기지 못했어요. My Cloud에 그대로 있어요.",- "cloudWelcome.engine.sub": "봇은 내 Claude 또는 ChatGPT 요금제로 생각해요. {name}에서 한 번만 로그인하세요.","cloudWelcome.engine.credit": "Claude 크레딧이 {amount} 있어서 봇이 지금 바로 시작할 수 있어요. 준비되면 언제든 로그인하세요.","cloudWelcome.engine.creditPlain": "체험에 Claude 크레딧이 포함되어 있어서 봇이 지금 바로 시작할 수 있어요. 준비되면 언제든 로그인하세요.","cloudWelcome.engine.useCredit": "지금은 크레딧 사용",diff --git a/src/locales/pl.json b/src/locales/pl.jsonindex 6ebf9ce261..091b78c90a 100644--- a/src/locales/pl.json+++ b/src/locales/pl.json@@ -1270,7 +1270,6 @@"cloudWelcome.skip": "Pomiń konfigurację","cloudWelcome.step.bring": "Przenieś swoje rzeczy","cloudWelcome.step.bringHint": "Twoje boty i czaty",- "cloudWelcome.step.engineHint": "Claude lub ChatGPT","cloudWelcome.step.files": "Pliki i aplikacje","cloudWelcome.step.filesHint": "Opcjonalne","cloudWelcome.bring.title": "Od czego ma zacząć {name}?",@@ -1292,7 +1291,6 @@"cloudWelcome.bring.move": "Przenieś","cloudWelcome.bring.mausBotStays": "Zostaje na My Cloud: w zespole każdy ma własnego","cloudWelcome.bring.moveFailed": "Nie można przenieść {bot}. Bot jest nadal na My Cloud, bez zmian.",- "cloudWelcome.engine.sub": "Twoje boty myślą dzięki twojemu planowi Claude lub ChatGPT. Zaloguj się raz w {name}.","cloudWelcome.engine.credit": "Masz kredyty Claude o wartości {amount}, więc twoje boty mogą zacząć od razu. Zaloguj się, kiedy chcesz.","cloudWelcome.engine.creditPlain": "Twój okres próbny obejmuje kredyty Claude, więc twoje boty mogą zacząć od razu. Zaloguj się, kiedy chcesz.","cloudWelcome.engine.useCredit": "Na razie użyj moich kredytów",diff --git a/src/locales/pt-br.json b/src/locales/pt-br.jsonindex 0432003fe1..3ad230d5db 100644--- a/src/locales/pt-br.json+++ b/src/locales/pt-br.json@@ -1460,6 +1460,8 @@"cloudSignIn.keyHint": "Funciona com a sua chave de API.","cloudSignIn.codex": "ChatGPT","cloudSignIn.codexHint": "Use seu plano do ChatGPT com o Codex.",+ "cloudSignIn.opencode": "OpenCode",+ "cloudSignIn.opencodeHint": "Modelos gratuitos, sem precisar de conta.","cloudSignIn.grok": "Grok","cloudSignIn.grokHint": "Use sua assinatura do grok.com com o Grok Build.","cloudSignIn.apiKey": "Usar uma chave de API",@@ -1530,7 +1532,7 @@"cloudWelcome.skip": "Pular configuração","cloudWelcome.step.bring": "Trazer suas coisas","cloudWelcome.step.bringHint": "Seus bots e conversas",- "cloudWelcome.step.engineHint": "Claude ou ChatGPT",+ "cloudWelcome.step.engineHint": "Claude, ChatGPT ou OpenCode","cloudWelcome.step.files": "Arquivos e apps","cloudWelcome.step.filesHint": "Opcional","cloudWelcome.bring.title": "Com o que {name} deve começar?",@@ -1552,7 +1554,7 @@"cloudWelcome.bring.move": "Mover","cloudWelcome.bring.mausBotStays": "Fica no My Cloud: cada pessoa da equipe tem o seu","cloudWelcome.bring.moveFailed": "Não foi possível mover {bot}. Ele continua no My Cloud, sem alterações.",- "cloudWelcome.engine.sub": "Seus bots usam o plano do Claude ou do ChatGPT que você já tem. Faça login uma vez em {name}.",+ "cloudWelcome.engine.sub": "Seus bots usam o plano do Claude ou do ChatGPT que você já tem, ou o OpenCode. Configure um deles uma vez em {name}.","cloudWelcome.engine.credit": "Você tem {amount} de crédito do teste para o Claude, então seus bots podem começar agora mesmo. Faça login quando quiser.","cloudWelcome.engine.creditPlain": "Seu teste inclui crédito para o Claude, então seus bots podem começar agora mesmo. Faça login quando quiser.","cloudWelcome.engine.useCredit": "Usar meu crédito por enquanto",@@ -3340,6 +3342,7 @@"onboarding.meet.connectNamed": "Conectar {name}","onboarding.meet.signIn": "Entrar com {name}","onboarding.meet.install": "Instalar {name}",+ "onboarding.meet.setUp": "Configurar {name}","onboarding.meet.waiting": "Aguardando {name}…","onboarding.meet.paste": "Cole o código de {name}","onboarding.meet.pasteSubmit": "Usar este código",diff --git a/src/locales/ru.json b/src/locales/ru.jsonindex 020a9dc7f8..9786e17666 100644--- a/src/locales/ru.json+++ b/src/locales/ru.json@@ -1276,7 +1276,6 @@"cloudWelcome.skip": "Пропустить настройку","cloudWelcome.step.bring": "Перенесите своё","cloudWelcome.step.bringHint": "Ваши боты и чаты",- "cloudWelcome.step.engineHint": "Claude или ChatGPT","cloudWelcome.step.files": "Файлы и приложения","cloudWelcome.step.filesHint": "Необязательно","cloudWelcome.bring.title": "С чего {name} следует начать?",@@ -1298,7 +1297,6 @@"cloudWelcome.bring.move": "Перенести","cloudWelcome.bring.mausBotStays": "Останется в My Cloud: в команде у каждого свой","cloudWelcome.bring.moveFailed": "Не удалось перенести {bot}. Он по-прежнему в My Cloud, без изменений.",- "cloudWelcome.engine.sub": "Ваши боты работают на вашем тарифе Claude или ChatGPT. Войдите один раз на {name}.","cloudWelcome.engine.credit": "У вас есть {amount} кредита Claude, поэтому боты могут начать работу прямо сейчас. Войдите, когда будете готовы.","cloudWelcome.engine.creditPlain": "В пробный доступ входит кредит Claude, поэтому боты могут начать работу прямо сейчас. Войдите, когда будете готовы.","cloudWelcome.engine.useCredit": "Пока использовать мой кредит",diff --git a/src/locales/source-hashes.json b/src/locales/source-hashes.jsonindex 1a561338e4..55bd53fbf7 100644--- a/src/locales/source-hashes.json+++ b/src/locales/source-hashes.json@@ -4744,7 +4744,6 @@"cloudWelcome.skip": "59e693cdbc2cf6901f63d51b0a3f341cacd4ddeb2cdbc0a9604fd26436d11398","cloudWelcome.step.bring": "c67de83740ce88468490406b4a38fad6e940cfc837eaf2e82884aa25c83ce05e","cloudWelcome.step.bringHint": "a208b905a7ad8332b333c57e5568fdf2c321c2f3124fe8e543046f06b4ed3bd1",- "cloudWelcome.step.engineHint": "e7b777c1dbe6073cde8ca58dc9a5e05143c0cb7e3b627a5b39bd7e1b1efc8731","cloudWelcome.step.files": "c527036c1f9748557df78fdfe6387500f7b7eb88b75e5fe33064e147a30be588","cloudWelcome.step.filesHint": "59be71333c960fd08e7e4fe9862206d9355f0a9884121a5b50ef8b36efdfe4cf","cloudWelcome.bring.title": "e729d03714f72133c6c855695f67d9baf71757066b920155be694f236c8e015f",@@ -4760,7 +4759,6 @@"cloudWelcome.bring.hereBody": "15e93299a912b2f20626b8797bff1105ae0739bd47ba8da2b62435a96afaca87","cloudWelcome.bring.sending": "f933751cc40f6bacf68567e5fb3a3234274842ba27e1294b7de1cae3c6a28d79","cloudWelcome.bring.more": "d47d7cb0e4f8fd2be5ee07826694c18917d83ca77d0a01698582d05f432db996",- "cloudWelcome.engine.sub": "ee847c039f8f8f0c52e8e93d515188730fce5953db4cecd37a78d824e552c9c2","cloudWelcome.engine.credit": "15b71d3c6c451e16ac071a3826bd2fdbf88ed77c81e85aad7bb35a8a9dfb7c97","cloudWelcome.engine.creditPlain": "728a20659f2ca041be0e19a7b65719b36467c0810703202b82f3871eff783481","cloudWelcome.engine.useCredit": "c54919fd8b755a021b9430e8b44e3be218079053730c355b5daf00f88187c280",@@ -18762,7 +18760,6 @@"cloudWelcome.skip": "59e693cdbc2cf6901f63d51b0a3f341cacd4ddeb2cdbc0a9604fd26436d11398","cloudWelcome.step.bring": "c67de83740ce88468490406b4a38fad6e940cfc837eaf2e82884aa25c83ce05e","cloudWelcome.step.bringHint": "a208b905a7ad8332b333c57e5568fdf2c321c2f3124fe8e543046f06b4ed3bd1",- "cloudWelcome.step.engineHint": "e7b777c1dbe6073cde8ca58dc9a5e05143c0cb7e3b627a5b39bd7e1b1efc8731","cloudWelcome.step.files": "c527036c1f9748557df78fdfe6387500f7b7eb88b75e5fe33064e147a30be588","cloudWelcome.step.filesHint": "59be71333c960fd08e7e4fe9862206d9355f0a9884121a5b50ef8b36efdfe4cf","cloudWelcome.bring.title": "e729d03714f72133c6c855695f67d9baf71757066b920155be694f236c8e015f",@@ -18779,7 +18776,6 @@"cloudWelcome.bring.hereBody": "15e93299a912b2f20626b8797bff1105ae0739bd47ba8da2b62435a96afaca87","cloudWelcome.bring.sending": "f933751cc40f6bacf68567e5fb3a3234274842ba27e1294b7de1cae3c6a28d79","cloudWelcome.bring.more": "d47d7cb0e4f8fd2be5ee07826694c18917d83ca77d0a01698582d05f432db996",- "cloudWelcome.engine.sub": "ee847c039f8f8f0c52e8e93d515188730fce5953db4cecd37a78d824e552c9c2","cloudWelcome.engine.credit": "15b71d3c6c451e16ac071a3826bd2fdbf88ed77c81e85aad7bb35a8a9dfb7c97","cloudWelcome.engine.creditPlain": "728a20659f2ca041be0e19a7b65719b36467c0810703202b82f3871eff783481","cloudWelcome.engine.useCredit": "c54919fd8b755a021b9430e8b44e3be218079053730c355b5daf00f88187c280",@@ -27219,7 +27215,7 @@"cloudWelcome.skip": "59e693cdbc2cf6901f63d51b0a3f341cacd4ddeb2cdbc0a9604fd26436d11398","cloudWelcome.step.bring": "c67de83740ce88468490406b4a38fad6e940cfc837eaf2e82884aa25c83ce05e","cloudWelcome.step.bringHint": "a208b905a7ad8332b333c57e5568fdf2c321c2f3124fe8e543046f06b4ed3bd1",- "cloudWelcome.step.engineHint": "e7b777c1dbe6073cde8ca58dc9a5e05143c0cb7e3b627a5b39bd7e1b1efc8731",+ "cloudWelcome.step.engineHint": "f94f98c9fe15d52c49207b352f18a8decf09bb7dd52422a9c474f8a81ddbeb3e","cloudWelcome.step.files": "c527036c1f9748557df78fdfe6387500f7b7eb88b75e5fe33064e147a30be588","cloudWelcome.step.filesHint": "59be71333c960fd08e7e4fe9862206d9355f0a9884121a5b50ef8b36efdfe4cf","cloudWelcome.bring.title": "e729d03714f72133c6c855695f67d9baf71757066b920155be694f236c8e015f",@@ -27241,7 +27237,7 @@"cloudWelcome.bring.move": "6ecc3df6bffdd06c58cd4f6e276929e119c8f653c53f5a6a5a5e66dfa1c3fc93","cloudWelcome.bring.mausBotStays": "e2b3be0e1a26b7a5fea5f917d1d740891f788d2896f9bb53e236fea3bb9cddfb","cloudWelcome.bring.moveFailed": "5ccda40f07307a5b783cf3e2358eb69ba71e7fed27f54a8c7362fe0fc4bb1a36",- "cloudWelcome.engine.sub": "ee847c039f8f8f0c52e8e93d515188730fce5953db4cecd37a78d824e552c9c2",+ "cloudWelcome.engine.sub": "6cfb0174eb4f066d52a7a6d5c0ab359af96896f47c3b41b5a4257565119e73cb","cloudWelcome.engine.credit": "15b71d3c6c451e16ac071a3826bd2fdbf88ed77c81e85aad7bb35a8a9dfb7c97","cloudWelcome.engine.creditPlain": "728a20659f2ca041be0e19a7b65719b36467c0810703202b82f3871eff783481","cloudWelcome.engine.useCredit": "c54919fd8b755a021b9430e8b44e3be218079053730c355b5daf00f88187c280",@@ -36998,7 +36994,10 @@"imageGen.complexity.help": "b932b5a36319d04701dcf3bc04227e92a9b5db0d3b46ba62a39ddafef1303ac4","imageGen.complexity.low": "f793de205ead5ac302c4a1627829dea41f176b1068b993a32373fc869918374b","imageGen.complexity.medium": "8e588cd187741f1cd76f5fab77b7208782a8c21d764ce7d7a4cf3ac4e0968873",- "imageGen.complexity.high": "c4ebc6d4a5832cd9415f906ad03661110c705a72381c8b8b145761d02e2dd23a"+ "imageGen.complexity.high": "c4ebc6d4a5832cd9415f906ad03661110c705a72381c8b8b145761d02e2dd23a",+ "cloudSignIn.opencode": "3af0e55ccc96d87ce0f167c9b1bdf63212d20aece6aa24eeac88ec438674dfb0",+ "cloudSignIn.opencodeHint": "39917eb3474bd67452d994273175dd947430a549b4310cc389ebfe3213954597",+ "onboarding.meet.setUp": "6365b18a3c0845d444af08373e7bb13bdb6d5926f4b6a1979440a03634f879b3"},"zh": {"pro.fromPrice": "a48a04a457d60b08b54fc83e7a6c4584ffedb1e23621859084900c8521a3af7b",@@ -40979,7 +40978,6 @@"cloudWelcome.skip": "59e693cdbc2cf6901f63d51b0a3f341cacd4ddeb2cdbc0a9604fd26436d11398","cloudWelcome.step.bring": "c67de83740ce88468490406b4a38fad6e940cfc837eaf2e82884aa25c83ce05e","cloudWelcome.step.bringHint": "a208b905a7ad8332b333c57e5568fdf2c321c2f3124fe8e543046f06b4ed3bd1",- "cloudWelcome.step.engineHint": "e7b777c1dbe6073cde8ca58dc9a5e05143c0cb7e3b627a5b39bd7e1b1efc8731","cloudWelcome.step.files": "c527036c1f9748557df78fdfe6387500f7b7eb88b75e5fe33064e147a30be588","cloudWelcome.step.filesHint": "59be71333c960fd08e7e4fe9862206d9355f0a9884121a5b50ef8b36efdfe4cf","cloudWelcome.bring.title": "e729d03714f72133c6c855695f67d9baf71757066b920155be694f236c8e015f",@@ -40995,7 +40993,6 @@"cloudWelcome.bring.hereBody": "15e93299a912b2f20626b8797bff1105ae0739bd47ba8da2b62435a96afaca87","cloudWelcome.bring.sending": "f933751cc40f6bacf68567e5fb3a3234274842ba27e1294b7de1cae3c6a28d79","cloudWelcome.bring.more": "d47d7cb0e4f8fd2be5ee07826694c18917d83ca77d0a01698582d05f432db996",- "cloudWelcome.engine.sub": "ee847c039f8f8f0c52e8e93d515188730fce5953db4cecd37a78d824e552c9c2","cloudWelcome.engine.credit": "15b71d3c6c451e16ac071a3826bd2fdbf88ed77c81e85aad7bb35a8a9dfb7c97","cloudWelcome.engine.creditPlain": "728a20659f2ca041be0e19a7b65719b36467c0810703202b82f3871eff783481","cloudWelcome.engine.useCredit": "c54919fd8b755a021b9430e8b44e3be218079053730c355b5daf00f88187c280",@@ -52244,7 +52241,6 @@"cloudWelcome.skip": "59e693cdbc2cf6901f63d51b0a3f341cacd4ddeb2cdbc0a9604fd26436d11398","cloudWelcome.step.bring": "c67de83740ce88468490406b4a38fad6e940cfc837eaf2e82884aa25c83ce05e","cloudWelcome.step.bringHint": "a208b905a7ad8332b333c57e5568fdf2c321c2f3124fe8e543046f06b4ed3bd1",- "cloudWelcome.step.engineHint": "e7b777c1dbe6073cde8ca58dc9a5e05143c0cb7e3b627a5b39bd7e1b1efc8731","cloudWelcome.step.files": "c527036c1f9748557df78fdfe6387500f7b7eb88b75e5fe33064e147a30be588","cloudWelcome.step.filesHint": "59be71333c960fd08e7e4fe9862206d9355f0a9884121a5b50ef8b36efdfe4cf","cloudWelcome.bring.title": "e729d03714f72133c6c855695f67d9baf71757066b920155be694f236c8e015f",@@ -52260,7 +52256,6 @@"cloudWelcome.bring.hereBody": "15e93299a912b2f20626b8797bff1105ae0739bd47ba8da2b62435a96afaca87","cloudWelcome.bring.sending": "f933751cc40f6bacf68567e5fb3a3234274842ba27e1294b7de1cae3c6a28d79","cloudWelcome.bring.more": "d47d7cb0e4f8fd2be5ee07826694c18917d83ca77d0a01698582d05f432db996",- "cloudWelcome.engine.sub": "ee847c039f8f8f0c52e8e93d515188730fce5953db4cecd37a78d824e552c9c2","cloudWelcome.engine.credit": "15b71d3c6c451e16ac071a3826bd2fdbf88ed77c81e85aad7bb35a8a9dfb7c97","cloudWelcome.engine.creditPlain": "728a20659f2ca041be0e19a7b65719b36467c0810703202b82f3871eff783481","cloudWelcome.engine.useCredit": "c54919fd8b755a021b9430e8b44e3be218079053730c355b5daf00f88187c280",@@ -73983,7 +73978,6 @@"cloudWelcome.skip": "59e693cdbc2cf6901f63d51b0a3f341cacd4ddeb2cdbc0a9604fd26436d11398","cloudWelcome.step.bring": "c67de83740ce88468490406b4a38fad6e940cfc837eaf2e82884aa25c83ce05e","cloudWelcome.step.bringHint": "a208b905a7ad8332b333c57e5568fdf2c321c2f3124fe8e543046f06b4ed3bd1",- "cloudWelcome.step.engineHint": "e7b777c1dbe6073cde8ca58dc9a5e05143c0cb7e3b627a5b39bd7e1b1efc8731","cloudWelcome.step.files": "c527036c1f9748557df78fdfe6387500f7b7eb88b75e5fe33064e147a30be588","cloudWelcome.step.filesHint": "59be71333c960fd08e7e4fe9862206d9355f0a9884121a5b50ef8b36efdfe4cf","cloudWelcome.bring.title": "e729d03714f72133c6c855695f67d9baf71757066b920155be694f236c8e015f",@@ -74000,7 +73994,6 @@"cloudWelcome.bring.hereBody": "15e93299a912b2f20626b8797bff1105ae0739bd47ba8da2b62435a96afaca87","cloudWelcome.bring.sending": "f933751cc40f6bacf68567e5fb3a3234274842ba27e1294b7de1cae3c6a28d79","cloudWelcome.bring.more": "d47d7cb0e4f8fd2be5ee07826694c18917d83ca77d0a01698582d05f432db996",- "cloudWelcome.engine.sub": "ee847c039f8f8f0c52e8e93d515188730fce5953db4cecd37a78d824e552c9c2","cloudWelcome.engine.credit": "15b71d3c6c451e16ac071a3826bd2fdbf88ed77c81e85aad7bb35a8a9dfb7c97","cloudWelcome.engine.creditPlain": "728a20659f2ca041be0e19a7b65719b36467c0810703202b82f3871eff783481","cloudWelcome.engine.useCredit": "c54919fd8b755a021b9430e8b44e3be218079053730c355b5daf00f88187c280",@@ -81104,7 +81097,6 @@"cloudWelcome.skip": "59e693cdbc2cf6901f63d51b0a3f341cacd4ddeb2cdbc0a9604fd26436d11398","cloudWelcome.step.bring": "c67de83740ce88468490406b4a38fad6e940cfc837eaf2e82884aa25c83ce05e","cloudWelcome.step.bringHint": "a208b905a7ad8332b333c57e5568fdf2c321c2f3124fe8e543046f06b4ed3bd1",- "cloudWelcome.step.engineHint": "e7b777c1dbe6073cde8ca58dc9a5e05143c0cb7e3b627a5b39bd7e1b1efc8731","cloudWelcome.step.files": "c527036c1f9748557df78fdfe6387500f7b7eb88b75e5fe33064e147a30be588","cloudWelcome.step.filesHint": "59be71333c960fd08e7e4fe9862206d9355f0a9884121a5b50ef8b36efdfe4cf","cloudWelcome.bring.title": "e729d03714f72133c6c855695f67d9baf71757066b920155be694f236c8e015f",@@ -81121,7 +81113,6 @@"cloudWelcome.bring.hereBody": "15e93299a912b2f20626b8797bff1105ae0739bd47ba8da2b62435a96afaca87","cloudWelcome.bring.sending": "f933751cc40f6bacf68567e5fb3a3234274842ba27e1294b7de1cae3c6a28d79","cloudWelcome.bring.more": "d47d7cb0e4f8fd2be5ee07826694c18917d83ca77d0a01698582d05f432db996",- "cloudWelcome.engine.sub": "ee847c039f8f8f0c52e8e93d515188730fce5953db4cecd37a78d824e552c9c2","cloudWelcome.engine.credit": "15b71d3c6c451e16ac071a3826bd2fdbf88ed77c81e85aad7bb35a8a9dfb7c97","cloudWelcome.engine.creditPlain": "728a20659f2ca041be0e19a7b65719b36467c0810703202b82f3871eff783481","cloudWelcome.engine.useCredit": "c54919fd8b755a021b9430e8b44e3be218079053730c355b5daf00f88187c280",@@ -88248,7 +88239,6 @@"cloudWelcome.skip": "59e693cdbc2cf6901f63d51b0a3f341cacd4ddeb2cdbc0a9604fd26436d11398","cloudWelcome.step.bring": "c67de83740ce88468490406b4a38fad6e940cfc837eaf2e82884aa25c83ce05e","cloudWelcome.step.bringHint": "a208b905a7ad8332b333c57e5568fdf2c321c2f3124fe8e543046f06b4ed3bd1",- "cloudWelcome.step.engineHint": "e7b777c1dbe6073cde8ca58dc9a5e05143c0cb7e3b627a5b39bd7e1b1efc8731","cloudWelcome.step.files": "c527036c1f9748557df78fdfe6387500f7b7eb88b75e5fe33064e147a30be588","cloudWelcome.step.filesHint": "59be71333c960fd08e7e4fe9862206d9355f0a9884121a5b50ef8b36efdfe4cf","cloudWelcome.bring.title": "e729d03714f72133c6c855695f67d9baf71757066b920155be694f236c8e015f",@@ -88265,7 +88255,6 @@"cloudWelcome.bring.hereBody": "15e93299a912b2f20626b8797bff1105ae0739bd47ba8da2b62435a96afaca87","cloudWelcome.bring.sending": "f933751cc40f6bacf68567e5fb3a3234274842ba27e1294b7de1cae3c6a28d79","cloudWelcome.bring.more": "d47d7cb0e4f8fd2be5ee07826694c18917d83ca77d0a01698582d05f432db996",- "cloudWelcome.engine.sub": "ee847c039f8f8f0c52e8e93d515188730fce5953db4cecd37a78d824e552c9c2","cloudWelcome.engine.credit": "15b71d3c6c451e16ac071a3826bd2fdbf88ed77c81e85aad7bb35a8a9dfb7c97","cloudWelcome.engine.creditPlain": "728a20659f2ca041be0e19a7b65719b36467c0810703202b82f3871eff783481","cloudWelcome.engine.useCredit": "c54919fd8b755a021b9430e8b44e3be218079053730c355b5daf00f88187c280",@@ -95455,7 +95444,6 @@"cloudWelcome.skip": "59e693cdbc2cf6901f63d51b0a3f341cacd4ddeb2cdbc0a9604fd26436d11398","cloudWelcome.step.bring": "c67de83740ce88468490406b4a38fad6e940cfc837eaf2e82884aa25c83ce05e","cloudWelcome.step.bringHint": "a208b905a7ad8332b333c57e5568fdf2c321c2f3124fe8e543046f06b4ed3bd1",- "cloudWelcome.step.engineHint": "e7b777c1dbe6073cde8ca58dc9a5e05143c0cb7e3b627a5b39bd7e1b1efc8731","cloudWelcome.step.files": "c527036c1f9748557df78fdfe6387500f7b7eb88b75e5fe33064e147a30be588","cloudWelcome.step.filesHint": "59be71333c960fd08e7e4fe9862206d9355f0a9884121a5b50ef8b36efdfe4cf","cloudWelcome.bring.title": "e729d03714f72133c6c855695f67d9baf71757066b920155be694f236c8e015f",@@ -95472,7 +95460,6 @@"cloudWelcome.bring.hereBody": "15e93299a912b2f20626b8797bff1105ae0739bd47ba8da2b62435a96afaca87","cloudWelcome.bring.sending": "f933751cc40f6bacf68567e5fb3a3234274842ba27e1294b7de1cae3c6a28d79","cloudWelcome.bring.more": "d47d7cb0e4f8fd2be5ee07826694c18917d83ca77d0a01698582d05f432db996",- "cloudWelcome.engine.sub": "ee847c039f8f8f0c52e8e93d515188730fce5953db4cecd37a78d824e552c9c2","cloudWelcome.engine.credit": "15b71d3c6c451e16ac071a3826bd2fdbf88ed77c81e85aad7bb35a8a9dfb7c97","cloudWelcome.engine.creditPlain": "728a20659f2ca041be0e19a7b65719b36467c0810703202b82f3871eff783481","cloudWelcome.engine.useCredit": "c54919fd8b755a021b9430e8b44e3be218079053730c355b5daf00f88187c280",diff --git a/src/locales/zh-tw.json b/src/locales/zh-tw.jsonindex 86f5d19f62..3d3deab583 100644--- a/src/locales/zh-tw.json+++ b/src/locales/zh-tw.json@@ -1536,7 +1536,6 @@"cloudWelcome.skip": "略過設定","cloudWelcome.step.bring": "帶入你的東西","cloudWelcome.step.bringHint": "你的機器人和聊天",- "cloudWelcome.step.engineHint": "Claude 或 ChatGPT","cloudWelcome.step.files": "檔案與應用程式","cloudWelcome.step.filesHint": "選填","cloudWelcome.bring.title": "{name} 要從什麼開始?",@@ -1558,7 +1557,6 @@"cloudWelcome.bring.move": "移動","cloudWelcome.bring.mausBotStays": "留在 My Cloud:團隊中每個人都有自己的","cloudWelcome.bring.moveFailed": "無法移動 {bot}。它仍在 My Cloud,沒有變更。",- "cloudWelcome.engine.sub": "你的機器人會使用你自己的 Claude 或 ChatGPT 方案思考。在 {name} 上登入一次即可。","cloudWelcome.engine.credit": "你有 {amount} 的 Claude 額度,因此你的機器人現在就能開始。準備好時再登入即可。","cloudWelcome.engine.creditPlain": "你的試用版附有 Claude 額度,因此你的機器人現在就能開始。準備好時再登入即可。","cloudWelcome.engine.useCredit": "暫時使用我的額度",diff --git a/src/locales/zh.json b/src/locales/zh.jsonindex 1daef1c886..81dfa45877 100644--- a/src/locales/zh.json+++ b/src/locales/zh.json@@ -1648,7 +1648,6 @@"cloudWelcome.skip": "跳过设置","cloudWelcome.step.bring": "迁移你的内容","cloudWelcome.step.bringHint": "你的机器人和聊天",- "cloudWelcome.step.engineHint": "Claude 或 ChatGPT","cloudWelcome.step.files": "文件和连接","cloudWelcome.step.filesHint": "可选","cloudWelcome.bring.title": "{name} 该从什么开始?",@@ -1670,7 +1669,6 @@"cloudWelcome.bring.move": "移动","cloudWelcome.bring.mausBotStays": "留在 My Cloud:团队中每个人都有自己的","cloudWelcome.bring.moveFailed": "无法移动 {bot}。它仍在 My Cloud,没有变更。",- "cloudWelcome.engine.sub": "你的机器人使用你自己的 Claude 或 ChatGPT 方案来思考。请在 {name} 上登录一次。","cloudWelcome.engine.credit": "你有 {amount} Claude 额度,所以机器人可以立即开始工作。你准备好时登录即可。","cloudWelcome.engine.creditPlain": "你的试用包含 Claude 额度,所以机器人可以立即开始工作。你准备好时登录即可。","cloudWelcome.engine.useCredit": "暂时使用我的额度",