project-compass 3.5.5 → 3.5.6
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 +13 -6
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -358,12 +358,19 @@ function Compass({rootPath, initialView = 'navigator'}) {
|
|
|
358
358
|
|
|
359
359
|
const normalizedInput = input?.toLowerCase();
|
|
360
360
|
const shiftCombo = (char) => key.shift && normalizedInput === char;
|
|
361
|
+
|
|
362
|
+
const clearAndSwitch = (view) => {
|
|
363
|
+
console.clear();
|
|
364
|
+
setMainView(view);
|
|
365
|
+
setViewMode('list');
|
|
366
|
+
setShowHelp(false);
|
|
367
|
+
};
|
|
361
368
|
|
|
362
369
|
if (shiftCombo('h')) { setConfig(prev => { const next = {...prev, showHelpCards: !prev.showHelpCards}; saveConfig(next); return next; }); return; }
|
|
363
370
|
if (shiftCombo('s')) { setConfig(prev => { const next = {...prev, showStructureGuide: !prev.showStructureGuide}; saveConfig(next); return next; }); return; }
|
|
364
|
-
if (shiftCombo('a')) {
|
|
365
|
-
if (shiftCombo('p')) {
|
|
366
|
-
if (shiftCombo('n')) {
|
|
371
|
+
if (shiftCombo('a')) { clearAndSwitch(mainView === 'navigator' ? 'studio' : 'navigator'); return; }
|
|
372
|
+
if (shiftCombo('p')) { clearAndSwitch(mainView === 'navigator' ? 'registry' : 'navigator'); return; }
|
|
373
|
+
if (shiftCombo('n')) { clearAndSwitch(mainView === 'navigator' ? 'architect' : 'navigator'); return; }
|
|
367
374
|
if (shiftCombo('x')) { setTasks(prev => prev.map(t => t.id === activeTaskId ? {...t, logs: []} : t)); setLogOffset(0); return; }
|
|
368
375
|
if (shiftCombo('e')) { exportLogs(); return; }
|
|
369
376
|
if (shiftCombo('d')) { setActiveTaskId(null); return; }
|
|
@@ -371,6 +378,7 @@ function Compass({rootPath, initialView = 'navigator'}) {
|
|
|
371
378
|
|
|
372
379
|
if (shiftCombo('t')) {
|
|
373
380
|
setMainView((prev) => {
|
|
381
|
+
console.clear();
|
|
374
382
|
if (prev === 'tasks') return 'navigator';
|
|
375
383
|
if (tasks.length > 0 && !activeTaskId) setActiveTaskId(tasks[0].id);
|
|
376
384
|
return 'tasks';
|
|
@@ -382,9 +390,7 @@ function Compass({rootPath, initialView = 'navigator'}) {
|
|
|
382
390
|
|
|
383
391
|
if (key.escape) {
|
|
384
392
|
if (mainView !== 'navigator') {
|
|
385
|
-
|
|
386
|
-
setViewMode('list');
|
|
387
|
-
setShowHelp(false);
|
|
393
|
+
clearAndSwitch('navigator');
|
|
388
394
|
return;
|
|
389
395
|
}
|
|
390
396
|
}
|
|
@@ -445,6 +451,7 @@ function Compass({rootPath, initialView = 'navigator'}) {
|
|
|
445
451
|
if (key.downArrow && !key.shift && projects.length > 0) { setSelectedIndex((prev) => (prev + 1) % projects.length); return; }
|
|
446
452
|
if (key.return) {
|
|
447
453
|
if (!selectedProject) return;
|
|
454
|
+
console.clear();
|
|
448
455
|
setViewMode((prev) => (prev === 'detail' ? 'list' : 'detail'));
|
|
449
456
|
return;
|
|
450
457
|
}
|