diff options
| author | Agando <roduccomm@gmail.com> | 2026-09-29 15:56:27 +0200 |
|---|---|---|
| committer | Agando <roduccomm@gmail.com> | 2026-09-29 15:56:27 +0200 |
| commit | dde918a235ff8eac41f6d205e954dc4a4daa5b01 (patch) | |
| tree | a58da7664e938d6d4d0fca0974932139e8b8584c /modules/core/module-fs.js | |
| parent | 0e454aecf55d862b7618ebd1c98ca9fd71a15817 (diff) | |
newOS4 v4.6.15: reentrant print-capture stack, AI tail -f block, read-only sed in safeRead, security test harness (21 checks)
Diffstat (limited to 'modules/core/module-fs.js')
| -rw-r--r-- | modules/core/module-fs.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/core/module-fs.js b/modules/core/module-fs.js index 112302b..d94feb8 100644 --- a/modules/core/module-fs.js +++ b/modules/core/module-fs.js @@ -256,6 +256,10 @@ class FileSystemModule { if (c === null || c === undefined) return this.terminal.print('tail: ' + file + ': No such file', 'error'); this.terminal.print(c.split('\n').slice(-n).join('\n')); if (!follow) return; + // AI tool calls cannot press Ctrl+C — auto-downgrade to a bounded read instead of a live timer + if (this.terminal.security && this.terminal.security._aiToolDepth > 0) { + return this.terminal.print('tail: follow mode (-f) is interactive-only; showing last lines instead (use tail -n ' + Math.max(n, 50) + ' for more)', 'warning'); + } // stop any previous follow before starting a new one if (this.terminal._activeFollow && this.terminal._activeFollow.interval) clearInterval(this.terminal._activeFollow.interval); this.terminal._activeFollow = null; |