diff --git a/network-poc/static/index.html b/network-poc/static/index.html
index fd8b0e2..41dedfa 100644
--- a/network-poc/static/index.html
+++ b/network-poc/static/index.html
@@ -2199,6 +2199,34 @@
targetBox.scrollTop = targetBox.scrollHeight;
}
}
+ } else if (data.type === "task_routed") {
+ const term = document.getElementById('agent-terminal');
+ const isQueued = data.status === 'queued';
+ const color = isQueued ? '#d29922' : '#58a6ff';
+ const icon = isQueued ? '⏳' : '→';
+ const msg = esc(data.message || '');
+
+ // Agents-terminaali
+ if (term && data.task_id && activeStreams[data.task_id]) {
+ const div = document.createElement('div');
+ div.className = 'terminal-line';
+ div.style.color = color;
+ div.innerHTML = ` ${icon} ${msg}`;
+ if (isQueued) div.id = 'routing-' + data.task_id;
+ // Päivitetään olemassaoleva jonorivi jos löytyy
+ const existing = document.getElementById('routing-' + data.task_id);
+ if (existing) { existing.innerHTML = ` ${icon} ${msg}`; existing.style.color = color; }
+ else term.appendChild(div);
+ term.scrollTop = term.scrollHeight;
+ }
+
+ // Codelab-loading-teksti
+ const codeLoading = document.getElementById('code-loading');
+ if (codeLoading && codeLoading.style.display !== 'none') {
+ codeLoading.textContent = isQueued
+ ? `⏳ ${msg}`
+ : `→ ${msg} — generoidaan...`;
+ }
} else if (data.type === "llm_prompt") {
if (data.task_id) {
const term = document.getElementById('agent-terminal');