mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 01:13:29 +00:00
refactor: rename clawdbot to moltbot with legacy compat
This commit is contained in:
@@ -36,12 +36,12 @@ function isDisabledByEnv() {
|
||||
|
||||
function safeServiceName(name: string) {
|
||||
const trimmed = name.trim();
|
||||
return trimmed.length > 0 ? trimmed : "Clawdbot";
|
||||
return trimmed.length > 0 ? trimmed : "Moltbot";
|
||||
}
|
||||
|
||||
function prettifyInstanceName(name: string) {
|
||||
const normalized = name.trim().replace(/\s+/g, " ");
|
||||
return normalized.replace(/\s+\(Clawdbot\)\s*$/i, "").trim() || normalized;
|
||||
return normalized.replace(/\s+\(Moltbot\)\s*$/i, "").trim() || normalized;
|
||||
}
|
||||
|
||||
type BonjourService = {
|
||||
@@ -95,11 +95,11 @@ export async function startGatewayBonjourAdvertiser(
|
||||
.hostname()
|
||||
.replace(/\.local$/i, "")
|
||||
.split(".")[0]
|
||||
.trim() || "clawdbot";
|
||||
.trim() || "moltbot";
|
||||
const instanceName =
|
||||
typeof opts.instanceName === "string" && opts.instanceName.trim()
|
||||
? opts.instanceName.trim()
|
||||
: `${hostname} (Clawdbot)`;
|
||||
: `${hostname} (Moltbot)`;
|
||||
const displayName = prettifyInstanceName(instanceName);
|
||||
|
||||
const txtBase: Record<string, string> = {
|
||||
@@ -140,7 +140,7 @@ export async function startGatewayBonjourAdvertiser(
|
||||
|
||||
const gateway = responder.createService({
|
||||
name: safeServiceName(instanceName),
|
||||
type: "clawdbot-gw",
|
||||
type: "moltbot-gw",
|
||||
protocol: Protocol.TCP,
|
||||
port: opts.gatewayPort,
|
||||
domain: "local",
|
||||
|
||||
Reference in New Issue
Block a user