Fixes audio visualizer color issues (#19)

This commit is contained in:
mattherzog 2024-01-21 15:05:35 -08:00 committed by GitHub
parent 0acc27e406
commit 2ec251c93c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -72,11 +72,11 @@ export const AgentMultibandAudioVisualizer = ({
{summedFrequencies.map((frequency, index) => { {summedFrequencies.map((frequency, index) => {
const isCenter = index === Math.floor(summedFrequencies.length / 2); const isCenter = index === Math.floor(summedFrequencies.length / 2);
let color = accentColor; let color = `${accentColor}-${accentShade}`;
let shadow = `shadow-lg-${accentColor}`; let shadow = `shadow-lg-${accentColor}`;
let transform; let transform;
if (state === "listening") { if (state === "listening" || state === "idle") {
color = isCenter ? `${accentColor}-${accentShade}` : "gray-950"; color = isCenter ? `${accentColor}-${accentShade}` : "gray-950";
shadow = !isCenter ? "" : shadow; shadow = !isCenter ? "" : shadow;
transform = !isCenter ? "scale(1.0)" : "scale(1.2)"; transform = !isCenter ? "scale(1.0)" : "scale(1.2)";

View File

@ -16,6 +16,7 @@ export interface TokenResult {
} }
export type AgentState = export type AgentState =
| "idle"
| "listening" | "listening"
| "speaking" | "speaking"
| "thinking" | "thinking"