Agenttiavatarit palautettu: AgentBar-komponentti viidellä roolilla

Manageri (pöllö), Koodari (kameleontti), Testaaja (rukoilijasirkka),
QA (kilpikonna), Data (norsu). Klikattavat, highlight aktiiviselle.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jaakko Vanhala
2026-04-09 20:53:35 +03:00
parent 1c7362c9b0
commit 3497f66db7
31 changed files with 79 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ import StatusBar from "../components/StatusBar.astro";
import Terminal from "../components/Terminal.astro";
import Editor from "../components/Editor.astro";
import Guide from "../components/Guide.astro";
import AgentBar from "../components/AgentBar.astro";
---
<!DOCTYPE html>
<html lang="fi">
@@ -33,6 +34,7 @@ import Guide from "../components/Guide.astro";
<!-- Agents-paneeli -->
<div id="panel-agents" class="panel active">
<AgentBar />
<StatusBar />
<Terminal />
</div>
@@ -66,6 +68,12 @@ import Guide from "../components/Guide.astro";
const initHash = window.location.hash.replace('#','');
if (['editor','guide'].includes(initHash)) switchTab(initHash);
// === Agent selection ===
window.selectAgent = function(agent) {
document.querySelectorAll('.agent-avatar').forEach(el => el.classList.remove('active'));
document.querySelector(`.agent-avatar[data-agent="${agent}"]`)?.classList.add('active');
};
// === WebSocket ===
const wsUrl = `${location.protocol === 'https:' ? 'wss:' : 'ws:'}//${location.host}/ws`;
const uiSocket = new WebSocket(wsUrl);