From 74a306d7889161a30862c9510d4430d0b162f2e3 Mon Sep 17 00:00:00 2001 From: Darknode-Official Date: Sun, 1 Nov 2026 21:27:26 -0800 Subject: [PATCH] TUI polish: fit /settings limits at 100 cols, align engine list, shrink slash hint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - /settings Limits: the camelCase keys only needed a short label column, so narrow it (26 -> 16) and tighten the value/source column (20 -> 14). The longest row (minimizeCalls with NEXUS_MINIMIZE_CALLS) now fits at 100 columns instead of wrapping its env-var name onto a second line. - /engine list: pad the engine name to a fixed column (padEnd 9) so the descriptions line up, matching the doctor screen. - slash-command menu footer: the "tab complete ... esc dismiss" hint was being truncated to "esc dism…" at 80 columns. Fall back to a shorter, whole hint ("select · enter run · esc") when the full one does not fit the footer. --- darknode.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/darknode.js b/darknode.js index 9cf9056..ae198c9 100755 --- a/darknode.js +++ b/darknode.js @@ -3557,7 +3557,7 @@ function nexusTui(engine, cwd, nexusMd, autoResume, launch) { if (composer.searchMode) return yellow("reverse search: ") + bold(composer.searchQuery) + gray(" ctrl+r older · enter accept · esc cancel"); if (pasteNotice) return yellow("paste: ") + pasteNotice; if (linkNotice) return (linkNotice.ok ? green : yellow)(linkNotice.text); - if (slashMatches().length || argMatches().length) return gray("↑↓ select · tab complete · enter run · esc dismiss"); + if (slashMatches().length || argMatches().length) { const full = "↑↓ select · tab complete · enter run · esc dismiss"; return gray(room != null && strWidth(full) > room ? "↑↓ select · enter run · esc" : full); } // persistent vim-mode tag whenever /vim is on (NORMAL is attention-grabbing) const vtag = composer.vim ? (composer.vimMode === "normal" ? bold(yellow("-- NORMAL --")) : green("-- INSERT --")) + gray(" · ") : ""; if (scroll > 0) return vtag + yellow(scroll + " line" + (scroll > 1 ? "s" : "") + " below") + gray(" · pgup/pgdn scroll · end jump to latest"); @@ -5707,9 +5707,9 @@ function nexusTui(engine, cwd, nexusMd, autoResume, launch) { if (!(row.key in liveGov)) continue; const val = liveGov[row.key]; const shown = row.key === "budgetCap" ? (val ? "$" + Number(val).toFixed(2) : "off") : (val ? "on" : "off"); - const srcTxt = Ssrc[row.key] === "env" ? " env" : Ssrc[row.key] === "saved" ? " saved" : " default", src = gray(srcTxt) + " ".repeat(Math.max(2, 20 - shown.length - srcTxt.length)); + const srcTxt = Ssrc[row.key] === "env" ? " env" : Ssrc[row.key] === "saved" ? " saved" : " default", src = gray(srcTxt) + " ".repeat(Math.max(2, 14 - shown.length - srcTxt.length)); const envName = nexusSettings.ENV_NAME[row.key]; - text += "\n " + row.key.padEnd(26) + bold(onOff(shown)) + src + gray("/settings " + row.key + (row.key === "budgetCap" ? " |off" : " on|off") + (envName ? " " + envName : "")); + text += "\n " + row.key.padEnd(16) + bold(onOff(shown)) + src + gray("/settings " + row.key + (row.key === "budgetCap" ? " |off" : " on|off") + (envName ? " " + envName : "")); } text += "\n " + gray("colour: NO_COLOR=1 disables, FORCE_COLOR=1 forces (NO_COLOR wins)."); transcript.push({ role: "system", text }); @@ -6293,7 +6293,7 @@ function nexusTui(engine, cwd, nexusMd, autoResume, launch) { }); } else if (cmd === "/engine") { - if (!arg) transcript.push({ role: "system", text: "engines (● installed):\n" + ENGINE_ORDER.map((e) => " " + (engineAvail(e) ? green("●") : gray("○")) + " " + e + gray(" " + ENGINES[e].label + (ENGINES[e].paid ? "" : " · free")) + (e === engine ? " " + cyan("(current)") : "")).join("\n") + "\nswitch with /engine " }); + if (!arg) transcript.push({ role: "system", text: "engines (● installed):\n" + ENGINE_ORDER.map((e) => " " + (engineAvail(e) ? green("●") : gray("○")) + " " + e.padEnd(9) + gray(ENGINES[e].label + (ENGINES[e].paid ? "" : " · free")) + (e === engine ? " " + cyan("(current)") : "")).join("\n") + "\nswitch with /engine " }); else if (!ENGINES[arg]) transcript.push({ role: "system", text: "unknown engine '" + arg + "' — options: " + ENGINE_ORDER.join(", ") }); else if (offline && ENGINES[arg].kind !== "local") transcript.push({ role: "system", text: "offline lock is ON — cloud engines are blocked. Turn it off with /offline first." }); else if (!engineAvail(arg)) transcript.push({ role: "system", text: "'" + arg + "' (" + ENGINES[arg].label + ") isn't installed — install its CLI, then /engine " + arg });