aboutsummaryrefslogtreecommitdiff
path: root/modules/core/module-system.js
diff options
context:
space:
mode:
authorAgando <roduccomm@gmail.com>2026-06-09 06:00:43 +0200
committerAgando <roduccomm@gmail.com>2026-06-09 06:00:43 +0200
commit9f60030e39feecc76f11671a4b9d82303c83670c (patch)
treecd4d35985f98aef0f4e688e4bcc283a476c8cd3b /modules/core/module-system.js
parentb562e1491513163921593985f3542d4ee8ae0e75 (diff)
auto: 2026-06-09_06:00 changes
Diffstat (limited to 'modules/core/module-system.js')
-rw-r--r--modules/core/module-system.js92
1 files changed, 63 insertions, 29 deletions
diff --git a/modules/core/module-system.js b/modules/core/module-system.js
index 77525c7..cfb7cc4 100644
--- a/modules/core/module-system.js
+++ b/modules/core/module-system.js
@@ -277,39 +277,73 @@
}
return;
}
- // Categorize all commands
- const cats = {
- files: ['ls','ll','cat','put','rm','mv','cp','mkdir','rmdir','cd','pwd','find','grep','head','tail','sort','wc','touch','tree','du','upload','download','vfs-export','vfs-import','edit','diff','trash','trash-dir','ls-trash','empty-trash'],
- ai: ['ai','ask','ai-clear','ai-system','ai-context','ai-allow','ai-deny','ai-ignore','ai-stop','ai-model','ai-compress','debug'],
- search: ['search','s','ddg','duck','fetch','web','extract'],
- tools: ['calc','cron-every','cron-list','cron-stop','cron-clear','wpm','mindmap','theme','voice','alias','unalias',
- 'which','env','date','cal','yes','seq','base64','printf','cut','uniq','hostname','whoami','basename','dirname','sleep','expand','tutorial','gzip','gunzip','encrypt','decrypt','files','session-save','session-load','session-list','session-delete','session-export','session-import'],
- system: ['help','clear','cls','echo','mem','status','font-size','setfont','smart-prompt','logs','preview','factory-reset','reset-vfs','export','unset','script','sh','set','test','logrotate','health-check','memory-map-export','commands','check','checkpoint','checkpoint-list','rollback','checkpoint-del'],
- net: ['server','servers','server-check','server-remove','monitor'],
- mods: ['modules','listmods','loadmod','removemod','load-local','loadlocal','startup-modules'],
- ollama: ['ollama','ollamaconnect','ollamadisconnect','ollamamodels','ollamasetmodel','ollamasetproxy','models','model-info','model-pull','model-delete','model-run'],
- skills: ['skill-list','skill-view','skill-create','skill-patch','skill-delete','skill-export','skill-import','skill-sync','skill-pack-core'],
- config: ['config','config-set','config-list','config-delete','config-export','config-reset'],
- webx: ['webxai','wx','webx','context','contexts','context-new','context-delete','smart-ask','prompt','prompt-save','prompt-list','prompt-delete','prompt-var','prompt-vars'],
- data: ['my','my-set','my-get','my-list','my-export','my-import','my-clear','export-mods','import-mods','backup','restore','share-mod'],
- ext: ['chat','chat-setapi','chat-setmodel','chat-ask','webdav-config','webdav-status','webdav-ls','webdav-push','webdav-pull','webdav-backup','webdav-restore','webdav-backup-list','webdav-explorer','webdav-browser'],
- gui: ['gui','gui-button','gui-input','gui-text','gui-clear','gui-run'],
- vault: ['secret-set','secret-get','secret-list','secret-del','secret-lock','secret-unlock','secret-setpin','secret-status'],
- };
- const labels = {
- files:'šŸ“ Filesystem', ai:'šŸ¤– AI', search:'šŸ” Search & Web', tools:'šŸ”§ Tools',
- system:'āš™ļø System', net:'šŸ“” Network', mods:'🧩 Modules', ollama:'šŸ¦™ Ollama',
- skills:'šŸ“š Skills', config:'āš™ļø Config', webx:'🌐 WebX', data:'šŸ’¾ Data',
- ext:'🧰 Extras', gui:'šŸ–„ļø GUI', vault:'šŸ”’ Vault'
+ // Dynamically group commands by owning module
+ const cmdToModule = this.terminal.moduleManager.getAllCommands();
+ const moduleGroups = {};
+ for (const [cmd, modName] of Object.entries(cmdToModule)) {
+ if (!moduleGroups[modName]) moduleGroups[modName] = [];
+ moduleGroups[modName].push(cmd);
+ }
+ const modLabels = {
+ FileSystemModule: 'šŸ“ Filesystem',
+ WebX11AIAssistantModule: 'šŸ¤– AI',
+ WebXAIAliasModule: '🌐 WebX',
+ DuckDuckGoModule: 'šŸ” Search & Web',
+ SearXNGModule: 'šŸ” Search & Web',
+ WebFetcherModule: 'šŸ” Search & Web',
+ AliasModule: 'šŸ”§ Tools',
+ BusyBoxModule: 'šŸ”§ Tools',
+ CalcModule: 'šŸ”§ Tools',
+ CronModule: 'šŸ”§ Tools',
+ CryptoGzipModule: 'šŸ”§ Tools',
+ DiffModule: 'šŸ”§ Tools',
+ EditorModule: 'šŸ”§ Tools',
+ FileManagerModule: 'šŸ”§ Tools',
+ FinderModule: 'šŸ”§ Tools',
+ MindmapModule: 'šŸ”§ Tools',
+ ThemeModule: 'šŸ”§ Tools',
+ TutorialModule: 'šŸ”§ Tools',
+ VoiceModule: 'šŸ”§ Tools',
+ WpmModule: 'šŸ”§ Tools',
+ SystemModule: 'āš™ļø System',
+ ShellModule: 'āš™ļø System',
+ ServerMonitorModule: 'šŸ“” Network',
+ ModuleManagerModule: '🧩 Modules',
+ OllamaModule: 'šŸ¦™ Ollama',
+ NeuralVFSModule: '🧠 Neural VFS',
+ SkillPackCoreModule: 'šŸ“š Skills',
+ ConfigManagerModule: 'āš™ļø Config',
+ ModuleIOModule: 'šŸ”Œ I/O',
+ SandboxModule: 'šŸ–ļø Sandbox',
+ MyModule: 'šŸ’¾ Data',
+ WebDAVModule: '🧰 Extras',
+ ChatStudioModule: '🧰 Extras',
+ SimpleGUIModule: 'šŸ–„ļø GUI',
+ SecretVault: 'šŸ”’ Vault',
+ OrchestratorModule: '🧠 Orchestrator',
+ PredictorModule: 'šŸ”® Prediction',
+ SmartContextModule: '🧠 Context',
+ MemoryGraphModule: 'šŸ“Š Memory',
+ DynamicPromptsModule: 'šŸ’¬ Prompts',
+ WorldModelModule: 'šŸŒ World',
+ LeaseModule: 'šŸ” Leases',
+ AgentRegistryModule: 'šŸ¤– Agents',
};
+ // Merge modules with the same label
+ const grouped = {};
+ const usedLabels = new Set();
+ for (const [modName, cmds] of Object.entries(moduleGroups)) {
+ const label = modLabels[modName] || `🧩 ${modName.replace(/Module$/, '')}`;
+ if (!grouped[label]) grouped[label] = [];
+ grouped[label].push(...cmds);
+ usedLabels.add(label);
+ }
let result = '╔══════════════════════════════════════╗\nā•‘ šŸ”· WebX11 ' + (window.NEWOS4_VERSION || 'v4.0') + ' — All Commands ā•‘\nā•šā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•\n\n';
const total = Object.keys(helpMap).length;
result += `šŸ“Š ${total} commands loaded\n\n`;
- for (const [key, cmds] of Object.entries(cats)) {
- const present = cmds.filter(c => helpMap[c]);
- if (present.length === 0) continue;
- result += labels[key] + '\n';
- present.forEach(c => {
+ for (const [label, cmds] of Object.entries(grouped)) {
+ result += label + '\n';
+ cmds.forEach(c => {
const desc = (helpMap[c] || c).split(' — ')[1] || '';
const short = desc.substring(0, 55);
result += ` ${c.padEnd(16)}${short}\n`;