Reitityksen tilatieto UI:ssa: task_routed-viestit terminaaliin ja codelab-latausindikaattoriin
Näyttää "Reititetty solmulle #N" tai "Kaikki N solmua varattuja — odotetaan..." sekä agents-terminaalissa että koodilaboratorion lataustekstissä. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2199,6 +2199,34 @@
|
|||||||
targetBox.scrollTop = targetBox.scrollHeight;
|
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") {
|
} else if (data.type === "llm_prompt") {
|
||||||
if (data.task_id) {
|
if (data.task_id) {
|
||||||
const term = document.getElementById('agent-terminal');
|
const term = document.getElementById('agent-terminal');
|
||||||
|
|||||||
Reference in New Issue
Block a user