mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 14:38:25 +00:00
refactor: rename clawdbot to moltbot with legacy compat
This commit is contained in:
@@ -13,9 +13,9 @@ export type ResolveBonjourCliPathOptions = {
|
||||
|
||||
export function formatBonjourInstanceName(displayName: string) {
|
||||
const trimmed = displayName.trim();
|
||||
if (!trimmed) return "Clawdbot";
|
||||
if (/clawdbot/i.test(trimmed)) return trimmed;
|
||||
return `${trimmed} (Clawdbot)`;
|
||||
if (!trimmed) return "Moltbot";
|
||||
if (/moltbot/i.test(trimmed)) return trimmed;
|
||||
return `${trimmed} (Moltbot)`;
|
||||
}
|
||||
|
||||
export function resolveBonjourCliPath(opts: ResolveBonjourCliPathOptions = {}): string | undefined {
|
||||
@@ -34,7 +34,7 @@ export function resolveBonjourCliPath(opts: ResolveBonjourCliPathOptions = {}):
|
||||
|
||||
const execPath = opts.execPath ?? process.execPath;
|
||||
const execDir = path.dirname(execPath);
|
||||
const siblingCli = path.join(execDir, "clawdbot");
|
||||
const siblingCli = path.join(execDir, "moltbot");
|
||||
if (isFile(siblingCli)) return siblingCli;
|
||||
|
||||
const argv = opts.argv ?? process.argv;
|
||||
@@ -46,7 +46,7 @@ export function resolveBonjourCliPath(opts: ResolveBonjourCliPathOptions = {}):
|
||||
const cwd = opts.cwd ?? process.cwd();
|
||||
const distCli = path.join(cwd, "dist", "index.js");
|
||||
if (isFile(distCli)) return distCli;
|
||||
const binCli = path.join(cwd, "bin", "clawdbot.js");
|
||||
const binCli = path.join(cwd, "bin", "moltbot.js");
|
||||
if (isFile(binCli)) return binCli;
|
||||
|
||||
return undefined;
|
||||
|
||||
Reference in New Issue
Block a user