diff --git a/gui/static/js/app.js b/gui/static/js/app.js index bf0b316559f..331d61e0180 100644 --- a/gui/static/js/app.js +++ b/gui/static/js/app.js @@ -274,8 +274,16 @@ async function loadProviders() { const setIfPresent = (id, val) => { const el = document.getElementById(id); if (!el || !val) return; - const has = Array.from(el.options).some(o => o.value === val); - if (has) el.value = val; + // + URL of your local Ollama instance ` : ""} @@ -654,6 +666,7 @@ function setUiRunning(isRunning) { dot.className = "status-dot running"; txt.textContent = "RUNNING"; startTime = Date.now(); + window.startTime = startTime; // v2 timer override reads window.startTime timerInterval = setInterval(updateTimer, 1000); } else { runBtn.style.display = "inline-flex"; @@ -694,7 +707,10 @@ function resetUiForNewRun() { document.getElementById("stat-llm").textContent = "LLM 0"; document.getElementById("stat-tools").textContent = "TOOLS 0"; document.getElementById("stat-tokens").textContent = "TOKENS 0\u2191 0\u2193"; - document.getElementById("report-preview-card").style.display = "none"; + // v2 template removed the preview-card wrapper; guard so the reset + // below still runs (unguarded, this line killed the whole function). + const _rpc = document.getElementById("report-preview-card"); + if (_rpc) _rpc.style.display = "none"; currentReportSections = {}; analysisStats = { llm_calls: 0, tool_calls: 0, tokens_in: 0, tokens_out: 0 }; @@ -862,7 +878,7 @@ function handleChunkData(state) { function renderReportPreview() { const card = document.getElementById("report-preview-card"); - card.style.display = "block"; + if (card) card.style.display = "block"; const tabsContainer = document.getElementById("report-tabs"); tabsContainer.innerHTML = "";