mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 21:58:26 +00:00
refactor: rename clawdbot to moltbot with legacy compat
This commit is contained in:
@@ -16,7 +16,7 @@ vi.mock("../agents/pi-embedded.js", () => ({
|
||||
import { runEmbeddedPiAgent } from "../agents/pi-embedded.js";
|
||||
import { resetInboundDedupe } from "../auto-reply/reply/inbound-dedupe.js";
|
||||
import { getReplyFromConfig } from "../auto-reply/reply.js";
|
||||
import type { ClawdbotConfig } from "../config/config.js";
|
||||
import type { MoltbotConfig } from "../config/config.js";
|
||||
import { monitorWebChannel } from "./auto-reply.js";
|
||||
import { resetLoadConfigMock, setLoadConfigMock } from "./test-helpers.js";
|
||||
|
||||
@@ -48,7 +48,7 @@ const rmDirWithRetries = async (dir: string): Promise<void> => {
|
||||
beforeEach(async () => {
|
||||
resetInboundDedupe();
|
||||
previousHome = process.env.HOME;
|
||||
tempHome = await fs.mkdtemp(path.join(os.tmpdir(), "clawdbot-web-home-"));
|
||||
tempHome = await fs.mkdtemp(path.join(os.tmpdir(), "moltbot-web-home-"));
|
||||
process.env.HOME = tempHome;
|
||||
});
|
||||
|
||||
@@ -63,7 +63,7 @@ afterEach(async () => {
|
||||
const makeSessionStore = async (
|
||||
entries: Record<string, unknown> = {},
|
||||
): Promise<{ storePath: string; cleanup: () => Promise<void> }> => {
|
||||
const dir = await fs.mkdtemp(path.join(os.tmpdir(), "clawdbot-session-"));
|
||||
const dir = await fs.mkdtemp(path.join(os.tmpdir(), "moltbot-session-"));
|
||||
const storePath = path.join(dir, "sessions.json");
|
||||
await fs.writeFile(storePath, JSON.stringify(entries));
|
||||
const cleanup = async () => {
|
||||
@@ -102,7 +102,7 @@ describe("partial reply gating", () => {
|
||||
|
||||
const replyResolver = vi.fn().mockResolvedValue({ text: "final reply" });
|
||||
|
||||
const mockConfig: ClawdbotConfig = {
|
||||
const mockConfig: MoltbotConfig = {
|
||||
channels: { whatsapp: { allowFrom: ["*"] } },
|
||||
};
|
||||
|
||||
@@ -145,7 +145,7 @@ describe("partial reply gating", () => {
|
||||
|
||||
const replyResolver = vi.fn().mockResolvedValue({ text: "final reply" });
|
||||
|
||||
const mockConfig: ClawdbotConfig = {
|
||||
const mockConfig: MoltbotConfig = {
|
||||
channels: {
|
||||
whatsapp: {
|
||||
allowFrom: ["*"],
|
||||
@@ -195,7 +195,7 @@ describe("partial reply gating", () => {
|
||||
|
||||
const replyResolver = vi.fn().mockResolvedValue(undefined);
|
||||
|
||||
const mockConfig: ClawdbotConfig = {
|
||||
const mockConfig: MoltbotConfig = {
|
||||
channels: { whatsapp: { allowFrom: ["*"] } },
|
||||
session: { store: store.storePath },
|
||||
};
|
||||
@@ -249,7 +249,7 @@ describe("partial reply gating", () => {
|
||||
|
||||
const replyResolver = vi.fn().mockResolvedValue(undefined);
|
||||
|
||||
const mockConfig: ClawdbotConfig = {
|
||||
const mockConfig: MoltbotConfig = {
|
||||
channels: { whatsapp: { allowFrom: ["*"] } },
|
||||
session: { store: store.storePath },
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user