// Extracted from newOS4 index.html — WebXAIAliasModule class WebXAIAliasModule { constructor() { this.commands = {}; this.terminal = null; } getHelpInfo() { return { 'webxai': 'webxai — Send a question to the AI assistant', 'wx': 'wx — Alias for webxai', 'webx': 'webx — Alias for webxai' }; } registerCommands() { this.commands['webxai'] = (args) => this.forwardToAI(args); this.commands['wx'] = (args) => this.forwardToAI(args); this.commands['webx'] = (args) => this.forwardToAI(args); } forwardToAI(args) { if (!args[0]) { this.terminal.print("Usage: webxai ", "warning"); return; } if (this.terminal.moduleManager.modules['WebX11AIAssistantModule']) { this.terminal.moduleManager.modules['WebX11AIAssistantModule'].chat(args); } else { this.terminal.ollamaManager.chat(args.join(' ')); } } }