@lamemind/loom-deck 0.49.0 → 0.49.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/dist/project-status.js +17 -1
- package/dist/spawn.js +6 -1
- package/package.json +1 -1
package/dist/project-status.js
CHANGED
|
@@ -47,9 +47,25 @@ export function readStatusCache(path) {
|
|
|
47
47
|
return null;
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Riporta a markdown gli heading scritti per la chat di Claude Code.
|
|
52
|
+
*
|
|
53
|
+
* L'output style del progetto impone lì un `#` in PIÙ (`# ## Sezione` per un
|
|
54
|
+
* H2), perché quel terminale stila solo l'H1 e senza il trucco la gerarchia si
|
|
55
|
+
* appiattirebbe. Il deck però rende markdown vero: lasciato com'è, ogni titolo
|
|
56
|
+
* del recap comparirebbe come un H1 col testo letterale `## Sezione`.
|
|
57
|
+
*
|
|
58
|
+
* Il deck è il consumatore, quindi la traduzione la paga lui: la skill produce
|
|
59
|
+
* per la chat, che resta il suo canale principale. La sostituzione è sicura
|
|
60
|
+
* anche se la convenzione sparisse — richiede altri `#` dopo il primo, quindi
|
|
61
|
+
* un heading markdown normale non la incontra mai.
|
|
62
|
+
*/
|
|
63
|
+
export function normalizeChatHeadings(text) {
|
|
64
|
+
return text.replace(/^# (#+ )/gm, '$1');
|
|
65
|
+
}
|
|
50
66
|
export function writeStatusCache(path, text) {
|
|
51
67
|
mkdirSync(dirname(path), { recursive: true, mode: 0o700 });
|
|
52
|
-
writeFileSync(path, text, { mode: 0o600 });
|
|
68
|
+
writeFileSync(path, normalizeChatHeadings(text), { mode: 0o600 });
|
|
53
69
|
}
|
|
54
70
|
export const STATUS_MISSING = 'missing';
|
|
55
71
|
/**
|
package/dist/spawn.js
CHANGED
|
@@ -425,6 +425,11 @@ export function spawnProjectStatus(cwd, sessionId, onResult) {
|
|
|
425
425
|
'auto',
|
|
426
426
|
]);
|
|
427
427
|
}
|
|
428
|
+
// Comando della notifica desktop. L'override esiste per il collaudo del ramo
|
|
429
|
+
// «binario assente»: su una macchina dove `notify-send` c'è, quel ramo non è
|
|
430
|
+
// altrimenti raggiungibile — e non provarlo significherebbe scoprire su una
|
|
431
|
+
// macchina altrui che un ENOENT non agganciato porta via la TUI.
|
|
432
|
+
export const NOTIFY_CMD = process.env.LOOM_DECK_NOTIFY_CMD ?? 'notify-send';
|
|
428
433
|
// T121 — notifica desktop di fine generazione. La generazione dura minuti e chi
|
|
429
434
|
// l'ha chiesta nel frattempo guarda altrove; la notifica di GNOME persiste nel
|
|
430
435
|
// cassetto, quindi raggiunge anche chi torna dieci minuti dopo — cosa che un
|
|
@@ -437,7 +442,7 @@ export function spawnProjectStatus(cwd, sessionId, onResult) {
|
|
|
437
442
|
// stabile della macchina, e dirlo a ogni generazione sarebbe lo stesso messaggio
|
|
438
443
|
// a ogni giro su una funzione che non è il deliverable.
|
|
439
444
|
export function notifyDone(title, body) {
|
|
440
|
-
const child = spawnOut(
|
|
445
|
+
const child = spawnOut(NOTIFY_CMD, ['--app-name=loom-deck', title, body], {
|
|
441
446
|
detached: true,
|
|
442
447
|
stdio: 'ignore',
|
|
443
448
|
});
|
package/package.json
CHANGED