@tiens.nguyen/gonext-local-worker 1.0.189 → 1.0.190

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/gonext-repl.mjs +7 -0
  2. package/package.json +1 -1
package/gonext-repl.mjs CHANGED
@@ -306,6 +306,13 @@ async function runAgentTurn(history) {
306
306
  const tick = () => {
307
307
  if (!following || followAborted || !jobRunning) return;
308
308
  if (Date.now() - lastContentAt < QUIET_MS) return; // tokens still flowing
309
+ // A plain-reply answer streams onto a line with NO trailing newline until it's fully
310
+ // done — if the model pauses mid-sentence (normal token-generation jitter) and we're
311
+ // already partway through that open line, CLEAR_LINE can only erase the terminal's
312
+ // CURRENT visual row, not the whole logical line once it's wrapped — overwriting the
313
+ // ticker there corrupts the visible answer text mid-word. Stay silent once any of
314
+ // THIS line has already been shown; the next completed line (fresh, empty) is safe.
315
+ if (plainReplyFlow && carryFlushedLen > 0) return;
309
316
  // Count from when the stream actually went quiet, so the seconds reflect the true
310
317
  // wait for the first token (1s, 2s, 3s…) rather than from the first tick.
311
318
  if (!thinking) { thinking = true; thinkingSince = lastContentAt; thinkWord = pickWord(); }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiens.nguyen/gonext-local-worker",
3
- "version": "1.0.189",
3
+ "version": "1.0.190",
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",