Skip to content

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

#5820: no Codex update card on My Cloud, where there is nothing to run

milind-sonidb6afac922bd
diff --git a/server/drivers/codex-update.ts b/server/drivers/codex-update.ts
index 4f80c840e1..174020edf7 100644
--- a/server/drivers/codex-update.ts
+++ b/server/drivers/codex-update.ts
@@ -22,11 +22,8 @@ export function codexUpdateCommand(cli: string, platform: NodeJS.Platform = proc
export async function codexReleaseUpdate(version: string, cli: string, onCloud = cloudHomeConfigured()): Promise<ProviderSnapshot["update"] | undefined> {
const latest = await readLatestCodexRelease();
if (!latest || !codexVersionBehind(version, latest)) return undefined;
- // My Cloud's Codex comes with the image, in a folder nobody can write to: `codex update` can only fail there.
- if (onCloud) return {
- title: `Codex ${latest} is out`,
- message: `A newer stable Codex CLI is available (installed: ${version}). On My Cloud, Codex comes with the Cloud and updates with its next release; there is nothing to run here.`,
- };
+ // My Cloud's Codex comes with the image, in a folder nobody can write to, and updates with the Cloud: nothing to offer there.
+ if (onCloud) return undefined;
return {
title: `Update Codex to ${latest}`,
message: `A newer stable Codex CLI is available (installed: ${version}). Update it, then refresh models. Model availability also depends on your signed-in account.`,
diff --git a/server/drivers/codex.test.ts b/server/drivers/codex.test.ts
index 58e7b8e971..f80fc17081 100644
--- a/server/drivers/codex.test.ts
+++ b/server/drivers/codex.test.ts
@@ -3630,13 +3630,9 @@ process.stdout.write(JSON.stringify({jsonrpc:'2.0',id:m.id,result})+'\\n');});`)
);
});
- it("offers no update command on My Cloud, whose Codex updates with the Cloud", async () => {
+ it("shows no update card on My Cloud, whose Codex updates with the Cloud", async () => {
expect(await codexReleaseUpdate("0.150.0", "codex", false)).toMatchObject({ title: "Update Codex to 0.156.1", command: "codex update" });
- const cloud = await codexReleaseUpdate("0.150.0", "codex", true);
- expect(cloud).toEqual({
- title: "Codex 0.156.1 is out",
- message: expect.stringContaining("On My Cloud, Codex comes with the Cloud and updates with its next release"),
- });
+ expect(await codexReleaseUpdate("0.150.0", "codex", true)).toBeUndefined();
expect(await codexReleaseUpdate("0.156.1", "codex", true)).toBeUndefined();
});