@tiens.nguyen/gonext-local-worker 1.0.264 → 1.0.266
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/gonext-repl.mjs +23 -15
- package/package.json +1 -1
package/gonext-repl.mjs
CHANGED
|
@@ -48,9 +48,10 @@ const white = (s) => `\x1b[37m${s}\x1b[0m`;
|
|
|
48
48
|
// code 34 (blue) which many dark-theme palettes render as purple/indigo instead.
|
|
49
49
|
const codeColor = (s) => `\x1b[90m${s}\x1b[0m`;
|
|
50
50
|
const bold = (s) => `\x1b[1m${s}\x1b[0m`;
|
|
51
|
-
// Hover highlight for the clickable thinking line (task #96):
|
|
52
|
-
//
|
|
53
|
-
|
|
51
|
+
// Hover highlight for the clickable thinking line (task #96): just shift the color a little
|
|
52
|
+
// toward white (no bold/underline/anchor) so it subtly signals "hovered" without looking like
|
|
53
|
+
// a link. 97 = bright white.
|
|
54
|
+
const hoverThought = (s) => `\x1b[97m${s}\x1b[0m`;
|
|
54
55
|
|
|
55
56
|
// The worker's "still thinking" heartbeat lines look like "Caffeinating… (90s)" — we
|
|
56
57
|
// SWALLOW them from the terminal (the local ticker below drives progress instead), and
|
|
@@ -1276,27 +1277,34 @@ async function runAgentTurn(history) {
|
|
|
1276
1277
|
// Priority: a live command > the model's current Thought clause (task #64, so a
|
|
1277
1278
|
// long CPU-bound step reads as what it's actually reasoning about, not "Thinking")
|
|
1278
1279
|
// > the "almost done" heartbeat > the bare fallback.
|
|
1279
|
-
const primary = runningCmd
|
|
1280
|
-
? `Running ${runningCmd}`
|
|
1281
|
-
: liveThought || (almostDone ? "Almost done" : "Thinking");
|
|
1282
1280
|
const max = Math.max(24, (process.stdout.columns || 80) - 14);
|
|
1283
1281
|
const fit = (s) => (s.length > max ? s.slice(0, max - 1) + "…" : s);
|
|
1284
1282
|
const tokLabel =
|
|
1285
1283
|
dim(` · ${fmtTokens(latestCodeTokens)} tok`) +
|
|
1286
1284
|
orange(` · ${fmtTokens(sessionMaxCodeTokens)} max`);
|
|
1287
|
-
// Task #96: the thought line is "clickable" only when
|
|
1288
|
-
// (a live command / bare "Thinking"
|
|
1289
|
-
//
|
|
1290
|
-
//
|
|
1291
|
-
// the
|
|
1292
|
-
|
|
1293
|
-
const
|
|
1294
|
-
|
|
1285
|
+
// Task #96: the thought line is "clickable" only when the fuller thought has MORE text than
|
|
1286
|
+
// fits on line 1 (a live command / bare "Thinking" / a thought that already fits has nothing
|
|
1287
|
+
// to reveal). Line 1 (what's happening now): a live command > the model's current Thought >
|
|
1288
|
+
// "almost done" > "Thinking". When clickable we drive line 1 from the SAME fuller string, so
|
|
1289
|
+
// the grey expansion CONTINUES where line 1 was cut off instead of repeating the head.
|
|
1290
|
+
const clickable = !!fullLiveThought && !runningCmd && fullLiveThought.length > max;
|
|
1291
|
+
const primary = runningCmd
|
|
1292
|
+
? `Running ${runningCmd}`
|
|
1293
|
+
: clickable
|
|
1294
|
+
? fullLiveThought
|
|
1295
|
+
: liveThought || (almostDone ? "Almost done" : "Thinking");
|
|
1296
|
+
const label = `${fit(primary)}… (${secs}s)`;
|
|
1297
|
+
// When clicked, unfold the REMAINDER (what fit() dropped, i.e. from char max-1 on) as up to
|
|
1298
|
+
// 4 wrapped GREY lines BETWEEN the thought and the playful-word line.
|
|
1299
|
+
const rest = clickable ? fullLiveThought.slice(max - 1).trim() : "";
|
|
1300
|
+
const expLines = thoughtExpanded && rest ? wrapThought(rest, max, 4) : [];
|
|
1295
1301
|
const drawn = 2 + expLines.length;
|
|
1296
1302
|
const rows = process.stdout.rows || 24;
|
|
1303
|
+
// Hover-highlight only the THOUGHT line (line 1) — its exact viewport row comes from the
|
|
1304
|
+
// \x1b[6n probe below (`thoughtRow`); fall back to the viewport-bottom assumption only when
|
|
1305
|
+
// the terminal never answered the probe.
|
|
1297
1306
|
const tRow = thoughtRow >= 1 ? thoughtRow : rows - drawn + 1;
|
|
1298
1307
|
const hovering = clickable && hoverRow === tRow;
|
|
1299
|
-
const label = `${fit(primary)}… (${secs}s)`;
|
|
1300
1308
|
clearStatus();
|
|
1301
1309
|
// Right after clearing, the cursor sits at the status block's TOP-LEFT = the thought line's
|
|
1302
1310
|
// row. Probe for it (throttled) so hover/click hit-testing is exact wherever the block is.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tiens.nguyen/gonext-local-worker",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.266",
|
|
4
4
|
"description": "Polls GoNext cloud API for async local LLM jobs and runs them against Ollama/OpenAI-compatible servers on this Mac",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|