@tiens.nguyen/gonext-local-worker 1.0.264 → 1.0.265
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 +19 -12
- package/package.json +1 -1
package/gonext-repl.mjs
CHANGED
|
@@ -1276,27 +1276,34 @@ async function runAgentTurn(history) {
|
|
|
1276
1276
|
// Priority: a live command > the model's current Thought clause (task #64, so a
|
|
1277
1277
|
// long CPU-bound step reads as what it's actually reasoning about, not "Thinking")
|
|
1278
1278
|
// > the "almost done" heartbeat > the bare fallback.
|
|
1279
|
-
const primary = runningCmd
|
|
1280
|
-
? `Running ${runningCmd}`
|
|
1281
|
-
: liveThought || (almostDone ? "Almost done" : "Thinking");
|
|
1282
1279
|
const max = Math.max(24, (process.stdout.columns || 80) - 14);
|
|
1283
1280
|
const fit = (s) => (s.length > max ? s.slice(0, max - 1) + "…" : s);
|
|
1284
1281
|
const tokLabel =
|
|
1285
1282
|
dim(` · ${fmtTokens(latestCodeTokens)} tok`) +
|
|
1286
1283
|
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
|
-
|
|
1284
|
+
// Task #96: the thought line is "clickable" only when the fuller thought has MORE text than
|
|
1285
|
+
// fits on line 1 (a live command / bare "Thinking" / a thought that already fits has nothing
|
|
1286
|
+
// to reveal). Line 1 (what's happening now): a live command > the model's current Thought >
|
|
1287
|
+
// "almost done" > "Thinking". When clickable we drive line 1 from the SAME fuller string, so
|
|
1288
|
+
// the grey expansion CONTINUES where line 1 was cut off instead of repeating the head.
|
|
1289
|
+
const clickable = !!fullLiveThought && !runningCmd && fullLiveThought.length > max;
|
|
1290
|
+
const primary = runningCmd
|
|
1291
|
+
? `Running ${runningCmd}`
|
|
1292
|
+
: clickable
|
|
1293
|
+
? fullLiveThought
|
|
1294
|
+
: liveThought || (almostDone ? "Almost done" : "Thinking");
|
|
1295
|
+
const label = `${fit(primary)}… (${secs}s)`;
|
|
1296
|
+
// When clicked, unfold the REMAINDER (what fit() dropped, i.e. from char max-1 on) as up to
|
|
1297
|
+
// 4 wrapped GREY lines BETWEEN the thought and the playful-word line.
|
|
1298
|
+
const rest = clickable ? fullLiveThought.slice(max - 1).trim() : "";
|
|
1299
|
+
const expLines = thoughtExpanded && rest ? wrapThought(rest, max, 4) : [];
|
|
1295
1300
|
const drawn = 2 + expLines.length;
|
|
1296
1301
|
const rows = process.stdout.rows || 24;
|
|
1302
|
+
// Hover-highlight only the THOUGHT line (line 1) — its exact viewport row comes from the
|
|
1303
|
+
// \x1b[6n probe below (`thoughtRow`); fall back to the viewport-bottom assumption only when
|
|
1304
|
+
// the terminal never answered the probe.
|
|
1297
1305
|
const tRow = thoughtRow >= 1 ? thoughtRow : rows - drawn + 1;
|
|
1298
1306
|
const hovering = clickable && hoverRow === tRow;
|
|
1299
|
-
const label = `${fit(primary)}… (${secs}s)`;
|
|
1300
1307
|
clearStatus();
|
|
1301
1308
|
// Right after clearing, the cursor sits at the status block's TOP-LEFT = the thought line's
|
|
1302
1309
|
// 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.265",
|
|
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",
|