mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 23:28:27 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -19,11 +19,11 @@ const makeMsg = (overrides: Partial<WebInboundMsg>): WebInboundMsg =>
|
||||
}) as WebInboundMsg;
|
||||
|
||||
describe("isBotMentionedFromTargets", () => {
|
||||
const mentionCfg = { mentionRegexes: [/\bclawd\b/i] };
|
||||
const mentionCfg = { mentionRegexes: [/\bopenclaw\b/i] };
|
||||
|
||||
it("ignores regex matches when other mentions are present", () => {
|
||||
const msg = makeMsg({
|
||||
body: "@Clawd please help",
|
||||
body: "@OpenClaw please help",
|
||||
mentionedJids: ["19998887777@s.whatsapp.net"],
|
||||
selfE164: "+15551234567",
|
||||
selfJid: "15551234567@s.whatsapp.net",
|
||||
@@ -45,7 +45,7 @@ describe("isBotMentionedFromTargets", () => {
|
||||
|
||||
it("falls back to regex when no mentions are present", () => {
|
||||
const msg = makeMsg({
|
||||
body: "clawd can you help?",
|
||||
body: "openclaw can you help?",
|
||||
selfE164: "+15551234567",
|
||||
selfJid: "15551234567@s.whatsapp.net",
|
||||
});
|
||||
|
||||
@@ -376,7 +376,7 @@ export async function monitorWebChannel(
|
||||
|
||||
if (loggedOut) {
|
||||
runtime.error(
|
||||
`WhatsApp session logged out. Run \`${formatCliCommand("moltbot channels login --channel web")}\` to relink.`,
|
||||
`WhatsApp session logged out. Run \`${formatCliCommand("openclaw channels login --channel web")}\` to relink.`,
|
||||
);
|
||||
await closeListener();
|
||||
break;
|
||||
|
||||
@@ -9,7 +9,7 @@ const baseConfig = {
|
||||
groups: { "*": { requireMention: true } },
|
||||
},
|
||||
},
|
||||
session: { store: "/tmp/moltbot-sessions.json" },
|
||||
session: { store: "/tmp/openclaw-sessions.json" },
|
||||
} as const;
|
||||
|
||||
describe("applyGroupGating", () => {
|
||||
|
||||
@@ -6,7 +6,7 @@ describe("buildInboundLine", () => {
|
||||
it("prefixes group messages with sender", () => {
|
||||
const line = buildInboundLine({
|
||||
cfg: {
|
||||
agents: { defaults: { workspace: "/tmp/clawd" } },
|
||||
agents: { defaults: { workspace: "/tmp/openclaw" } },
|
||||
channels: { whatsapp: { messagePrefix: "" } },
|
||||
} as never,
|
||||
agentId: "main",
|
||||
|
||||
@@ -252,7 +252,7 @@ export async function processMessage(params: {
|
||||
const responsePrefix =
|
||||
prefixContext.responsePrefix ??
|
||||
(configuredResponsePrefix === undefined && isSelfChat
|
||||
? (resolveIdentityNamePrefix(params.cfg, params.route.agentId) ?? "[moltbot]")
|
||||
? (resolveIdentityNamePrefix(params.cfg, params.route.agentId) ?? "[openclaw]")
|
||||
: undefined);
|
||||
|
||||
const ctxPayload = finalizeInboundContext({
|
||||
|
||||
@@ -12,7 +12,7 @@ describe("getSessionSnapshot", () => {
|
||||
vi.useFakeTimers();
|
||||
vi.setSystemTime(new Date(2026, 0, 18, 5, 0, 0));
|
||||
try {
|
||||
const root = await fs.mkdtemp(path.join(os.tmpdir(), "moltbot-snapshot-"));
|
||||
const root = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-snapshot-"));
|
||||
const storePath = path.join(root, "sessions.json");
|
||||
const sessionKey = "agent:main:whatsapp:dm:s1";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user