diff options
| author | Agando <roduccomm@gmail.com> | 2026-07-09 06:00:32 +0200 |
|---|---|---|
| committer | Agando <roduccomm@gmail.com> | 2026-07-09 06:00:32 +0200 |
| commit | 2538c91876455fe96febf441fc8dde20f2606023 (patch) | |
| tree | b74c949cdf4296d10103dd57ef8178ba427a5b39 /modules/core/virtual-fs.js | |
| parent | ea4d09fb5ccba12ed774fcf7c913edfa1e6a851a (diff) | |
auto: 2026-07-09_06:00 changes
Diffstat (limited to 'modules/core/virtual-fs.js')
| -rw-r--r-- | modules/core/virtual-fs.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/modules/core/virtual-fs.js b/modules/core/virtual-fs.js index 7f6b441..d8b5098 100644 --- a/modules/core/virtual-fs.js +++ b/modules/core/virtual-fs.js @@ -37,6 +37,7 @@ class VirtualFileSystem { const vmCache = {}; // factories can cache costly results within same tick const mm = () => typeof window !== 'undefined' ? window.webx11?.moduleManager?.modules : null; const ai = () => mm()?.WebX11AIAssistantModule || null; + const ds = () => mm()?.DebugSupervisorModule || null; const heap = () => typeof performance !== 'undefined' && performance.memory ? performance.memory : null; const fmt = (bytes) => { if (!bytes && bytes !== 0) return 'N/A'; @@ -112,7 +113,7 @@ class VirtualFileSystem { const a = ai(); const cCount = a?.context?.length || 0; const lCount = a?._toolCallLog?.length || 0; - const eCount = a?._errorLog?.length || 0; + const eCount = ds() ? Object.keys(ds()._errorDB?.errors || {}).length : 0; const modules = mm() ? Object.keys(mm()).length : 0; const domNodes = typeof document !== 'undefined' ? document.querySelectorAll('*').length : 0; return [ @@ -166,9 +167,12 @@ class VirtualFileSystem { return a._toolCallLog.map((e, i) => `[${i}] ${JSON.stringify(e)}`).join('\n'); }), 'errors': vm('errors', () => { - const a = ai(); - if (!a || !a._errorLog || a._errorLog.length === 0) return '(empty)'; - return a._errorLog.map((e, i) => `[${i}] ${JSON.stringify(e)}`).join('\n'); + const d = ds(); + if (!d || !d._errorDB || Object.keys(d._errorDB.errors).length === 0) return '(empty)'; + return Object.entries(d._errorDB.errors) + .sort((a, b) => b[1].lastSeen - a[1].lastSeen) + .map(([hash, e]) => `[${hash}] ${e.type}/${e.severity} ×${e.count}: ${e.message.substring(0, 100)}`) + .join('\n'); }), 'commands': vm('commands', () => { const a = ai(); |