prior-cli 1.2.4 → 1.2.5

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 +3 -5
  2. package/package.json +1 -1
package/bin/prior.js CHANGED
@@ -670,14 +670,12 @@ async function startChat(opts = {}) {
670
670
  clearSuggestions();
671
671
  if (!matches.length) return;
672
672
  _suggCount = matches.length;
673
- process.stdout.write('\x1b[s'); // save cursor first (at end of typed input)
674
- // Print newlines to scroll terminal and guarantee room below the prompt
675
- process.stdout.write('\n'.repeat(matches.length));
676
- process.stdout.write(`\x1b[${matches.length}A`); // move cursor back up to prompt line
673
+ process.stdout.write('\x1b[s'); // save cursor at end of typed input
677
674
  for (const { cmd, desc } of matches) {
675
+ // \x1b[B = cursor down 1 (no scroll), \r = col 0, \x1b[2K = clear line
678
676
  process.stdout.write(`\x1b[B\r\x1b[2K${c.brand(' ' + cmd.padEnd(14))}${c.dim(desc)}`);
679
677
  }
680
- process.stdout.write('\x1b[u'); // restore cursor to end of typed input
678
+ process.stdout.write('\x1b[u'); // restore cursor to end of typed input
681
679
  }
682
680
 
683
681
  process.stdin.on('keypress', (ch, key) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prior-cli",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "Prior Network AI — command-line interface",
5
5
  "bin": {
6
6
  "prior": "bin/prior.js"