@lamemind/loom-deck 0.52.0 → 0.53.0
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.js +32 -10
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1085,6 +1085,15 @@ function Deck({ cwd, tasksPath, tasksDir }) {
|
|
|
1085
1085
|
* il click non sintetizza un tasto, perché nessun tasto nomina una riga o una
|
|
1086
1086
|
* vista — `↑↓` e `tab` sono relativi — e chiama i setter che la tastiera
|
|
1087
1087
|
* usa a sua volta. Un click sulla vista già attiva si limita al focus.
|
|
1088
|
+
*
|
|
1089
|
+
* ECCEZIONE: la riga già selezionata col pane già a fuoco. Lì un tasto che
|
|
1090
|
+
* la nomina ESISTE — `⏎`, che agisce proprio su «la riga selezionata» — e il
|
|
1091
|
+
* click lo sintetizza, come le superfici della riga launch: due click sulla
|
|
1092
|
+
* stessa riga aprono il detail della task o fanno il resume della
|
|
1093
|
+
* conversazione, e ogni caso limite (pin stale, nessuna sessione) resta per
|
|
1094
|
+
* costruzione quello del tasto. Le righe meta ne sono fuori: `⏎` su di loro
|
|
1095
|
+
* non fa nulla, e un click che lo sintetizzasse produrrebbe solo la nota di
|
|
1096
|
+
* scarto di `selectedTaskOr`.
|
|
1088
1097
|
*/
|
|
1089
1098
|
function onListClick(ev) {
|
|
1090
1099
|
if (!listGeometry)
|
|
@@ -1092,22 +1101,35 @@ function Deck({ cwd, tasksPath, tasksDir }) {
|
|
|
1092
1101
|
const hit = listHit(ev, listGeometry);
|
|
1093
1102
|
if (!hit)
|
|
1094
1103
|
return;
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
if (hit.
|
|
1104
|
+
if (hit.target === 'view') {
|
|
1105
|
+
setFocus(hit.pane);
|
|
1106
|
+
if (hit.pane === 'tasks')
|
|
1098
1107
|
selectTaskView(hit.key);
|
|
1099
|
-
// Le due righe meta hanno indice fisso; le task riportano l'indice di
|
|
1100
|
-
// finestra a quello della lista completa, su cui è keyata la selezione.
|
|
1101
1108
|
else
|
|
1102
|
-
|
|
1109
|
+
selectSessionView(hit.key);
|
|
1110
|
+
return;
|
|
1103
1111
|
}
|
|
1104
|
-
|
|
1105
|
-
|
|
1112
|
+
if (hit.pane === 'tasks') {
|
|
1113
|
+
// Le due righe meta hanno indice fisso; le task riportano l'indice di
|
|
1114
|
+
// finestra a quello della lista completa, su cui è keyata la selezione.
|
|
1115
|
+
const index = hit.index < META_ROWS ? hit.index : taskWin.start + hit.index;
|
|
1116
|
+
if (focus === 'tasks' && index === selIndex && index >= META_ROWS) {
|
|
1117
|
+
onKey('', { ...NO_MODIFIERS, return: true });
|
|
1118
|
+
return;
|
|
1119
|
+
}
|
|
1120
|
+
setFocus('tasks');
|
|
1121
|
+
selectTaskRow(index);
|
|
1106
1122
|
}
|
|
1107
1123
|
else {
|
|
1108
1124
|
const row = windowRows[hit.index];
|
|
1109
|
-
if (row
|
|
1110
|
-
|
|
1125
|
+
if (!row || row.kind === 'separator')
|
|
1126
|
+
return;
|
|
1127
|
+
if (focus === 'sessions' && row.sessionId === selSessionId) {
|
|
1128
|
+
onKey('', { ...NO_MODIFIERS, return: true });
|
|
1129
|
+
return;
|
|
1130
|
+
}
|
|
1131
|
+
setFocus('sessions');
|
|
1132
|
+
setSelSessionId(row.sessionId);
|
|
1111
1133
|
}
|
|
1112
1134
|
}
|
|
1113
1135
|
function onKey(input, key) {
|
package/package.json
CHANGED