From fc95cf8c1bd42f5312873facadc6ce70d93b4c54 Mon Sep 17 00:00:00 2001 From: jaakko Date: Mon, 6 Apr 2026 19:31:25 +0300 Subject: [PATCH] Terminaaliin varoitus inferenssin aikana + yield ennen blokkia MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Käyttäjälle näytetään '(selain voi hidastua)' kun inferenssi alkaa. setTimeout yield varmistaa statusrivin piirtämisen ennen WASM-blokkia. Co-Authored-By: Claude Opus 4.6 (1M context) --- network-poc/static/index.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/network-poc/static/index.html b/network-poc/static/index.html index cfeb178..40bef5c 100644 --- a/network-poc/static/index.html +++ b/network-poc/static/index.html @@ -1773,9 +1773,11 @@ const statusDiv = document.createElement('div'); statusDiv.className = 'terminal-line'; statusDiv.id = 'status-' + taskId; - statusDiv.innerHTML = ` ${model} käsittelee...`; + statusDiv.innerHTML = ` ${model} käsittelee... (selain voi hidastua)`; termPanel.appendChild(statusDiv); termPanel.scrollTop = termPanel.scrollHeight; + // Yield jotta status-rivi ehditään piirtää ennen mahdollista blokkia + await new Promise(r => setTimeout(r, 50)); try { const agent = Object.values(agentPrompts).find(a => a.model === model);