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 | 588339dd1cca9d9f7874196b7635baba61454b12 (patch) | |
| tree | 911a414fc4fc8a48b3a29b9686d05eac7372e32d /modules/core/module-aiassist.js | |
| parent | ff9fb8909af62fe57f9732f18f280657270ab5d0 (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) { |