@livx.cc/agentx 0.96.2 → 0.96.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +20 -12
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -10303,20 +10303,23 @@ function resolveModelOrNewest(model) {
|
|
|
10303
10303
|
return fallback;
|
|
10304
10304
|
}
|
|
10305
10305
|
var ENV_KEY_ALIASES = { google: ["GEMINI_API_KEY"] };
|
|
10306
|
+
function loadEnvFile(file) {
|
|
10307
|
+
if (!existsSync9(file)) return;
|
|
10308
|
+
for (const line of readFileSync8(file, "utf8").split("\n")) {
|
|
10309
|
+
const m = line.match(/^\s*(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/);
|
|
10310
|
+
if (!m || m[1] in process.env) continue;
|
|
10311
|
+
let val = m[2].trim();
|
|
10312
|
+
if (val.startsWith('"') && val.endsWith('"') || val.startsWith("'") && val.endsWith("'")) val = val.slice(1, -1);
|
|
10313
|
+
else val = val.replace(/\s+#.*$/, "").trim();
|
|
10314
|
+
process.env[m[1]] = val;
|
|
10315
|
+
}
|
|
10316
|
+
}
|
|
10306
10317
|
function loadInstallEnv() {
|
|
10307
10318
|
let dir = dirname4(import.meta.path);
|
|
10308
10319
|
for (let i = 0; i < 5 && !existsSync9(join14(dir, "package.json")); i++) dir = dirname4(dir);
|
|
10309
10320
|
for (const name of [".env", ".env.local"]) {
|
|
10310
|
-
|
|
10311
|
-
|
|
10312
|
-
for (const line of readFileSync8(file, "utf8").split("\n")) {
|
|
10313
|
-
const m = line.match(/^\s*(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/);
|
|
10314
|
-
if (!m || m[1] in process.env) continue;
|
|
10315
|
-
let val = m[2].trim();
|
|
10316
|
-
if (val.startsWith('"') && val.endsWith('"') || val.startsWith("'") && val.endsWith("'")) val = val.slice(1, -1);
|
|
10317
|
-
else val = val.replace(/\s+#.*$/, "").trim();
|
|
10318
|
-
process.env[m[1]] = val;
|
|
10319
|
-
}
|
|
10321
|
+
loadEnvFile(join14(dir, name));
|
|
10322
|
+
loadEnvFile(join14(homedir9(), ".agent", name));
|
|
10320
10323
|
}
|
|
10321
10324
|
}
|
|
10322
10325
|
async function loadBodifySecrets() {
|
|
@@ -12226,7 +12229,8 @@ ${task}`;
|
|
|
12226
12229
|
{ label: "permission posture", value: "posture", desc: postureLabel() + " (Shift+Tab)" },
|
|
12227
12230
|
// streaming is the voice's lifeblood in duplex (always on) — only a normal-mode knob
|
|
12228
12231
|
...duplex ? [] : [{ label: "streaming", value: "stream", desc: agent.options.stream ? "on" : "off" }],
|
|
12229
|
-
{ label: "editor mode", value: "editor", desc: cfg.editorMode === "vim" ? "vim" : "normal" }
|
|
12232
|
+
{ label: "editor mode", value: "editor", desc: cfg.editorMode === "vim" ? "vim" : "normal" },
|
|
12233
|
+
{ label: "update check", value: "updateCheck", desc: cfg.updateCheck === false ? "off" : "on" }
|
|
12230
12234
|
];
|
|
12231
12235
|
const pick = await selectMenu(process.stderr, { title: "Settings \xB7 \u21B5 change \xB7 esc close", items });
|
|
12232
12236
|
if (!pick) return;
|
|
@@ -12247,6 +12251,10 @@ ${task}`;
|
|
|
12247
12251
|
cfg.editorMode = cfg.editorMode === "vim" ? "normal" : "vim";
|
|
12248
12252
|
persistSetting(cwd, "editorMode", cfg.editorMode);
|
|
12249
12253
|
err(dim(" editor \u2192 " + cfg.editorMode + "\n"));
|
|
12254
|
+
} else if (pick === "updateCheck") {
|
|
12255
|
+
cfg.updateCheck = cfg.updateCheck === false ? true : false;
|
|
12256
|
+
persistSetting(cwd, "updateCheck", cfg.updateCheck);
|
|
12257
|
+
err(dim(" update check \u2192 " + (cfg.updateCheck ? "on" : "off") + "\n"));
|
|
12250
12258
|
}
|
|
12251
12259
|
}
|
|
12252
12260
|
}
|
|
@@ -12797,7 +12805,7 @@ ${task}`;
|
|
|
12797
12805
|
banner(bold("agentx") + cyan(" v" + VERSION) + dim(` \u2014 ${work.model} \xB7 ${cwd}`));
|
|
12798
12806
|
banner(dim("Type a task, or /help. Type / or @ for live suggestions (\u2191/\u2193 \u23CE). Esc cancels/clears; double-Esc jumps back; Ctrl-D exits."));
|
|
12799
12807
|
if (dx) banner(dim(`\u25D1 duplex \u2014 reflex: ${dx.options.reflexModel} \xB7 act: ${work.model}${dx.options.thinkModel !== false ? ` \xB7 think: ${dx.options.thinkModel}` : ""} (real work runs in background tasks, re-voiced when done)`));
|
|
12800
|
-
if (args.updateCheck !== false) checkForUpdate(VERSION).then((msg) => {
|
|
12808
|
+
if (args.updateCheck !== false && cfg.updateCheck !== false) checkForUpdate(VERSION).then((msg) => {
|
|
12801
12809
|
if (msg) err(yellow(` ${msg}
|
|
12802
12810
|
`));
|
|
12803
12811
|
}).catch(() => {
|