mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-12-03 16:15:41 -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
@@ -53,6 +53,19 @@ export const LOOKS_FILE = path.join(HOME_DIR, "looks.json");
|
||||
// so every session within the hour reuses one lookup.
|
||||
export const UPDATE_CHECK_FILE = path.join(HOME_DIR, "update-check.json");
|
||||
|
||||
// Where the person likes skills to run: "web" (this console) or "terminal".
|
||||
// One file for the user, read by every skill in every project, and kept apart
|
||||
// from looks.json because the page rewrites that one from its own copy and
|
||||
// would put back a stale value. Written only by `console.mjs interface --set`.
|
||||
export const INTERFACE_FILE = path.join(HOME_DIR, "interface.json");
|
||||
export const INTERFACES = Object.freeze(["web", "terminal"]);
|
||||
|
||||
// The saved interface, or null when there is none or the file is unreadable.
|
||||
export function savedInterface() {
|
||||
const saved = readJson(INTERFACE_FILE, null);
|
||||
return saved && INTERFACES.includes(saved.interface) ? saved.interface : null;
|
||||
}
|
||||
|
||||
// The runtime dir has to follow PLAN2CODE_CONSOLE_HOME too. Without that, a
|
||||
// test run (or a second sandboxed instance) shares one handle directory with
|
||||
// the real thing, and `stop --all` reaches outside its own world and kills a
|
||||
|
||||
Reference in new issue
Block a user