mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 09:11:26 +00:00
refactor: rename clawdbot to moltbot with legacy compat
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { resolveChannelDefaultAccountId } from "../channels/plugins/helpers.js";
|
||||
import { getChannelPlugin, normalizeChannelId } from "../channels/plugins/index.js";
|
||||
import type { ChannelId } from "../channels/plugins/types.js";
|
||||
import type { ClawdbotConfig } from "../config/config.js";
|
||||
import type { MoltbotConfig } from "../config/config.js";
|
||||
import type { AgentBinding } from "../config/types.js";
|
||||
import { DEFAULT_ACCOUNT_ID, normalizeAgentId } from "../routing/session-key.js";
|
||||
import type { ChannelChoice } from "./onboard-types.js";
|
||||
@@ -29,10 +29,10 @@ export function describeBinding(binding: AgentBinding) {
|
||||
}
|
||||
|
||||
export function applyAgentBindings(
|
||||
cfg: ClawdbotConfig,
|
||||
cfg: MoltbotConfig,
|
||||
bindings: AgentBinding[],
|
||||
): {
|
||||
config: ClawdbotConfig;
|
||||
config: MoltbotConfig;
|
||||
added: AgentBinding[];
|
||||
skipped: AgentBinding[];
|
||||
conflicts: Array<{ binding: AgentBinding; existingAgentId: string }>;
|
||||
@@ -81,7 +81,7 @@ export function applyAgentBindings(
|
||||
};
|
||||
}
|
||||
|
||||
function resolveDefaultAccountId(cfg: ClawdbotConfig, provider: ChannelId): string {
|
||||
function resolveDefaultAccountId(cfg: MoltbotConfig, provider: ChannelId): string {
|
||||
const plugin = getChannelPlugin(provider);
|
||||
if (!plugin) return DEFAULT_ACCOUNT_ID;
|
||||
return resolveChannelDefaultAccountId({ plugin, cfg });
|
||||
@@ -90,7 +90,7 @@ function resolveDefaultAccountId(cfg: ClawdbotConfig, provider: ChannelId): stri
|
||||
export function buildChannelBindings(params: {
|
||||
agentId: string;
|
||||
selection: ChannelChoice[];
|
||||
config: ClawdbotConfig;
|
||||
config: MoltbotConfig;
|
||||
accountIds?: Partial<Record<ChannelChoice, string>>;
|
||||
}): AgentBinding[] {
|
||||
const bindings: AgentBinding[] = [];
|
||||
@@ -114,7 +114,7 @@ export function buildChannelBindings(params: {
|
||||
export function parseBindingSpecs(params: {
|
||||
agentId: string;
|
||||
specs?: string[];
|
||||
config: ClawdbotConfig;
|
||||
config: MoltbotConfig;
|
||||
}): { bindings: AgentBinding[]; errors: string[] } {
|
||||
const bindings: AgentBinding[] = [];
|
||||
const errors: string[] = [];
|
||||
|
||||
Reference in New Issue
Block a user