mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 10:12:42 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -3,7 +3,7 @@ import os from "node:os";
|
||||
import path from "node:path";
|
||||
|
||||
import { resolveDefaultAgentId } from "../agents/agent-scope.js";
|
||||
import type { MoltbotConfig } from "../config/config.js";
|
||||
import type { OpenClawConfig } from "../config/config.js";
|
||||
import { resolveOAuthDir, resolveStateDir } from "../config/paths.js";
|
||||
import {
|
||||
loadSessionStore,
|
||||
@@ -108,16 +108,18 @@ function findOtherStateDirs(stateDir: string): string[] {
|
||||
for (const entry of entries) {
|
||||
if (!entry.isDirectory()) continue;
|
||||
if (entry.name.startsWith(".")) continue;
|
||||
const candidate = path.resolve(root, entry.name, ".clawdbot");
|
||||
if (candidate === resolvedState) continue;
|
||||
if (existsDir(candidate)) found.push(candidate);
|
||||
const candidates = [".openclaw"].map((dir) => path.resolve(root, entry.name, dir));
|
||||
for (const candidate of candidates) {
|
||||
if (candidate === resolvedState) continue;
|
||||
if (existsDir(candidate)) found.push(candidate);
|
||||
}
|
||||
}
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
||||
export async function noteStateIntegrity(
|
||||
cfg: MoltbotConfig,
|
||||
cfg: OpenClawConfig,
|
||||
prompter: DoctorPrompterLike,
|
||||
configPath?: string,
|
||||
) {
|
||||
@@ -126,7 +128,7 @@ export async function noteStateIntegrity(
|
||||
const env = process.env;
|
||||
const homedir = os.homedir;
|
||||
const stateDir = resolveStateDir(env, homedir);
|
||||
const defaultStateDir = path.join(homedir(), ".clawdbot");
|
||||
const defaultStateDir = path.join(homedir(), ".openclaw");
|
||||
const oauthDir = resolveOAuthDir(env, stateDir);
|
||||
const agentId = resolveDefaultAgentId(cfg);
|
||||
const sessionsDir = resolveSessionTranscriptsDirForAgent(agentId, env, homedir);
|
||||
@@ -354,7 +356,7 @@ export function noteWorkspaceBackupTip(workspaceDir: string) {
|
||||
note(
|
||||
[
|
||||
"- Tip: back up the workspace in a private git repo (GitHub or GitLab).",
|
||||
"- Keep ~/.clawdbot out of git; it contains credentials and session history.",
|
||||
"- Keep ~/.openclaw out of git; it contains credentials and session history.",
|
||||
"- Details: /concepts/agent-workspace#git-backup-recommended",
|
||||
].join("\n"),
|
||||
"Workspace",
|
||||
|
||||
Reference in New Issue
Block a user