mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-30 23:59:20 -08:00
Remember the terminal or web console choice, refresh the launcher model menus (v3.2.2)
AI Assisted
This commit is contained in:
1 parent
f1d087ba47
commit
ccf82c4eb7
60 files changed
+477
-317
No files matched your search
@@ -695,7 +695,10 @@ test("launcher: on Windows the saved user PATH fills in folders the inherited PA
|
||||
addSavedWindowsPath();
|
||||
const dirs = process.env[pathKey].split(";");
|
||||
assert.equal(dirs[0], "C:\\stale-terminal-path", "the inherited PATH keeps its place in front");
|
||||
assert.ok(dirs.includes(first), `${first} is added from the saved PATH`);
|
||||
// Compared as the launcher dedupes them: the machine PATH may already hold the
|
||||
// same folder spelled another way (a trailing backslash, another case), and that copy wins.
|
||||
const id = (dir) => path.resolve(dir.replace(/^"|"$/g, "")).toLowerCase();
|
||||
assert.ok(dirs.map(id).includes(id(first)), `${first} is added from the saved PATH`);
|
||||
const length = dirs.length;
|
||||
addSavedWindowsPath();
|
||||
assert.equal(process.env[pathKey].split(";").length, length, "a second call adds nothing twice");
|
||||
@@ -1793,8 +1796,8 @@ test("launcher menus: the agent tip shows once, and the model menu prints ids in
|
||||
assert.doesNotMatch(first.stdout, /That runs outside the desktop app/, "no app installed, so no line about it");
|
||||
// ids padded to the longest (opusplan), then the description; the first run's Enter is the agent's.
|
||||
assert.match(first.stdout, /^ {2}1\) default {3}your account setting$/m);
|
||||
assert.match(first.stdout, /^ {2}2\) sonnet {4}latest Sonnet$/m);
|
||||
assert.match(first.stdout, /^ {2}5\) opusplan {2}Opus in plan mode, Sonnet otherwise$/m);
|
||||
assert.match(first.stdout, /^ {2}3\) sonnet {4}latest Sonnet$/m);
|
||||
assert.match(first.stdout, /^ {2}7\) opusplan {2}Opus in plan mode, Sonnet otherwise$/m);
|
||||
assert.match(first.stdout, /Choice \[agent default\]: /);
|
||||
assert.ok(box.argsOf("claude").includes("opus"), "a typed description picks its model");
|
||||
const state = JSON.parse(fs.readFileSync(box.stateFile, "utf8"));
|
||||
@@ -1806,8 +1809,8 @@ test("launcher menus: the agent tip shows once, and the model menu prints ids in
|
||||
assert.equal(second.status, 0, second.stderr);
|
||||
assert.equal(second.sent, 3, second.stdout);
|
||||
assert.doesNotMatch(second.stdout, /skip this launcher/);
|
||||
assert.match(second.stdout, /^ {2}3\) opus {6}latest Opus \(last used\)$/m);
|
||||
assert.match(second.stdout, /Choice \[3\]: /);
|
||||
assert.match(second.stdout, /^ {2}4\) opus {6}latest Opus \(last used\)$/m);
|
||||
assert.match(second.stdout, /Choice \[4\]: /);
|
||||
assert.ok(box.argsOf("claude").includes("opus"));
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user