@tiens.nguyen/gu-cli 1.0.878 → 1.0.879

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.
Files changed (2) hide show
  1. package/gu-repl.mjs +8 -2
  2. package/package.json +1 -1
package/gu-repl.mjs CHANGED
@@ -550,6 +550,7 @@ const orange = (s) => color256(208, s); // peak-token label (task #84)
550
550
  // A menu's ACTION rows (pick another model…, API keys…, add a provider…) in orange, apart from the
551
551
  // models above them (#248). \x1b[22m first: an unselected picker row is wrapped in dim, which would
552
552
  // turn the orange grey. Plain text when colour is off (NO_COLOR, TERM=dumb).
553
+ const ACTION_ROW_START = "\x1b[22m\x1b[38;5;208m";
553
554
  const actionRow = (s) => (dim("x") === "x" ? s : `\x1b[22m${orange(s)}`);
554
555
  // Compact token count: 950 → "950", 12300 → "12.3k", 1500000 → "1.5M" (task #83).
555
556
  const fmtTokens = (n) => {
@@ -11290,7 +11291,11 @@ function drawList(redraw) {
11290
11291
  const box = listMulti ? (listChecked.has(i) ? "[x] " : "[ ] ") : "";
11291
11292
  const left = listDeadline && i === listTimeoutIndex ? " (auto in " + countdownLabel(listDeadline - Date.now()) + ")" : "";
11292
11293
  const body = box + listItems[i] + left;
11293
- return clipVisible(GUTTER + (i === listSel ? accent("▸ " + body) : dim(" " + body)), width - 1);
11294
+ // An orange action row (#249) gets an orange ▸ too — the cursor in the row's own colour.
11295
+ const cursor = i === listSel
11296
+ ? (String(listItems[i]).startsWith(ACTION_ROW_START) ? orange("▸ ") + body : accent("▸ " + body))
11297
+ : dim(" " + body);
11298
+ return clipVisible(GUTTER + cursor, width - 1);
11294
11299
  };
11295
11300
  const marker = (text) => clipVisible(GUTTER + dim(text), width - 1);
11296
11301
  const rows = [];
@@ -11308,7 +11313,8 @@ function drawList(redraw) {
11308
11313
  // The cap's message rides UNDER the list, in the same block, so it is erased and redrawn with
11309
11314
  // it — a note printed into the scrolling output would stay on screen after the list is gone.
11310
11315
  if (listNote) rows.push(clipVisible(GUTTER + yellow(listNote), width - 1));
11311
- if (listFooter) rows.push(clipVisible(GUTTER + dim(listFooter), width - 1));
11316
+ // Indented like the rows' text (past the "▸ " column), not like the ▸ itself.
11317
+ if (listFooter) rows.push(clipVisible(GUTTER + dim(" " + listFooter), width - 1));
11312
11318
  // On a redraw the caret sits one row BELOW the block (each draw ends with "\n").
11313
11319
  const up = redraw ? physicalRows(listRowsDrawn, width) : 0;
11314
11320
  // #321: what the screen held under the picker when it opened, and how far it reaches — so the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiens.nguyen/gu-cli",
3
- "version": "1.0.878",
3
+ "version": "1.0.879",
4
4
  "description": "Gu CLI — the gu terminal plus the local worker that runs agent / OCR / PDF / embedding jobs on your Mac (Ollama / MLX / OpenAI-compatible).",
5
5
  "type": "module",
6
6
  "license": "MIT",