mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 08:41:23 +00:00
refactor: rename clawdbot to moltbot with legacy compat
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { resolveDefaultAgentId } from "../agents/agent-scope.js";
|
||||
import type { ClawdbotConfig } from "../config/config.js";
|
||||
import type { MoltbotConfig } from "../config/config.js";
|
||||
import { listBindings } from "./bindings.js";
|
||||
import {
|
||||
buildAgentMainSessionKey,
|
||||
@@ -18,7 +18,7 @@ export type RoutePeer = {
|
||||
};
|
||||
|
||||
export type ResolveAgentRouteInput = {
|
||||
cfg: ClawdbotConfig;
|
||||
cfg: MoltbotConfig;
|
||||
channel: string;
|
||||
accountId?: string | null;
|
||||
peer?: RoutePeer | null;
|
||||
@@ -87,12 +87,12 @@ export function buildAgentSessionKey(params: {
|
||||
});
|
||||
}
|
||||
|
||||
function listAgents(cfg: ClawdbotConfig) {
|
||||
function listAgents(cfg: MoltbotConfig) {
|
||||
const agents = cfg.agents?.list;
|
||||
return Array.isArray(agents) ? agents : [];
|
||||
}
|
||||
|
||||
function pickFirstExistingAgentId(cfg: ClawdbotConfig, agentId: string): string {
|
||||
function pickFirstExistingAgentId(cfg: MoltbotConfig, agentId: string): string {
|
||||
const trimmed = (agentId ?? "").trim();
|
||||
if (!trimmed) return sanitizeAgentId(resolveDefaultAgentId(cfg));
|
||||
const normalized = normalizeAgentId(trimmed);
|
||||
|
||||
Reference in New Issue
Block a user