From 6f14614af8299d151229cc33f2b9fdb13ac74ed6 Mon Sep 17 00:00:00 2001 From: Jaakko Vanhala Date: Sun, 5 Apr 2026 09:28:24 +0300 Subject: [PATCH] =?UTF-8?q?Syntaksikorostus=20agents-terminaalin=20ja=20ne?= =?UTF-8?q?twork-n=C3=A4kym=C3=A4n=20LLM-vastauksiin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Highlight.js:n automaattinen kielentunnistus nyt myös agents-terminaalin koodivastauksissa ja network-näkymän chatBoxissa (aiemmin vain codelabissa). Co-Authored-By: Claude Opus 4.6 (1M context) --- network-poc/static/index.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/network-poc/static/index.html b/network-poc/static/index.html index 41dedfa..a9dd0a5 100644 --- a/network-poc/static/index.html +++ b/network-poc/static/index.html @@ -1765,7 +1765,8 @@ const tokGen = data.tokens_generated || 0; termLog(` ${data.model || model} (${tokGen} tok)`); if (!silent) { - termLog(` ${esc(response).replace(/\n/g,'\n ')}`, '#c9d1d9'); + const highlighted = highlightCode(response).replace(/\n/g, '\n '); + termLog(`
${highlighted}
`); } return response; } catch (e) { @@ -2116,7 +2117,7 @@ Prompt: "${esc(stripSystemPrompt(data.prompt))}"
- ${data.response ? esc(data.response) : 'tyhjä vastaus'} + ${data.response ? highlightCode(data.response) : 'tyhjä vastaus'}
${tokGen} tokenia generoitu | malli ladattu: ${typeof loadMs === 'number' ? loadMs.toFixed(0) : loadMs}ms