Comando /agy:vocal per toggle feedback vocale + template aggiornato

This commit is contained in:
dev
2026-08-09 23:20:22 +02:00
parent 0807660212
commit 1c1a175512
2 changed files with 36 additions and 0 deletions
+35
View File
@@ -1266,6 +1266,41 @@ export default function agyExtension(pi: ExtensionAPI) {
}, },
}); });
pi.registerCommand("agy:vocal", {
description: "Attiva/disattiva il feedback vocale TTS. Uso: /agy:vocal [on|off|status]",
handler: async (args, ctx) => {
const arg = (args ?? "").trim().toLowerCase();
const current = getConfig("ttsNotify") ?? "true";
if (arg === "on") {
setConfig("ttsNotify", "true");
ctx.ui.notify("🔊 Feedback vocale ATTIVATO", "info");
ttsSpeak("Feedback vocale attivato.").catch(() => {});
return;
}
if (arg === "off") {
setConfig("ttsNotify", "false");
ctx.ui.notify("🔇 Feedback vocale DISATTIVATO", "info");
return;
}
if (arg === "status" || !arg) {
const on = current !== "false";
ctx.ui.notify(on ? "🔊 Feedback vocale: ATTIVO" : "🔇 Feedback vocale: DISATTIVO", "info");
return;
}
// toggle
if (current === "false") {
setConfig("ttsNotify", "true");
ctx.ui.notify("🔊 Feedback vocale ATTIVATO", "info");
ttsSpeak("Feedback vocale attivato.").catch(() => {});
} else {
setConfig("ttsNotify", "false");
ctx.ui.notify("🔇 Feedback vocale DISATTIVATO", "info");
}
},
});
// ========================================================================= // =========================================================================
// Comando: /agy:config — gestione configurazione persistente // Comando: /agy:config — gestione configurazione persistente
// ========================================================================= // =========================================================================
+1
View File
@@ -27,6 +27,7 @@ agy_tts(text="Step completato: ho analizzato il file e trovato l'errore. Obietti
- **Errori**: se uno step fallisce, annuncia il problema e cosa intendi fare - **Errori**: se uno step fallisce, annuncia il problema e cosa intendi fare
- **Non ripetere**: se il riassunto è identico al precedente, omettilo - **Non ripetere**: se il riassunto è identico al precedente, omettilo
- **Rispetta la config**: se `ttsNotify` è `false` nella config di agy-pi, salta il feedback vocale - **Rispetta la config**: se `ttsNotify` è `false` nella config di agy-pi, salta il feedback vocale
- **Toggle rapido**: l'utente può attivare/disattivare il feedback vocale con `/agy:vocal` (on|off|status)
- **Non interrompere**: il feedback vocale non deve bloccare il flusso di lavoro (fire-and-forget) - **Non interrompere**: il feedback vocale non deve bloccare il flusso di lavoro (fire-and-forget)
### Esempi ### Esempi