mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -75,10 +75,10 @@ async function main() {
|
||||
}
|
||||
|
||||
const baseDir = await fs.mkdtemp(
|
||||
path.join(os.tmpdir(), "moltbot-zai-fallback-"),
|
||||
path.join(os.tmpdir(), "openclaw-zai-fallback-"),
|
||||
);
|
||||
const stateDir = path.join(baseDir, "state");
|
||||
const configPath = path.join(baseDir, "moltbot.json");
|
||||
const configPath = path.join(baseDir, "openclaw.json");
|
||||
await fs.mkdir(stateDir, { recursive: true });
|
||||
|
||||
const config = {
|
||||
@@ -98,10 +98,14 @@ async function main() {
|
||||
await fs.writeFile(configPath, JSON.stringify(config, null, 2), "utf8");
|
||||
|
||||
const sessionId =
|
||||
process.env.CLAWDBOT_ZAI_FALLBACK_SESSION_ID ?? randomUUID();
|
||||
process.env.OPENCLAW_ZAI_FALLBACK_SESSION_ID ??
|
||||
process.env.CLAWDBOT_ZAI_FALLBACK_SESSION_ID ??
|
||||
randomUUID();
|
||||
|
||||
const baseEnv: NodeJS.ProcessEnv = {
|
||||
...process.env,
|
||||
OPENCLAW_CONFIG_PATH: configPath,
|
||||
OPENCLAW_STATE_DIR: stateDir,
|
||||
CLAWDBOT_CONFIG_PATH: configPath,
|
||||
CLAWDBOT_STATE_DIR: stateDir,
|
||||
ZAI_API_KEY: zaiKey,
|
||||
@@ -127,7 +131,7 @@ async function main() {
|
||||
const run1 = await runCommand(
|
||||
"run1",
|
||||
[
|
||||
"moltbot",
|
||||
"openclaw",
|
||||
"agent",
|
||||
"--local",
|
||||
"--session-id",
|
||||
@@ -159,7 +163,7 @@ async function main() {
|
||||
const run2 = await runCommand(
|
||||
"run2",
|
||||
[
|
||||
"moltbot",
|
||||
"openclaw",
|
||||
"agent",
|
||||
"--local",
|
||||
"--session-id",
|
||||
|
||||
Reference in New Issue
Block a user