@taj-special/dravix-code 1.2.1 → 1.2.2

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/repl.js +27 -5
  2. package/package.json +1 -1
package/dist/cli/repl.js CHANGED
@@ -2989,11 +2989,34 @@ 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 - 4, 50), 80);
2992
+ const boxW = Math.min(Math.max(cols - 6, 40), 60);
2993
2993
  const BC = colors.dim;
2994
2994
  const FC = colors.text;
2995
- const RIGHT_W = 10;
2995
+ const RIGHT_W = 8;
2996
2996
  const LABEL_W = Math.max(boxW - 11 - RIGHT_W, 10);
2997
+ // Helper: shorten file path (remove common prefixes)
2998
+ const shortenPath = (p) => {
2999
+ // Remove drive letter and common prefixes
3000
+ let short = p.replace(/^[A-Z]:\\[^\\]+\\[^\\]+\\/i, '');
3001
+ // If still too long, show only last 2 parts
3002
+ if (short.length > 30) {
3003
+ const parts = short.split(/[/\\]/);
3004
+ short = '...' + parts.slice(-2).join('/');
3005
+ }
3006
+ return short;
3007
+ };
3008
+ // Helper: truncate long file names
3009
+ const truncateName = (name, maxLen) => {
3010
+ if (name.length <= maxLen)
3011
+ return name;
3012
+ const ext = name.lastIndexOf('.');
3013
+ if (ext > 0) {
3014
+ const base = name.slice(0, ext);
3015
+ const fileExt = name.slice(ext);
3016
+ return base.slice(0, maxLen - fileExt.length - 3) + '...' + fileExt;
3017
+ }
3018
+ return name.slice(0, maxLen - 3) + '...';
3019
+ };
2997
3020
  const results = [];
2998
3021
  for (const op of validOps) {
2999
3022
  let spinLabel = '';
@@ -3107,9 +3130,8 @@ Never guess or fabricate information.
3107
3130
  process.stdout.write(` ` + BC('╭─') + colors.primary.bold(titleText) + BC('─'.repeat(dashCount) + '╮') + `\n`);
3108
3131
  for (const r of results) {
3109
3132
  const icon = r.ok ? colors.success('✓') : colors.error('✗');
3110
- const disp = r.label.length > LABEL_W
3111
- ? '…' + r.label.slice(-(LABEL_W - 1))
3112
- : r.label;
3133
+ const shortLabel = shortenPath(r.label);
3134
+ const disp = truncateName(shortLabel, LABEL_W);
3113
3135
  const labelPad = ' '.repeat(Math.max(LABEL_W - disp.length, 0));
3114
3136
  const rightVis = stripAnsi(r.right);
3115
3137
  const rightPad = ' '.repeat(Math.max(RIGHT_W - rightVis.length, 0));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taj-special/dravix-code",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "AI-powered coding assistant CLI — Dravix Code",
5
5
  "type": "module",
6
6
  "bin": {