diff options
| author | Agando <roduccomm@gmail.com> | 2026-09-29 13:30:20 +0200 |
|---|---|---|
| committer | Agando <roduccomm@gmail.com> | 2026-09-29 13:30:20 +0200 |
| commit | 78059a20c9c6fef43da99e81ff847928a33b989c (patch) | |
| tree | 6f7f4c9863a59d787e08827ca9125afa32a8cd41 /modules/core/module-aiassist.js | |
| parent | 1b35dfa9ae70edbac0d474c79578661f973877e6 (diff) | |
newOS4 v4.6.13: typo suggestion bar (one-tap fix), consistent unknown-cmd messages, AI loop guard
Diffstat (limited to 'modules/core/module-aiassist.js')
| -rw-r--r-- | modules/core/module-aiassist.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/core/module-aiassist.js b/modules/core/module-aiassist.js index 73078d0..e134d69 100644 --- a/modules/core/module-aiassist.js +++ b/modules/core/module-aiassist.js @@ -2259,7 +2259,10 @@ buildSystemPrompt() { const originalPrint = this.terminal.print.bind(this.terminal); let output = ''; this.terminal.print = (text, type) => { output += text + '\n'; }; - try { await this.terminal.security.checkAndRun(cmd); } finally { this.terminal.print = originalPrint; } + // Flag security so unknown commands return an error instead of routing back to AI (loop guard) + const prevAiFlag = this.terminal.security._aiToolCall; + this.terminal.security._aiToolCall = true; + try { await this.terminal.security.checkAndRun(cmd); } finally { this.terminal.security._aiToolCall = prevAiFlag; this.terminal.print = originalPrint; } // 📸 Diff and append shadow report const shadowDiff = this._diffShadowVFS(); if (shadowDiff && shadowDiff.length > 0) { |