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