aboutsummaryrefslogtreecommitdiff
path: root/modules/core/module-fs.js
diff options
context:
space:
mode:
Diffstat (limited to 'modules/core/module-fs.js')
-rw-r--r--modules/core/module-fs.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/core/module-fs.js b/modules/core/module-fs.js
index 686a1a6..03c3733 100644
--- a/modules/core/module-fs.js
+++ b/modules/core/module-fs.js
@@ -63,7 +63,13 @@ class FileSystemModule {
const total = filtered.reduce((s, f) => s + (f.size || 0), 0);
this.terminal.print('total ' + filtered.length + ' (' + total + ' bytes)', 'text-muted');
} else {
- this.terminal.printClickable(filtered);
+ // v4.6.57: printClickable() writes straight to the DOM, so anything that
+ // captures output (the AI run_command tool, the diagnostics sweep) saw nothing
+ // and reported "directory empty" (packet ยง1b). Always emit a text line.
+ const names = filtered.map(f => f.name + (f.type === 'dir' ? '/' : '')).join(' ');
+ this.terminal.print(names);
+ const capturing = !!(this.terminal._printCaptureStack && this.terminal._printCaptureStack.length);
+ if (!capturing && typeof this.terminal.printClickable === 'function') this.terminal.printClickable(filtered);
}
};
this.commands['cat'] = (args) => {