commitshow 0.3.24 → 0.3.25
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/lib/render.js +23 -8
- package/package.json +1 -1
package/dist/lib/render.js
CHANGED
|
@@ -471,19 +471,34 @@ export function renderAudit(view) {
|
|
|
471
471
|
const isWalkOn = p.status === 'preview';
|
|
472
472
|
const total = p.score_total ?? 0;
|
|
473
473
|
const lines = [];
|
|
474
|
-
// Big COMMIT.SHOW ANSI Shadow banner.
|
|
475
|
-
//
|
|
476
|
-
//
|
|
477
|
-
//
|
|
478
|
-
//
|
|
474
|
+
// Big COMMIT.SHOW ANSI Shadow banner. Three-tier fallback by width:
|
|
475
|
+
// · cols ≥ 99 → single-line "COMMIT.SHOW"
|
|
476
|
+
// · cols ≥ 50 → stacked two-line "COMMIT." / "SHOW" so the
|
|
477
|
+
// brand still lands at standard 80-col terminals
|
|
478
|
+
// · cols < 50 → fall through to the Claude-style strip only
|
|
479
|
+
// COLUMNS env var is the fallback when stdout isn't a TTY (CI logs ·
|
|
480
|
+
// piped output).
|
|
479
481
|
const cols = process.stdout.columns
|
|
480
482
|
?? (process.env.COLUMNS ? Number(process.env.COLUMNS) : 80);
|
|
481
|
-
const
|
|
482
|
-
|
|
483
|
-
|
|
483
|
+
const single = bigText('COMMIT.SHOW');
|
|
484
|
+
const singleW = single[0].length;
|
|
485
|
+
if (cols >= singleW + 2) {
|
|
486
|
+
for (const r of single)
|
|
484
487
|
lines.push(' ' + c.gold(r));
|
|
485
488
|
lines.push('');
|
|
486
489
|
}
|
|
490
|
+
else {
|
|
491
|
+
const top = bigText('COMMIT.');
|
|
492
|
+
const bot = bigText('SHOW');
|
|
493
|
+
const stackedW = Math.max(top[0].length, bot[0].length);
|
|
494
|
+
if (cols >= stackedW + 2) {
|
|
495
|
+
for (const r of top)
|
|
496
|
+
lines.push(' ' + c.gold(r));
|
|
497
|
+
for (const r of bot)
|
|
498
|
+
lines.push(' ' + c.gold(r));
|
|
499
|
+
lines.push('');
|
|
500
|
+
}
|
|
501
|
+
}
|
|
487
502
|
// Claude Code-style welcome strip · rounded corners + ✻ glyph. Always
|
|
488
503
|
// shown so the brand mark lands even when the big banner doesn't fit.
|
|
489
504
|
const roundTop = c.muted('╭' + '─'.repeat(INSIDE_W) + '╮');
|