Skip to content

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

Merge #4994: fix(cli): doctor says "1 day", not "1 days"

milind-soni5024d4ff806b
diff --cc server/headless/commands.ts
index 8c3bc27a07,071ecd5508..f0fba2cb59
--- a/server/headless/commands.ts
+++ b/server/headless/commands.ts
@@@ -40,9 -34,10 +40,10 @@@ async function doctorOnce(ctx: VerbCont
if (!isOmb) problems.push(`${client.baseUrl} answered, but it is not OpenMausBot`);
const tooOld = Boolean(server) && server!.capabilities?.jobs !== true;
if (tooOld) problems.push(`OpenMausBot ${server!.version ?? "(unknown version)"} is too old for the headless commands: it cannot report a conversation's job`);
- if (isOmb && !availableEngines.length) problems.push("no engine is available: set one up with `openmausbot engine set KIND --key-env VAR`");
+ if (isOmb && !availableCount) problems.push("no engine is available: set one up with `openmausbot engine set KIND --key-env VAR`");
if (session?.kind === "session" && typeof session.expiresAt === "number" && session.expiresAt - Date.now() < 14 * DAY) {
- warnings.push(`this session expires in ${Math.max(0, Math.floor((session.expiresAt - Date.now()) / DAY))} days: sign in again with openmausbot login (a script: openmausbot token create)`);
+ const days = Math.max(0, Math.floor((session.expiresAt - Date.now()) / DAY));
- warnings.push(`this session expires in ${days} day${days === 1 ? "" : "s"}: get a new one with openmausbot connect`);
++ warnings.push(`this session expires in ${days} day${days === 1 ? "" : "s"}: sign in again with openmausbot login (a script: openmausbot token create)`);
}
const browser = config?.browserEngine ?? null;
if (browser && browser.kind !== "engine") warnings.push(`bots have no built-in browser here: ${browser.reason ?? "not installed"}${browser.installable ? " (install it with `openmausbot browser install`)" : ""}`);