This commit is contained in:
kacper 2026-03-06 00:23:16 -05:00
parent 3816a9627e
commit 6acf267d48
2 changed files with 2 additions and 18 deletions

2
app.py
View file

@ -5,7 +5,7 @@ from pathlib import Path
from typing import Any, Awaitable, Callable from typing import Any, Awaitable, Callable
from fastapi import FastAPI, WebSocket, WebSocketDisconnect from fastapi import FastAPI, WebSocket, WebSocketDisconnect
from fastapi.responses import FileResponse, HTMLResponse, JSONResponse from fastapi.responses import HTMLResponse, JSONResponse
from fastapi.staticfiles import StaticFiles from fastapi.staticfiles import StaticFiles
from supertonic_gateway import SuperTonicGateway from supertonic_gateway import SuperTonicGateway

View file

@ -128,9 +128,6 @@
display: block; display: block;
pointer-events: auto; pointer-events: auto;
} }
#agentIndicator .label {
display: none;
}
#agentIndicator.idle { #agentIndicator.idle {
color: #6b3a28; color: #6b3a28;
} }
@ -389,8 +386,7 @@
<div id="log"><div id="log-inner"></div></div> <div id="log"><div id="log-inner"></div></div>
<div id="agentIndicator" data-ptt="1"> <div id="agentIndicator" data-ptt="1">
<div id="agentViz" data-ptt="1"></div> <div id="agentViz" data-ptt="1"></div>
<span class="label"></span> </div>
</div>
<div id="voiceStatus"></div> <div id="voiceStatus"></div>
<div id="toast-container"></div> <div id="toast-container"></div>
<audio id="remoteAudio" autoplay playsinline hidden></audio> <audio id="remoteAudio" autoplay playsinline hidden></audio>
@ -403,7 +399,6 @@
const remoteAudio = document.getElementById("remoteAudio"); const remoteAudio = document.getElementById("remoteAudio");
const agentIndicator = document.getElementById("agentIndicator"); const agentIndicator = document.getElementById("agentIndicator");
const agentVizEl = document.getElementById("agentViz"); const agentVizEl = document.getElementById("agentViz");
const agentLabel = agentIndicator.querySelector(".label");
const resetSessionBtn = document.getElementById("resetSessionBtn"); const resetSessionBtn = document.getElementById("resetSessionBtn");
const toastContainer = document.getElementById("toast-container"); const toastContainer = document.getElementById("toast-container");
@ -527,12 +522,6 @@
// --- Agent state indicator --- // --- Agent state indicator ---
const STATES = { idle: "idle", listening: "listening", thinking: "thinking", speaking: "speaking" }; const STATES = { idle: "idle", listening: "listening", thinking: "thinking", speaking: "speaking" };
const STATE_COLORS = {
[STATES.idle]: 0xfff5eb,
[STATES.listening]: 0xfff5eb,
[STATES.thinking]: 0xfff5eb,
[STATES.speaking]: 0xfff5eb,
};
let agentState = STATES.idle; let agentState = STATES.idle;
let agentVisualizer = null; let agentVisualizer = null;
let lastRemoteAudioActivityS = 0; let lastRemoteAudioActivityS = 0;
@ -541,7 +530,6 @@
agentState = state; agentState = state;
agentIndicator.classList.remove("listening", "thinking", "speaking", "idle"); agentIndicator.classList.remove("listening", "thinking", "speaking", "idle");
agentIndicator.classList.add("visible", state); agentIndicator.classList.add("visible", state);
agentLabel.textContent = state === STATES.idle ? "" : state;
if (agentVisualizer) agentVisualizer.setState(state); if (agentVisualizer) agentVisualizer.setState(state);
}; };
@ -700,8 +688,6 @@
const CARD_IDLE_RGB = [212, 85, 63]; // #d4553f — connected idle coral const CARD_IDLE_RGB = [212, 85, 63]; // #d4553f — connected idle coral
const CARD_LISTEN_RGB = [120, 40, 28]; // #782c1c — PTT active dark coral const CARD_LISTEN_RGB = [120, 40, 28]; // #782c1c — PTT active dark coral
const setStateColor = (_state) => { /* no-op: MeshBasicMaterial, colour is fixed */ };
let prevCardRGB = ""; let prevCardRGB = "";
let targetConnected = 0.0; let targetConnected = 0.0;
let isConnecting = false; let isConnecting = false;
@ -819,7 +805,6 @@
requestAnimationFrame(renderFrame); requestAnimationFrame(renderFrame);
}; };
setStateColor(currentState);
requestAnimationFrame(renderFrame); requestAnimationFrame(renderFrame);
return { return {
@ -829,7 +814,6 @@
setState: (state) => { setState: (state) => {
if (!STATES[state]) return; if (!STATES[state]) return;
currentState = state; currentState = state;
setStateColor(state);
}, },
setConnected: (connected) => { setConnected: (connected) => {
targetConnected = connected ? 1.0 : 0.0; targetConnected = connected ? 1.0 : 0.0;