mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 06:00:23 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, test } from "vitest";
|
||||
import type { MoltbotConfig } from "../config/config.js";
|
||||
import type { OpenClawConfig } from "../config/config.js";
|
||||
import type { SessionEntry } from "../config/sessions.js";
|
||||
import { applySessionsPatchToStore } from "./sessions-patch.js";
|
||||
|
||||
@@ -7,7 +7,7 @@ describe("gateway sessions patch", () => {
|
||||
test("persists elevatedLevel=off (does not clear)", async () => {
|
||||
const store: Record<string, SessionEntry> = {};
|
||||
const res = await applySessionsPatchToStore({
|
||||
cfg: {} as MoltbotConfig,
|
||||
cfg: {} as OpenClawConfig,
|
||||
store,
|
||||
storeKey: "agent:main:main",
|
||||
patch: { elevatedLevel: "off" },
|
||||
@@ -20,7 +20,7 @@ describe("gateway sessions patch", () => {
|
||||
test("persists elevatedLevel=on", async () => {
|
||||
const store: Record<string, SessionEntry> = {};
|
||||
const res = await applySessionsPatchToStore({
|
||||
cfg: {} as MoltbotConfig,
|
||||
cfg: {} as OpenClawConfig,
|
||||
store,
|
||||
storeKey: "agent:main:main",
|
||||
patch: { elevatedLevel: "on" },
|
||||
@@ -35,7 +35,7 @@ describe("gateway sessions patch", () => {
|
||||
"agent:main:main": { elevatedLevel: "off" } as SessionEntry,
|
||||
};
|
||||
const res = await applySessionsPatchToStore({
|
||||
cfg: {} as MoltbotConfig,
|
||||
cfg: {} as OpenClawConfig,
|
||||
store,
|
||||
storeKey: "agent:main:main",
|
||||
patch: { elevatedLevel: null },
|
||||
@@ -48,7 +48,7 @@ describe("gateway sessions patch", () => {
|
||||
test("rejects invalid elevatedLevel values", async () => {
|
||||
const store: Record<string, SessionEntry> = {};
|
||||
const res = await applySessionsPatchToStore({
|
||||
cfg: {} as MoltbotConfig,
|
||||
cfg: {} as OpenClawConfig,
|
||||
store,
|
||||
storeKey: "agent:main:main",
|
||||
patch: { elevatedLevel: "maybe" },
|
||||
@@ -71,7 +71,7 @@ describe("gateway sessions patch", () => {
|
||||
} as SessionEntry,
|
||||
};
|
||||
const res = await applySessionsPatchToStore({
|
||||
cfg: {} as MoltbotConfig,
|
||||
cfg: {} as OpenClawConfig,
|
||||
store,
|
||||
storeKey: "agent:main:main",
|
||||
patch: { model: "openai/gpt-5.2" },
|
||||
|
||||
Reference in New Issue
Block a user