mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 04:01:23 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -3,7 +3,7 @@ import fs from "node:fs/promises";
|
||||
import JSON5 from "json5";
|
||||
|
||||
import { DEFAULT_AGENT_WORKSPACE_DIR, ensureAgentWorkspace } from "../agents/workspace.js";
|
||||
import { type MoltbotConfig, createConfigIO, writeConfigFile } from "../config/config.js";
|
||||
import { type OpenClawConfig, createConfigIO, writeConfigFile } from "../config/config.js";
|
||||
import { formatConfigPath, logConfigUpdated } from "../config/logging.js";
|
||||
import { resolveSessionTranscriptsDir } from "../config/sessions.js";
|
||||
import type { RuntimeEnv } from "../runtime.js";
|
||||
@@ -12,13 +12,13 @@ import { shortenHomePath } from "../utils.js";
|
||||
|
||||
async function readConfigFileRaw(configPath: string): Promise<{
|
||||
exists: boolean;
|
||||
parsed: MoltbotConfig;
|
||||
parsed: OpenClawConfig;
|
||||
}> {
|
||||
try {
|
||||
const raw = await fs.readFile(configPath, "utf-8");
|
||||
const parsed = JSON5.parse(raw);
|
||||
if (parsed && typeof parsed === "object") {
|
||||
return { exists: true, parsed: parsed as MoltbotConfig };
|
||||
return { exists: true, parsed: parsed as OpenClawConfig };
|
||||
}
|
||||
return { exists: true, parsed: {} };
|
||||
} catch {
|
||||
@@ -43,7 +43,7 @@ export async function setupCommand(
|
||||
|
||||
const workspace = desiredWorkspace ?? defaults.workspace ?? DEFAULT_AGENT_WORKSPACE_DIR;
|
||||
|
||||
const next: MoltbotConfig = {
|
||||
const next: OpenClawConfig = {
|
||||
...cfg,
|
||||
agents: {
|
||||
...cfg.agents,
|
||||
|
||||
Reference in New Issue
Block a user