@taj-special/dravix-code 1.2.0 → 1.2.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.
package/dist/cli/repl.js CHANGED
@@ -622,15 +622,15 @@ function printDiffPreview(op, cwd) {
622
622
  if (adds === 0 && removes === 0)
623
623
  return 0;
624
624
  const statStr = [
625
- removes > 0 ? chalk.hex('#f87171').bold(`-${removes}`) : '',
626
- adds > 0 ? chalk.hex('#34d399').bold(`+${adds}`) : '',
625
+ removes > 0 ? colors.error.bold(`-${removes}`) : '',
626
+ adds > 0 ? colors.success.bold(`+${adds}`) : '',
627
627
  ].filter(Boolean).join(' ');
628
628
  const writeLine = (s) => { process.stdout.write(s + '\n'); printed++; };
629
629
  process.stdout.write('\n');
630
630
  printed++;
631
- writeLine(chalk.hex('#fbbf24')(' ~') +
632
- chalk.hex('#94a3b8')(' ') +
633
- chalk.hex('#e2e8f0')(op.path ?? '') +
631
+ writeLine(colors.warn(' ~') +
632
+ colors.subtext(' ') +
633
+ colors.text(op.path ?? '') +
634
634
  (statStr ? ' ' + statStr : ''));
635
635
  const CONTEXT = 2;
636
636
  const show = new Uint8Array(diff.length);
@@ -643,15 +643,15 @@ function printDiffPreview(op, cwd) {
643
643
  const renderLine = (line) => {
644
644
  const num = String(line.lineNo).padStart(5, ' ');
645
645
  if (line.kind === 'remove') {
646
- const content = ` ${num} ${chalk.hex('#f87171')('-')} ${clip(line.text)}`;
647
- writeLine(' ' + chalk.hex('#7f1d1d')('▌') + chalk.bgHex('#1c0a0a')(content.padEnd(cols - 3)));
646
+ const content = ` ${num} ${colors.error('-')} ${clip(line.text)}`;
647
+ writeLine(' ' + colors.error('▌') + chalk.bgHex('#1c0a0a')(content.padEnd(cols - 3)));
648
648
  }
649
649
  else if (line.kind === 'add') {
650
- const content = ` ${num} ${chalk.hex('#34d399')('+')} ${clip(line.text)}`;
651
- writeLine(' ' + chalk.hex('#065f46')('▌') + chalk.bgHex('#021a0e')(content.padEnd(cols - 3)));
650
+ const content = ` ${num} ${colors.success('+')} ${clip(line.text)}`;
651
+ writeLine(' ' + colors.success('▌') + chalk.bgHex('#021a0e')(content.padEnd(cols - 3)));
652
652
  }
653
653
  else {
654
- writeLine(chalk.hex('#374151')(` ${num} ${clip(line.text)}`));
654
+ writeLine(colors.dim(` ${num} ${clip(line.text)}`));
655
655
  }
656
656
  };
657
657
  const hunks = [];
@@ -675,7 +675,7 @@ function printDiffPreview(op, cwd) {
675
675
  if (shown >= MAX_LINES)
676
676
  break;
677
677
  if (h > 0) {
678
- writeLine(chalk.hex('#374151')(' ╌╌╌'));
678
+ writeLine(colors.dim(' ╌╌╌'));
679
679
  }
680
680
  const hunk = hunks[h];
681
681
  const before = [];
@@ -718,7 +718,7 @@ function printDiffPreview(op, cwd) {
718
718
  }
719
719
  const total = diff.filter(d => d.kind !== 'context').length;
720
720
  if (total > MAX_LINES) {
721
- writeLine(chalk.hex('#4b5563')(` … ${total - MAX_LINES} more lines`));
721
+ writeLine(colors.muted(` … ${total - MAX_LINES} more lines`));
722
722
  }
723
723
  }
724
724
  catch { /* ignore */ }
@@ -2989,11 +2989,11 @@ Never guess or fabricate information.
2989
2989
  return;
2990
2990
  }
2991
2991
  const cols = process.stdout.columns ?? 80;
2992
- const boxW = Math.min(Math.max(cols - 2, 52), 100);
2993
- const BC = chalk.hex('#4338ca');
2994
- const FC = chalk.hex('#e2e8f0');
2995
- const RIGHT_W = 22;
2996
- const LABEL_W = Math.max(boxW - 11 - RIGHT_W, 8);
2992
+ const boxW = Math.min(Math.max(cols - 4, 50), 80);
2993
+ const BC = colors.dim;
2994
+ const FC = colors.text;
2995
+ const RIGHT_W = 10;
2996
+ const LABEL_W = Math.max(boxW - 11 - RIGHT_W, 10);
2997
2997
  const results = [];
2998
2998
  for (const op of validOps) {
2999
2999
  let spinLabel = '';
@@ -63,11 +63,11 @@ 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 small (<=10 lines)
67
- // For larger changes, just show summary
66
+ // Compact mode: only show diff if changes are large (>30 lines)
67
+ // For smaller changes, show the actual diff
68
68
  const totalChanges = displayAdds + displayRemoves;
69
- if (totalChanges > 10) {
70
- // Large change — show compact summary only
69
+ if (totalChanges > 30) {
70
+ // Very large change — show compact summary only
71
71
  if (result.linesBefore !== undefined && result.linesAfter !== undefined) {
72
72
  const delta = result.linesAfter - result.linesBefore;
73
73
  const deltaStr = delta > 0 ? colors.success(`+${delta}`) : delta < 0 ? colors.error(`${delta}`) : '=0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taj-special/dravix-code",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "AI-powered coding assistant CLI — Dravix Code",
5
5
  "type": "module",
6
6
  "bin": {
@@ -16,11 +16,12 @@
16
16
  "prepublishOnly": "tsc"
17
17
  },
18
18
  "dependencies": {
19
+ "@taj-special/dravix-code": "^1.2.0",
19
20
  "chalk": "^5.3.0"
20
21
  },
21
22
  "devDependencies": {
22
- "typescript": "^5.4.0",
23
- "@types/node": "^20.0.0"
23
+ "@types/node": "^20.0.0",
24
+ "typescript": "^5.4.0"
24
25
  },
25
26
  "keywords": [
26
27
  "ai",