mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-10 17:23:25 +08:00
重构主控编排与运行时预热链路,统一工作区提示词/专家调度协议并补齐 wiki 记忆注入与写回闭环。
同时收敛启动与运维脚本默认行为(含 wiki worker)、更新 Admin 可观测性与相关测试,降低首轮时延并提高运行稳定性。 Made-with: Cursor
This commit is contained in:
parent
4a23b715a2
commit
dbbe3add6a
14438 changed files with 2693620 additions and 2546 deletions
54
openclaw/scripts/copy-export-html-templates.ts
Normal file
54
openclaw/scripts/copy-export-html-templates.ts
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
#!/usr/bin/env tsx
|
||||
/**
|
||||
* Copy export-html templates from src to dist
|
||||
*/
|
||||
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { ensureDirectory, logVerboseCopy, resolveBuildCopyContext } from "./lib/copy-assets.ts";
|
||||
|
||||
const context = resolveBuildCopyContext(import.meta.url);
|
||||
|
||||
const srcDir = path.join(context.projectRoot, "src", "auto-reply", "reply", "export-html");
|
||||
const distDir = path.join(context.projectRoot, "dist", "export-html");
|
||||
|
||||
function copyExportHtmlTemplates() {
|
||||
if (!fs.existsSync(srcDir)) {
|
||||
console.warn(`${context.prefix} Source directory not found:`, srcDir);
|
||||
return;
|
||||
}
|
||||
|
||||
ensureDirectory(distDir);
|
||||
|
||||
const templateFiles = ["template.html", "template.css", "template.js"];
|
||||
let copiedCount = 0;
|
||||
for (const file of templateFiles) {
|
||||
const srcFile = path.join(srcDir, file);
|
||||
const distFile = path.join(distDir, file);
|
||||
if (fs.existsSync(srcFile)) {
|
||||
fs.copyFileSync(srcFile, distFile);
|
||||
copiedCount += 1;
|
||||
logVerboseCopy(context, `Copied ${file}`);
|
||||
}
|
||||
}
|
||||
|
||||
const srcVendor = path.join(srcDir, "vendor");
|
||||
const distVendor = path.join(distDir, "vendor");
|
||||
if (fs.existsSync(srcVendor)) {
|
||||
ensureDirectory(distVendor);
|
||||
const vendorFiles = fs.readdirSync(srcVendor);
|
||||
for (const file of vendorFiles) {
|
||||
const srcFile = path.join(srcVendor, file);
|
||||
const distFile = path.join(distVendor, file);
|
||||
if (fs.statSync(srcFile).isFile()) {
|
||||
fs.copyFileSync(srcFile, distFile);
|
||||
copiedCount += 1;
|
||||
logVerboseCopy(context, `Copied vendor/${file}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
console.log(`${context.prefix} Copied ${copiedCount} export-html assets.`);
|
||||
}
|
||||
|
||||
copyExportHtmlTemplates();
|
||||
Loading…
Add table
Add a link
Reference in a new issue