perf(cli): speed up help/config paths and route config get/unset

This commit is contained in:
Peter Steinberger
2026-02-14 00:27:30 +00:00
parent 386bb0c618
commit 4d1461011d
8 changed files with 223 additions and 59 deletions

View File

@@ -0,0 +1,13 @@
import { describe, expect, it } from "vitest";
import { shouldSkipRespawnForArgv } from "./respawn-policy.js";
describe("shouldSkipRespawnForArgv", () => {
it("skips respawn for help/version calls", () => {
expect(shouldSkipRespawnForArgv(["node", "openclaw", "--help"])).toBe(true);
expect(shouldSkipRespawnForArgv(["node", "openclaw", "-V"])).toBe(true);
});
it("keeps respawn path for normal commands", () => {
expect(shouldSkipRespawnForArgv(["node", "openclaw", "status"])).toBe(false);
});
});