Remember the terminal or web console choice, refresh the launcher model menus (v3.2.2)

AI Assisted
This commit is contained in:
jparkerweb committed 2026-11-30 20:08:23 -08:00
1 parent f1d087ba47
commit ccf82c4eb7
60 files changed
+477 -317

No files matched your search

+15 -1
View File
@@ -5,7 +5,7 @@ import os from "node:os";
import path from "node:path";
import { spawnSync } from "node:child_process";
import { fileURLToPath } from "node:url";
import { BANNED, findBanned } from "./check-prompt-wording.mjs";
import { BANNED, findBanned, findBakedWeb } from "./check-prompt-wording.mjs";
const HERE = path.dirname(fileURLToPath(import.meta.url));
const ROOT = path.dirname(HERE);
@@ -37,6 +37,16 @@ test("a longer word that contains a banned name is not a hit", () => {
assert.deepEqual(findBanned(dir), []);
});
test("a baked --web in a skill command is found, with its file and line", () => {
const dir = fixture({ "x/SKILL.md": "fine\n`NEXT STEP: /plan2code-1-plan --web`\n" });
assert.deepEqual(findBakedWeb(dir), [{ file: "x/SKILL.md", line: 2, text: "`NEXT STEP: /plan2code-1-plan --web`" }]);
});
test("a bare command with the web-console note is not a hit", () => {
const dir = fixture({ "a.md": "Run `/plan2code-1-plan` (add `--web` for the web console)\n`--web` is the console flag\n" });
assert.deepEqual(findBakedWeb(dir), []);
});
test("the CLI exits 1 on a hit and 0 on a clean tree", () => {
const bad = fixture({ "a.md": "never use Glob\n" });
const r = spawnSync(process.execPath, [path.join(HERE, "check-prompt-wording.mjs"), bad], { encoding: "utf8" });
@@ -49,3 +59,7 @@ test("the CLI exits 1 on a hit and 0 on a clean tree", () => {
test("the built skills tree names no product tool", { skip: !fs.existsSync(path.join(ROOT, "skills")) }, () => {
assert.deepEqual(findBanned(path.join(ROOT, "skills")), []);
});
test("the built skills tree bakes no --web into skill commands", { skip: !fs.existsSync(path.join(ROOT, "skills")) }, () => {
assert.deepEqual(findBakedWeb(path.join(ROOT, "skills")), []);
});