@taj-special/dravix-code 1.4.2 → 1.4.4

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/dist/cli/index.js +13 -18
  2. package/package.json +1 -1
package/dist/cli/index.js CHANGED
@@ -79,8 +79,6 @@ async function showFirstTimeDialog(projectName) {
79
79
  }
80
80
  function cleanup() {
81
81
  process.stdin.removeListener('data', onKey);
82
- process.stdin.setRawMode(false);
83
- process.stdin.pause();
84
82
  }
85
83
  process.stdin.on('data', onKey);
86
84
  });
@@ -261,6 +259,19 @@ async function main() {
261
259
  const planBadge = plan === 'Plus'
262
260
  ? colors.accent.bold('Plus')
263
261
  : colors.muted('Free');
262
+ // ── First-time project check ──────────────────────────────
263
+ const pHash = projectHash(cwd);
264
+ const visited = getVisitedProjects();
265
+ if (!visited.includes(pHash)) {
266
+ const open = await showFirstTimeDialog(path.basename(cwd));
267
+ if (!open) {
268
+ console.log(chalk.hex('#6b7280')('\n Exited.\n'));
269
+ process.exit(0);
270
+ }
271
+ markProjectVisited(pHash);
272
+ // Clear dialog before banner appears
273
+ process.stdout.write('\x1b[2J\x1b[1;1H');
274
+ }
264
275
  const rows = process.stdout.rows ?? 24;
265
276
  const cols = process.stdout.columns ?? 80;
266
277
  // FULL-SCREEN: clear everything, set scroll region to entire terminal
@@ -297,22 +308,6 @@ async function main() {
297
308
  process.on('exit', cleanup);
298
309
  process.on('SIGINT', () => { cleanup(); process.exit(0); });
299
310
  process.on('SIGTERM', () => { cleanup(); process.exit(0); });
300
- // ── First-time project check ──────────────────────────────
301
- const pHash = projectHash(cwd);
302
- const visited = getVisitedProjects();
303
- if (!visited.includes(pHash)) {
304
- process.stdin.setRawMode(false);
305
- process.stdin.pause();
306
- const open = await showFirstTimeDialog(path.basename(cwd));
307
- if (!open) {
308
- console.log(chalk.hex('#6b7280')('\n Exited.\n'));
309
- process.exit(0);
310
- }
311
- markProjectVisited(pHash);
312
- // Restore terminal for upcoming banner + REPL
313
- process.stdin.setRawMode(true);
314
- process.stdin.resume();
315
- }
316
311
  await startRepl(cwd);
317
312
  }
318
313
  main().catch((err) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taj-special/dravix-code",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "description": "AI-powered coding assistant CLI — Dravix Code",
5
5
  "type": "module",
6
6
  "bin": {