perf(coding-agent): load changelog asset on demand

This commit is contained in:
usr-bin-roygbiv
2026-07-27 00:46:55 +00:00
parent 403931b968
commit bd371eec14
9 changed files with 246 additions and 6 deletions
+9 -3
View File
@@ -64,8 +64,8 @@ function formatBytes(bytes: number): string {
}
async function cleanBundleOutputs(): Promise<void> {
// dist/ is shared with the dev binary (dist/omp); only remove this
// script's own outputs (entry bundle + copied native assets).
// dist/ is shared with the dev binary (dist/omp); only remove assets
// emitted by this script.
let entries: string[];
try {
entries = await fs.readdir(outDir);
@@ -75,7 +75,13 @@ async function cleanBundleOutputs(): Promise<void> {
}
await Promise.all(
entries
.filter(entry => entry === "cli.js" || entry.endsWith(".node") || entry.endsWith(".js.map"))
.filter(
entry =>
entry === "cli.js" ||
entry.endsWith(".node") ||
entry.endsWith(".js.map") ||
(entry.startsWith("CHANGELOG-") && entry.endsWith(".md")),
)
.map(entry => fs.rm(path.join(outDir, entry), { force: true })),
);
}