@tiens.nguyen/gu-cli 1.0.742 → 1.0.743
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/gu-repl.mjs +2 -1
- package/package.json +1 -1
- package/terminal-layout.mjs +25 -0
package/gu-repl.mjs
CHANGED
|
@@ -6274,7 +6274,8 @@ async function chooseModel() {
|
|
|
6274
6274
|
// nothing else, so the screen that follows a pick answered the less common question and left
|
|
6275
6275
|
// the more common one — "how do I change the model" — with no visible answer at all. Reported
|
|
6276
6276
|
// three times from exactly this view, twice after being told where the picker entry was.
|
|
6277
|
-
|
|
6277
|
+
// /provider is hidden (see HIDDEN_COMMANDS): point at the row of /model that does the same.
|
|
6278
|
+
console.log(dim(" to change this provider's model or URL, or remove it: /model → add or change a provider\n"));
|
|
6278
6279
|
}
|
|
6279
6280
|
// Task #125: the GLOBAL lifetime total is per-backend, so re-fetch it for the newly
|
|
6280
6281
|
// selected backend NOW — otherwise the footer would keep showing the previous backend's
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tiens.nguyen/gu-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.743",
|
|
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",
|
package/terminal-layout.mjs
CHANGED
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
const WIDE_RANGES =
|
|
30
30
|
/[ᄀ-ᅟ⺀-〾ぁ-㏿㐀-䶿一-鿿ꀀ-ꥠ-가-힣豈-︐-︙︰--⦆¢-₩]/u;
|
|
31
31
|
const ZERO_WIDTH = /[\p{Mn}\p{Me}-]/u;
|
|
32
|
+
import { keyInUse } from "./server-keys.mjs";
|
|
33
|
+
|
|
32
34
|
export function charWidth(ch) {
|
|
33
35
|
if (!ch) return 0;
|
|
34
36
|
if (ZERO_WIDTH.test(ch)) return 0;
|
|
@@ -237,6 +239,29 @@ export function codingKeyLine({
|
|
|
237
239
|
if (keys.some((k) => k.backendId)) return `not tied to ${where}`;
|
|
238
240
|
return "";
|
|
239
241
|
};
|
|
242
|
+
if (!selectedId && backendId) {
|
|
243
|
+
// KEYS BELONG TO A SERVER (#245). Reported: /model said "test1 ····AqsA · not chosen for this
|
|
244
|
+
// folder — using the first key · that key is for another provider" while the picker under it
|
|
245
|
+
// showed claude2 "(in use · default · first key)" and the bar 6QAA. test1 was the first key on
|
|
246
|
+
// the ACCOUNT; the API hands a coder its SERVER's key — the one keyInUse names, the same answer
|
|
247
|
+
// the picker gives. "Not chosen" only when this server has several keys and no default.
|
|
248
|
+
const used = keyInUse(keys, backendId);
|
|
249
|
+
if (used) {
|
|
250
|
+
const own = keys.filter((k) => k && k.backendId === backendId);
|
|
251
|
+
const pool = own.length ? own : keys.filter((k) => k && !k.backendId);
|
|
252
|
+
const notes = [];
|
|
253
|
+
if (pool.length > 1 && !own.some((k) => k.default)) notes.push("not chosen for this folder — using the first key");
|
|
254
|
+
else if (used.default && own.length > 1) notes.push("this server's default");
|
|
255
|
+
const provider = noteFor(used);
|
|
256
|
+
if (provider) notes.push(provider);
|
|
257
|
+
return {
|
|
258
|
+
text: `${used.name} ····${used.tail}`,
|
|
259
|
+
verb: pool.length > 1 ? "change" : "replace",
|
|
260
|
+
isDefault: true,
|
|
261
|
+
...(notes.length ? { note: notes.join(" · ") } : {}),
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
}
|
|
240
265
|
if (!selectedId) {
|
|
241
266
|
// NEVER PICKED — AND THAT IS WORTH SAYING OUT LOUD (reported). This folder rides the account
|
|
242
267
|
// default, which is simply the FIRST key in the list. With several stored, the one being used
|