prior-cli 1.6.0 → 1.6.1

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/bin/prior.js +6 -9
  2. package/package.json +1 -1
package/bin/prior.js CHANGED
@@ -80,18 +80,15 @@ function spinStart(label = '') {
80
80
  if (!process.stdout.isTTY) return;
81
81
  _spinLabel = label;
82
82
  _spinStart = Date.now();
83
- let labelIdx = 0;
83
+ const startTime = Date.now(); // captured in closure — never reset by label cycling
84
84
  _spinTimer = setInterval(() => {
85
85
  process.stdout.clearLine(0);
86
86
  process.stdout.cursorTo(0);
87
- const ms = Date.now() - _spinStart;
88
- // Cycle through think labels every 4s only when in thinking mode
89
- if (_spinLabel === 'thinking…') {
90
- labelIdx = Math.floor(ms / 4000) % THINK_LABELS.length;
91
- }
92
- const displayLabel = _spinLabel === 'thinking…' ? THINK_LABELS[labelIdx] : _spinLabel;
93
- const elapsedStr = ` ${c.dim('(' + fmtElapsed(ms) + ')')}`;
94
- process.stdout.write(` ${c.brand(SPIN_FRAMES[_spinIdx++ % 4])} ${c.dim(displayLabel)}${elapsedStr}`);
87
+ const ms = Date.now() - startTime;
88
+ const displayLabel = _spinLabel === 'thinking…'
89
+ ? THINK_LABELS[Math.floor(ms / 4000) % THINK_LABELS.length]
90
+ : _spinLabel;
91
+ process.stdout.write(` ${c.brand(SPIN_FRAMES[_spinIdx++ % 4])} ${c.dim(displayLabel)} ${c.dim('(' + fmtElapsed(ms) + ')')}`);
95
92
  }, 100);
96
93
  }
97
94
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prior-cli",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "Prior Network AI — command-line interface",
5
5
  "bin": {
6
6
  "prior": "bin/prior.js"