Skip to content

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

feat(settings): note that Codex bots follow the person's own Codex setup

AdityaUmale938e49ecdaf7
diff --git a/src/components/EngineAccounts.tsx b/src/components/EngineAccounts.tsx
index 06c4b5c893..12b3c6c592 100644
--- a/src/components/EngineAccounts.tsx
+++ b/src/components/EngineAccounts.tsx
@@ -344,6 +344,7 @@ export function AccountsCard({ group, accounts, advanced, bare = false }: { grou
describedBy={group === "chatgpt" ? noteId : undefined} onAdded={setSigningIn} />
{group === "chatgpt" && <p id={noteId} className="px-2 text-[12px] leading-relaxed text-ink-secondary">{t("accounts.addChatgptWorkspaceNote")}</p>}
</>}
+ {group === "chatgpt" && <p data-codex-shared-setup className="px-2 text-[12px] leading-relaxed text-ink-secondary">{t("accounts.chatgptSharedSetupNote")}</p>}
</div>
)}
{primary.snapshot.update && <EngineUpdateNotice update={primary.snapshot.update} instance={primary} className="mt-3" quiet />}
diff --git a/src/components/EnginesSettings.codex-shared-setup.dom.test.ts b/src/components/EnginesSettings.codex-shared-setup.dom.test.ts
new file mode 100644
index 0000000000..e3a1532a97
--- /dev/null
+++ b/src/components/EnginesSettings.codex-shared-setup.dom.test.ts
@@ -0,0 +1,55 @@
+// @vitest-environment happy-dom
+import { act, createElement } from "react";
+import { createRoot, type Root } from "react-dom/client";
+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
+import type { Bot, InstanceInfo } from "@/state/store";
+import { setLocale } from "@/lib/i18n";
+
+const fixture = vi.hoisted(() => ({ state: { instances: [] as InstanceInfo[], bots: [] as Bot[], config: {} as Record<string, unknown> } }));
+vi.mock("@/state/store", async (original) => ({
+ ...await original<typeof import("@/state/store")>(),
+ useStore: () => ({ state: fixture.state, dispatch: () => {}, refreshInstances: async () => {}, refreshModels: async () => {} }),
+ api: async () => ({}),
+}));
+import { EnginesSettings } from "./EnginesSettings";
+
+function codex(): InstanceInfo {
+ return {
+ instanceId: "codex", driverKind: "codex", displayName: "Codex", cliDefault: "codex",
+ snapshot: { state: "available", authenticated: true, chatgptPlan: true }, models: { default: "gpt", options: [] },
+ } as InstanceInfo;
+}
+function claude(): InstanceInfo {
+ return {
+ instanceId: "claude", driverKind: "claudeAgent", displayName: "Claude", cliDefault: "claude",
+ snapshot: { state: "available", authenticated: true }, models: { default: "claude", options: [] },
+ } as InstanceInfo;
+}
+
+let container: HTMLDivElement, root: Root;
+beforeEach(() => {
+ vi.stubGlobal("IS_REACT_ACT_ENVIRONMENT", true);
+ setLocale("en");
+ container = document.createElement("div"); document.body.append(container); root = createRoot(container);
+});
+afterEach(async () => { await act(async () => root.unmount()); container.remove(); vi.unstubAllGlobals(); });
+
+const render = async (instances: InstanceInfo[]) => {
+ fixture.state = { instances, bots: [], config: {} };
+ await act(async () => { root.render(createElement(EnginesSettings)); });
+};
+
+describe("Settings → Codex accounts", () => {
+ it("says bots follow the person's own Codex setup", async () => {
+ await render([codex()]);
+ const notes = container.querySelectorAll("[data-accounts='chatgpt'] ~ [data-codex-shared-setup]");
+ expect(notes).toHaveLength(1);
+ expect(notes[0]!.textContent).toContain("your own Codex setup");
+ expect(notes[0]!.textContent).toContain("AGENTS.md");
+ });
+
+ it("keeps the note off other engines' account cards", async () => {
+ await render([claude()]);
+ expect(container.querySelector("[data-codex-shared-setup]")).toBeNull();
+ });
+});
diff --git a/src/locales/en.json b/src/locales/en.json
index bf963b7654..6f8a4c3b9b 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -4606,6 +4606,7 @@
"accounts.addClaude": "Add another Claude account",
"accounts.addChatgpt": "Add another ChatGPT account",
"accounts.addChatgptWorkspaceNote": "ChatGPT Business and Enterprise organizations can block adding an account here (OpenAI shows 3p_delegated_access_policy_denied).",
+ "accounts.chatgptSharedSetupNote": "Bots that use these accounts also follow your own Codex setup: your instructions (AGENTS.md), config.toml, skills and plugins.",
"accounts.nameLabel": "Account name",
"accounts.namePlaceholder": "Work",
"accounts.addSubmit": "Add and sign in",
diff --git a/src/locales/pt-br.json b/src/locales/pt-br.json
index c0b918a2a6..9bd5acc2fe 100644
--- a/src/locales/pt-br.json
+++ b/src/locales/pt-br.json
@@ -4307,6 +4307,7 @@
"accounts.addClaude": "Adicionar outra conta do Claude",
"accounts.addChatgpt": "Adicionar outra conta do ChatGPT",
"accounts.addChatgptWorkspaceNote": "Organizações do ChatGPT Business e Enterprise podem bloquear a adição de uma conta aqui (a OpenAI mostra 3p_delegated_access_policy_denied).",
+ "accounts.chatgptSharedSetupNote": "Os bots que usam essas contas também seguem a sua configuração do Codex: suas instruções (AGENTS.md), config.toml, skills e plugins.",
"accounts.nameLabel": "Nome da conta",
"accounts.namePlaceholder": "Trabalho",
"accounts.addSubmit": "Adicionar e entrar",
diff --git a/src/locales/zh-tw.json b/src/locales/zh-tw.json
index 0367326096..762f396b74 100644
--- a/src/locales/zh-tw.json
+++ b/src/locales/zh-tw.json
@@ -4371,6 +4371,7 @@
"accounts.addClaude": "新增其他 Claude 帳號",
"accounts.addChatgpt": "新增其他 ChatGPT 帳號",
"accounts.addChatgptWorkspaceNote": "ChatGPT Business 和 Enterprise 組織可能會封鎖在這裡新增帳號(OpenAI 會顯示 3p_delegated_access_policy_denied)。",
+ "accounts.chatgptSharedSetupNote": "使用這些帳號的機器人也會遵循你自己的 Codex 設定:你的指示(AGENTS.md)、config.toml、技能和外掛。",
"accounts.nameLabel": "帳號名稱",
"accounts.namePlaceholder": "工作",
"accounts.addSubmit": "新增並登入",