diff --git a/network-poc/static/index.html b/network-poc/static/index.html index 052f5b7..2e93435 100644 --- a/network-poc/static/index.html +++ b/network-poc/static/index.html @@ -1788,8 +1788,15 @@ const tokGen = data.tokens_generated || 0; termLog(` ✓ ${data.model || model} (${tokGen} tok)`); if (!silent) { - const highlighted = highlightCode(response).replace(/\n/g, '\n '); - termLog(`
${highlighted}`);
+ // Kompakti yksirivinen esikatselu — klikkaa/hover laajentaa
+ const firstLine = response.split('\n').find(l => l.trim()) || response;
+ const lineCount = response.split('\n').filter(l => l.trim()).length;
+ const preview = esc(firstLine.trim());
+ const fullHighlighted = highlightCode(response).replace(/\n/g, '\n ');
+ const uid = 'code-' + Date.now();
+ termLog(` `
+ + `▶ ${preview} ${lineCount > 1 ? `(+${lineCount - 1} riviä)` : ''}`
+ + ``);
}
return response;
} catch (e) {