refactor: normalize cli command hints
This commit is contained in:
@@ -3,6 +3,7 @@ import { loadConfig } from "../config/config.js";
|
||||
import { danger, info, success } from "../globals.js";
|
||||
import { logInfo } from "../logger.js";
|
||||
import { defaultRuntime, type RuntimeEnv } from "../runtime.js";
|
||||
import { formatCliCommand } from "../cli/command-format.js";
|
||||
import { resolveWhatsAppAccount } from "./accounts.js";
|
||||
import { createWaSocket, formatError, logoutWeb, waitForWaConnection } from "./session.js";
|
||||
|
||||
@@ -56,7 +57,7 @@ export async function loginWeb(
|
||||
});
|
||||
console.error(
|
||||
danger(
|
||||
"WhatsApp reported the session is logged out. Cleared cached web session; please rerun clawdbot channels login and scan the QR again.",
|
||||
`WhatsApp reported the session is logged out. Cleared cached web session; please rerun ${formatCliCommand("clawdbot channels login")} and scan the QR again.`,
|
||||
),
|
||||
);
|
||||
throw new Error("Session logged out; cache cleared. Re-run login.");
|
||||
|
||||
Reference in New Issue
Block a user