From 78059a20c9c6fef43da99e81ff847928a33b989c Mon Sep 17 00:00:00 2001 From: Agando Date: Tue, 29 Sep 2026 13:30:20 +0200 Subject: newOS4 v4.6.13: typo suggestion bar (one-tap fix), consistent unknown-cmd messages, AI loop guard --- modules/core/module-aiassist.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modules/core/module-aiassist.js') 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) { -- cgit v1.2.3