diff options
| author | Agando <roduccomm@gmail.com> | 2026-09-29 13:49:18 +0200 |
|---|---|---|
| committer | Agando <roduccomm@gmail.com> | 2026-09-29 13:49:18 +0200 |
| commit | ab51ae2bb3a233c5ac77bff2a046ca710201c138 (patch) | |
| tree | dd0d16c6d7a40ce6ca17324a72c66b45684e39e0 /modules/core/terminal.js | |
| parent | 61d98053cbd4541fec4265095b47fa1fed066fba (diff) | |
fix: parse per-call captured output for unknown-cmd error (race-free under Promise.all)
Diffstat (limited to 'modules/core/terminal.js')
| -rw-r--r-- | modules/core/terminal.js | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/modules/core/terminal.js b/modules/core/terminal.js index 5c7a8fb..3b28b52 100644 --- a/modules/core/terminal.js +++ b/modules/core/terminal.js @@ -17,7 +17,6 @@ this.whitelist = new Set(this._baseWhitelist); // AI loop-guard: depth counter (reentrant, race-safe vs parallel tool calls) this._aiToolDepth = 0; - this._lastUnknownCmd = null; // Load persisted user deltas (add/remove) so hardcoded defaults can be demoted. this._loadSecurityDeltas(); this._registerBuiltIn(); @@ -171,7 +170,6 @@ return { cmd, args, known, destructive, system, unknown, hasSuspicious }; } async checkAndRun(rawInput) { - this._lastUnknownCmd = null; const { cmd, args, known, destructive, system, unknown, hasSuspicious } = this._classify(rawInput); // Level 3 Audit: just log and allow if (this.level === 3) { @@ -202,7 +200,6 @@ } // AI-invoked commands must not route back to AI (infinite loop) — return structured error if (this._aiToolDepth > 0) { - this._lastUnknownCmd = cmd; this.terminal.print(`Command not found: ${cmd}${sug ? `. Did you mean: ${sug.cmd}?` : ''}`, 'error'); return; } |