novaprime 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.
package/bin/novaprime.js CHANGED
@@ -87,9 +87,9 @@ async function repl() {
87
87
  let messages = [];
88
88
  while (true) {
89
89
  console.log('');
90
- process.stdout.write(ui.inputTop() + '\n');
90
+ ui.inputBoxOpen();
91
91
  const raw = await ask(ui.inputPrompt());
92
- process.stdout.write(ui.inputBottom() + '\n\n');
92
+ ui.inputBoxClose();
93
93
 
94
94
  if (raw === null) { console.log(c.muted(' bye')); break; }
95
95
  const input = raw.trim();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "novaprime",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "NovaPrime — an AI coding assistant in your terminal, powered by GLM.",
5
5
  "bin": {
6
6
  "novaprime": "bin/novaprime.js"
package/src/ui.js CHANGED
@@ -80,8 +80,8 @@ function banner({ folder, key, name, plan, model, windowUsed, windowLimit, weekl
80
80
  }));
81
81
  }
82
82
 
83
- // ---- Claude-style chat input box (clean: no status inside) ----
84
- function boxWidth() { return Math.min((process.stdout.columns || 80) - 2, 60); }
83
+ // ---- Claude-style chat input box (full width, complete box) ----
84
+ function boxWidth() { return Math.max(24, (process.stdout.columns || 80) - 1); }
85
85
  function inputTop() {
86
86
  const w = boxWidth();
87
87
  return c.dim('╭─ ') + c.indigo('message') + ' ' + c.dim('─'.repeat(Math.max(2, w - 12)) + '╮');
@@ -89,8 +89,14 @@ function inputTop() {
89
89
  function inputPrompt() { return c.dim('│ ') + c.indigoBold('› '); }
90
90
  function inputBottom() {
91
91
  const w = boxWidth();
92
- return c.dim('╰' + '─'.repeat(Math.max(2, w - 1)) + '╯');
92
+ return c.dim('╰' + '─'.repeat(Math.max(2, w - 2)) + '╯');
93
93
  }
94
+ // draw the FULL box (top, empty input line, bottom), then move the cursor up onto the input line
95
+ function inputBoxOpen() {
96
+ const ESC = String.fromCharCode(27);
97
+ process.stdout.write(inputTop() + '\n\n' + inputBottom() + '\n' + ESC + '[2A');
98
+ }
99
+ function inputBoxClose() { process.stdout.write('\n'); }
94
100
 
95
101
  function aiLabel() { process.stdout.write('\n' + c.violet('● ') + c.violet.bold('Nova Prime') + '\n'); }
96
102
 
@@ -101,4 +107,4 @@ function error(msg) { console.log(c.red(' ✕ ') + c.red(msg)); }
101
107
  function ok(msg) { console.log(c.green(' ✓ ') + c.body(msg)); }
102
108
  function tool(name, detail) { console.log(c.dim(' · ' + name + (detail ? ' ' + detail : ''))); }
103
109
 
104
- module.exports = { chalk, boxen, c, banner, maskKey, aiLabel, inputTop, inputPrompt, inputBottom, info, hint, warn, error, ok, tool };
110
+ module.exports = { chalk, boxen, c, banner, maskKey, aiLabel, inputTop, inputBottom, inputPrompt, inputBoxOpen, inputBoxClose, info, hint, warn, error, ok, tool };