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/core/module-fs.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'modules/core/module-fs.js') diff --git a/modules/core/module-fs.js b/modules/core/module-fs.js index ab8fd99..25442eb 100644 --- a/modules/core/module-fs.js +++ b/modules/core/module-fs.js @@ -33,6 +33,11 @@ class FileSystemModule { 'download': 'download — Download a file to your device', 'vfs-export': 'vfs-export — Export the entire virtual filesystem as JSON', 'vfs-import': 'vfs-import — Import a previously exported VFS JSON file', + 'session-save': 'session-save — Save current session (path + terminal history)', + 'session-load': 'session-load — Load a saved session', + 'session-list': 'session-list — List all saved sessions', + 'session-new': 'session-new — Start a fresh session (auto-saves current, clears AI context)', + 'session-delete': 'session-delete — Delete a saved session', }; } registerCommands() { @@ -486,6 +491,18 @@ class FileSystemModule { this.terminal.print('Session not found: ' + args[0], 'error'); } }; + this.commands['session-new'] = () => { + // Auto-save current session, clear AI context, fresh terminal + this.terminal._autoSaveSession(); + try { localStorage.removeItem('webx11_ai_context'); } catch(e) {} + // Clear terminal output + if (this.terminal.outputContainer) this.terminal.outputContainer.innerHTML = ''; + if (this.terminal._historyBuffer) this.terminal._historyBuffer = []; + // Clear AI conversation context + const aiMod = this.terminal.moduleManager.modules['WebX11AIAssistantModule']; + if (aiMod && aiMod.clearContext) aiMod.clearContext(); + this.terminal.print('✨ New session started — context cleared', 'success'); + }; this.commands['session-export'] = (args) => { if (!args[0]) return this.terminal.print('Usage: session-export ', 'warning'); const filePath = '_sessions/' + args[0] + '.json'; -- cgit v1.2.3