@taj-special/dravix-code 1.2.3 → 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/dist/cli/index.js CHANGED
@@ -172,9 +172,6 @@ async function main() {
172
172
  await browserAuth();
173
173
  justAuthenticated = true;
174
174
  }
175
- else {
176
- banner();
177
- }
178
175
  const { name, email } = getSavedUser();
179
176
  const cwd = (arg && !arg.startsWith('--')) ? path.resolve(arg) : process.cwd();
180
177
  const token = (await import('../services/auth.js')).getToken() ?? '';
@@ -188,6 +185,14 @@ async function main() {
188
185
  const planBadge = plan === 'Plus'
189
186
  ? colors.accent.bold('Plus')
190
187
  : colors.muted('Free');
188
+ const rows = process.stdout.rows ?? 24;
189
+ const cols = process.stdout.columns ?? 80;
190
+ // FULL-SCREEN: clear everything, set scroll region to entire terminal
191
+ process.stdout.write('\x1b[2J'); // Clear entire screen
192
+ process.stdout.write(`\x1b[1;${rows}r`); // Scroll region = entire terminal
193
+ process.stdout.write('\x1b[1;1H'); // Move to top-left
194
+ // Draw the app (ONE logo only)
195
+ banner();
191
196
  console.log(DIM(' ' + '─'.repeat(45)));
192
197
  console.log(colors.muted(' User ') + W(name ?? 'Unknown') + DIM(' · ') + colors.muted(email ?? ''));
193
198
  console.log(colors.muted(' Plan ') + planBadge);
@@ -207,6 +212,15 @@ async function main() {
207
212
  console.log(DIM(' ' + '─'.repeat(45)));
208
213
  console.log(colors.muted(' ') + C('Tab') + colors.muted(' path complete ') + C('@') + colors.muted(' file picker ') + C('Ctrl+C') + colors.muted(' cancel ') + C('/help') + colors.muted(' commands'));
209
214
  process.stdout.write('\n');
215
+ // Start REPL and handle cleanup on exit
216
+ const cleanup = () => {
217
+ process.stdout.write('\x1b[r'); // Reset scroll region
218
+ process.stdout.write('\x1b[2J'); // Clear screen
219
+ process.stdout.write('\x1b[1;1H'); // Move to top
220
+ };
221
+ process.on('exit', cleanup);
222
+ process.on('SIGINT', () => { cleanup(); process.exit(0); });
223
+ process.on('SIGTERM', () => { cleanup(); process.exit(0); });
210
224
  await startRepl(cwd);
211
225
  }
212
226
  main().catch((err) => {
@@ -63,11 +63,8 @@ export function printOpResult(result) {
63
63
  const labelStr = colors.subtext(' Updated ');
64
64
  const statPad = statStr ? ' ' + statStr : '';
65
65
  console.log(iconStr + labelStr + pathStr + statPad);
66
- // Compact mode: only show diff if changes are large (>30 lines)
67
- // For smaller changes, show the actual diff
68
66
  const totalChanges = displayAdds + displayRemoves;
69
67
  if (totalChanges > 30) {
70
- // Very large change — show compact summary only
71
68
  if (result.linesBefore !== undefined && result.linesAfter !== undefined) {
72
69
  const delta = result.linesAfter - result.linesBefore;
73
70
  const deltaStr = delta > 0 ? colors.success(`+${delta}`) : delta < 0 ? colors.error(`${delta}`) : '=0';
@@ -89,8 +86,8 @@ export function printOpResult(result) {
89
86
  console.log(colors.muted(' (formatting / whitespace change)'));
90
87
  return;
91
88
  }
92
- const CONTEXT = 2; // Reduced from 3 to 2 for more compact diffs
93
- const MAX_SIDE = 20; // Reduced from 40 to 20 for more compact diffs
89
+ const CONTEXT = 2;
90
+ const MAX_SIDE = 20;
94
91
  const show = new Uint8Array(diff.length);
95
92
  for (let i = 0; i < diff.length; i++) {
96
93
  if (diff[i].kind !== 'context') {
@@ -250,20 +247,19 @@ ${line}
250
247
 
251
248
  ${colors.primary.bold(' Keyboard shortcuts')}
252
249
  ${line}
253
- ${C('Tab')} ${W('Path autocomplete — navigate project files')}
254
- ${C('@')} ${W('File picker — browse and insert file path')}
255
- ${C('Ctrl+C')} ${W('Cancel AI response while streaming')}
250
+ ${C('Tab')} ${W('Path autocomplete')}
251
+ ${C('@')} ${W('File picker — attach file')}
252
+ ${C('$')} ${W('Run subagent')}
253
+ ${C('Ctrl+C')} ${W('Cancel AI response')}
256
254
  ${C('Ctrl+L')} ${W('Clear screen')}
257
- ${C(' ')} ${W('Enter / exit folder in file picker')}
258
- ${C('↑ ↓')} ${W('Navigate items in picker')}
259
- ${C('Space')} ${W('Select item in file picker')}
255
+ ${C(' ')} ${W('Navigate items')}
260
256
  ${C('Esc')} ${W('Close picker')}
261
257
 
262
258
  ${colors.primary.bold(' Tips')}
263
259
  ${line}
264
260
  ${colors.muted('·')} ${W('Start typing while AI responds — your message queues automatically')}
265
- ${colors.muted('·')} ${W('Mention a filename in your message to auto-inject its content')}
266
- ${colors.muted('·')} ${W('When approving changes:')} ${C('y')} ${DIM('yes')} ${C('a')} ${DIM('always')} ${C('n')} ${DIM('no')}
261
+ ${colors.muted('·')} ${W('Mention a filename to auto-inject its content')}
262
+ ${colors.muted('·')} ${W('Approve changes:')} ${C('y')} ${DIM('yes')} ${C('a')} ${DIM('always')} ${C('n')} ${DIM('no')}
267
263
  ${colors.muted('·')} ${W('Use /resume to continue a previous conversation')}
268
264
  `);
269
265
  }
@@ -14,10 +14,23 @@ export class ChatLayout {
14
14
  makeSep() {
15
15
  return chalk.hex('#374151')(' ' + '─'.repeat(Math.max(this.cols - 4, 40)));
16
16
  }
17
+ /** Full-screen mode: hide everything outside the app */
18
+ enterFullScreen() {
19
+ this.rows = process.stdout.rows ?? 24;
20
+ this.cols = process.stdout.columns ?? 80;
21
+ // Clear entire screen first
22
+ process.stdout.write('\x1b[2J');
23
+ // Set scroll region to ENTIRE terminal (rows 1 to rows)
24
+ // This hides everything outside the app
25
+ process.stdout.write(`\x1b[1;${this.rows}r`);
26
+ // Move to top-left
27
+ process.stdout.write('\x1b[1;1H');
28
+ }
17
29
  /** Call once at the start of startRepl — sets scroll region + draws divider. */
18
30
  init() {
19
31
  this.rows = process.stdout.rows ?? 24;
20
32
  this.cols = process.stdout.columns ?? 80;
33
+ // Set scroll region for chat (excluding bottom 3 rows for divider/input/hints)
21
34
  process.stdout.write(`\x1b[1;${this.scrollEnd}r`);
22
35
  this.redrawDivider();
23
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taj-special/dravix-code",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "description": "AI-powered coding assistant CLI — Dravix Code",
5
5
  "type": "module",
6
6
  "bin": {
@@ -16,7 +16,6 @@
16
16
  "prepublishOnly": "tsc"
17
17
  },
18
18
  "dependencies": {
19
- "@taj-special/dravix-code": "^1.2.0",
20
19
  "chalk": "^5.3.0"
21
20
  },
22
21
  "devDependencies": {