project-compass 2.3.0 → 2.3.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/package.json +1 -1
- package/src/cli.js +14 -22
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -121,13 +121,6 @@ function Compass({rootPath}) {
|
|
|
121
121
|
const normalized = typeof line === 'string' ? line : JSON.stringify(line);
|
|
122
122
|
const appended = [...prev, normalized];
|
|
123
123
|
const next = appended.length > 250 ? appended.slice(appended.length - 250) : appended;
|
|
124
|
-
setLogOffset((prevOffset) => {
|
|
125
|
-
const maxScroll = Math.max(0, next.length - OUTPUT_WINDOW_SIZE);
|
|
126
|
-
if (prevOffset === 0) {
|
|
127
|
-
return 0;
|
|
128
|
-
}
|
|
129
|
-
return Math.min(maxScroll, prevOffset + 1);
|
|
130
|
-
});
|
|
131
124
|
return next;
|
|
132
125
|
});
|
|
133
126
|
}, []);
|
|
@@ -263,7 +256,6 @@ function Compass({rootPath}) {
|
|
|
263
256
|
}
|
|
264
257
|
|
|
265
258
|
const normalizedInput = input?.toLowerCase();
|
|
266
|
-
const ctrlCombo = (char) => key.ctrl && normalizedInput === char;
|
|
267
259
|
const shiftCombo = (char) => key.shift && normalizedInput === char;
|
|
268
260
|
const toggleShortcut = (char) => shiftCombo(char);
|
|
269
261
|
if (toggleShortcut('h')) {
|
|
@@ -306,11 +298,11 @@ function Compass({rootPath}) {
|
|
|
306
298
|
}
|
|
307
299
|
|
|
308
300
|
if (key.shift && key.upArrow) {
|
|
309
|
-
scrollLogs(1);
|
|
301
|
+
scrollLogs(-1);
|
|
310
302
|
return;
|
|
311
303
|
}
|
|
312
304
|
if (key.shift && key.downArrow) {
|
|
313
|
-
scrollLogs(
|
|
305
|
+
scrollLogs(1);
|
|
314
306
|
return;
|
|
315
307
|
}
|
|
316
308
|
|
|
@@ -524,20 +516,20 @@ const projectRows = [];
|
|
|
524
516
|
label: 'Navigation',
|
|
525
517
|
color: 'magenta',
|
|
526
518
|
body: [
|
|
527
|
-
'↑ / ↓ move
|
|
528
|
-
'
|
|
529
|
-
'Shift
|
|
530
|
-
'
|
|
519
|
+
'↑ / ↓ move focus, Enter: details',
|
|
520
|
+
'Shift+↑ / ↓ scroll output',
|
|
521
|
+
'Shift+H toggle help cards',
|
|
522
|
+
'? opens the overlay help'
|
|
531
523
|
]
|
|
532
524
|
},
|
|
533
525
|
{
|
|
534
526
|
label: 'Command flow',
|
|
535
527
|
color: 'cyan',
|
|
536
528
|
body: [
|
|
537
|
-
'B / T / R
|
|
538
|
-
'1-9
|
|
539
|
-
'Shift+L
|
|
540
|
-
'Ctrl+C
|
|
529
|
+
'B / T / R build/test/run',
|
|
530
|
+
'1-9 run detail commands',
|
|
531
|
+
'Shift+L rerun last command',
|
|
532
|
+
'Ctrl+C abort; type feeds stdin'
|
|
541
533
|
]
|
|
542
534
|
},
|
|
543
535
|
{
|
|
@@ -545,7 +537,7 @@ const projectRows = [];
|
|
|
545
537
|
color: 'yellow',
|
|
546
538
|
body: [
|
|
547
539
|
recentRuns.length ? `${recentRuns.length} runs recorded` : 'No runs yet · start with B/T/R',
|
|
548
|
-
'Shift+S
|
|
540
|
+
'Shift+S toggle structure guide',
|
|
549
541
|
'Shift+C save custom action',
|
|
550
542
|
'Shift+Q quit application'
|
|
551
543
|
]
|
|
@@ -609,10 +601,10 @@ const projectRows = [];
|
|
|
609
601
|
},
|
|
610
602
|
create(Text, {color: 'cyan', bold: true}, 'Help overlay · press ? to hide'),
|
|
611
603
|
create(Text, null, 'Shift+↑/↓ scrolls the log buffer while commands stream; type to feed stdin (Enter submits, Ctrl+C aborts).'),
|
|
612
|
-
create(Text, null, 'B/T/R run build/test/run; 1-9 executes detail commands;
|
|
613
|
-
create(Text, null, '
|
|
604
|
+
create(Text, null, 'B/T/R run build/test/run; 1-9 executes detail commands; Shift+L reruns the previous command.'),
|
|
605
|
+
create(Text, null, 'Shift+H toggles these help cards, Shift+S toggles the structure guide, ? toggles this overlay, Shift+Q quits.'),
|
|
614
606
|
create(Text, null, 'Projects + Details stay paired while Output keeps its own full-width band.'),
|
|
615
|
-
create(Text, null, 'Structure guide lists the manifests that trigger each language detection (
|
|
607
|
+
create(Text, null, 'Structure guide lists the manifests that trigger each language detection (Shift+S to toggle).')
|
|
616
608
|
)
|
|
617
609
|
: null;
|
|
618
610
|
|