refactor: rename clawdbot to moltbot with legacy compat

This commit is contained in:
Peter Steinberger
2026-01-27 12:19:58 +00:00
parent 83460df96f
commit 6d16a658e5
1839 changed files with 11250 additions and 11199 deletions

View File

@@ -1,7 +1,7 @@
import { resolveAgentConfig } from "../../agents/agent-scope.js";
import { getChannelDock } from "../../channels/dock.js";
import { normalizeChannelId } from "../../channels/plugins/index.js";
import type { ClawdbotConfig } from "../../config/config.js";
import type { MoltbotConfig } from "../../config/config.js";
import type { MsgContext } from "../templating.js";
function escapeRegExp(text: string): string {
@@ -36,7 +36,7 @@ function normalizeMentionPatterns(patterns: string[]): string[] {
return patterns.map(normalizeMentionPattern);
}
function resolveMentionPatterns(cfg: ClawdbotConfig | undefined, agentId?: string): string[] {
function resolveMentionPatterns(cfg: MoltbotConfig | undefined, agentId?: string): string[] {
if (!cfg) return [];
const agentConfig = agentId ? resolveAgentConfig(cfg, agentId) : undefined;
const agentGroupChat = agentConfig?.groupChat;
@@ -51,7 +51,7 @@ function resolveMentionPatterns(cfg: ClawdbotConfig | undefined, agentId?: strin
return derived.length > 0 ? derived : [];
}
export function buildMentionRegexes(cfg: ClawdbotConfig | undefined, agentId?: string): RegExp[] {
export function buildMentionRegexes(cfg: MoltbotConfig | undefined, agentId?: string): RegExp[] {
const patterns = normalizeMentionPatterns(resolveMentionPatterns(cfg, agentId));
return patterns
.map((pattern) => {
@@ -113,7 +113,7 @@ export function stripStructuralPrefixes(text: string): string {
export function stripMentions(
text: string,
ctx: MsgContext,
cfg: ClawdbotConfig | undefined,
cfg: MoltbotConfig | undefined,
agentId?: string,
): string {
let result = text;