From 0eca39021874a673933ebb82b973002b682e7a4b Mon Sep 17 00:00:00 2001 From: Agando Date: Thu, 18 Jun 2026 18:00:54 +0200 Subject: auto: 2026-06-18_18:00 changes --- modules/ext/console.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'modules/ext') diff --git a/modules/ext/console.js b/modules/ext/console.js index f041ad0..5d3007a 100644 --- a/modules/ext/console.js +++ b/modules/ext/console.js @@ -8,13 +8,23 @@ class JSConsoleModule { getHelpInfo() { return { 'js': 'js — Evaluate JavaScript in page context', - 'js-run': 'js-run — Load and execute a JS file from VFS' + 'js-run': 'js-run — Load and execute a JS file from VFS', + 'node': 'node — Alias for js-run (executes a JS file from VFS)' }; } registerCommands() { this.commands['js'] = (args) => this.evalJS(args); this.commands['js-run'] = (args) => this.evalJSFile(args); + this.commands['node'] = (args) => { + // Bridge: AI hallucinates `node script.js` — map to js-run + if (!args[0]) return this.terminal.print('Usage: node (alias for js-run)', 'warning'); + // Handle `node -e "expr"` — inline eval like Node.js + if (args[0] === '-e') { + return this.evalJS(args.slice(1)); + } + return this.evalJSFile(args); + }; } evalJS(args) { -- cgit v1.2.3