diff options
Diffstat (limited to 'modules/core/module-aiassist.js')
| -rw-r--r-- | modules/core/module-aiassist.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/core/module-aiassist.js b/modules/core/module-aiassist.js index c58bab3..40716e4 100644 --- a/modules/core/module-aiassist.js +++ b/modules/core/module-aiassist.js @@ -781,7 +781,12 @@ buildSystemPrompt() { if (res.message && !res.tool_calls) { const text = res.message.content || ''; this.terminal.printAIResponse(text || '(no response)'); - if (text) this.terminal.ollamaManager.fireResponseHooks(text); + if (text) { + this.terminal.ollamaManager.fireResponseHooks(text); + // Auto-speak if enabled + const vm = this.terminal.moduleManager && this.terminal.moduleManager.modules['VoiceModule']; + if (vm && vm.speakText) vm.speakText(text); + } this.terminal.print(`💬 AI answered (turn ${toolTurns}/${this.MAX_TOOL_TURNS}, ${thinkTime}s)`, 'info'); return { finalAnswer: text, toolTurns }; } @@ -1464,7 +1469,7 @@ buildSystemPrompt() { 'orchestrator-status','orchestrator-list','orchestrator-config','orchestrator-restart-policy', 'a2a-list','a2a-status','a2a-poll', 'consensus','consensus-status','consensus-history', - 'pipeline','agent-list','agent-status','contract-list']); + 'pipeline','agent-list','agent-status','contract-list','voice','speak','analyze']); return !safeRead.has(cmd); } return ['write_file','delete_file','make_directory','edit_module','delegate_task','spawn_agent','create_skill','patch_skill','wpm_install','user_set','session_save'].includes(name); |