blob: 29959439d5863ed66dfe122937580ca6922048aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
import { ui } from './ui.js';
import { results } from './components/results.js';
async function init() {
console.log('Initializing AI Reasoning Dashboard...');
// Global utility for filters
window.toggleFilter = (type, state) => {
document.querySelectorAll(`input[name="filter-${type}"]`).forEach(cb => cb.checked = state);
};
await results.init();
// Init UI behaviors
ui.initTabs((tabId) => {
// We could lazy load data here, but for now everything triggers on file/filter change
});
}
function start() {
init().catch(err => {
console.error("Initialization error:", err);
alert(`Dashboard Failed to Load: ${err.message}`);
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', start);
} else {
start();
}
|