mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-30 02:38:07 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -6,9 +6,9 @@ const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), ".."
|
||||
|
||||
export function getA2uiPaths(env = process.env) {
|
||||
const srcDir =
|
||||
env.CLAWDBOT_A2UI_SRC_DIR ?? path.join(repoRoot, "src", "canvas-host", "a2ui");
|
||||
env.OPENCLAW_A2UI_SRC_DIR ?? path.join(repoRoot, "src", "canvas-host", "a2ui");
|
||||
const outDir =
|
||||
env.CLAWDBOT_A2UI_OUT_DIR ?? path.join(repoRoot, "dist", "canvas-host", "a2ui");
|
||||
env.OPENCLAW_A2UI_OUT_DIR ?? path.join(repoRoot, "dist", "canvas-host", "a2ui");
|
||||
return { srcDir, outDir };
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ export async function copyA2uiAssets({
|
||||
srcDir: string;
|
||||
outDir: string;
|
||||
}) {
|
||||
const skipMissing = process.env.CLAWDBOT_A2UI_SKIP_MISSING === "1";
|
||||
const skipMissing = process.env.OPENCLAW_A2UI_SKIP_MISSING === "1";
|
||||
try {
|
||||
await fs.stat(path.join(srcDir, "index.html"));
|
||||
await fs.stat(path.join(srcDir, "a2ui.bundle.js"));
|
||||
@@ -27,7 +27,7 @@ export async function copyA2uiAssets({
|
||||
const message =
|
||||
'Missing A2UI bundle assets. Run "pnpm canvas:a2ui:bundle" and retry.';
|
||||
if (skipMissing) {
|
||||
console.warn(`${message} Skipping copy (CLAWDBOT_A2UI_SKIP_MISSING=1).`);
|
||||
console.warn(`${message} Skipping copy (OPENCLAW_A2UI_SKIP_MISSING=1).`);
|
||||
return;
|
||||
}
|
||||
throw new Error(message, { cause: err });
|
||||
|
||||
Reference in New Issue
Block a user