Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/app/chat/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6102,6 +6102,7 @@ export default function ChatPage() {
: "absolute right-2 top-2 flex items-center gap-1"}
>
<button
type="button"
onClick={() => setVoicePickerOpen(true)}
title="Choose style"
aria-label="Choose style"
Expand All @@ -6112,6 +6113,7 @@ export default function ChatPage() {
<VoicePersonIcon className={agentOverlayMode === "immersive" ? undefined : "h-3.5 w-3.5"} />
</button>
<button
type="button"
onClick={() => setAgentOverlayMode(agentOverlayMode === "immersive" ? "transcript" : "immersive")}
title={agentOverlayMode === "immersive" ? "Return to chat" : "Enter fullscreen visual mode"}
aria-label={agentOverlayMode === "immersive" ? "Return to chat" : "Enter fullscreen visual mode"}
Expand Down
91 changes: 47 additions & 44 deletions src/components/chat/agent-visualizer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export function AgentVisualizer({
}: AgentVisualizerProps) {
const visualSettings = normalizeAgentVisualSettings(settings);
const styleId = visualSettings.styleId;
const isOrbitalStyle = styleId === "builtin:orbital-reactor";
const intensityScale = INTENSITY_SCALE[visualSettings.intensity ?? "balanced"];
const visualVars = {
"--voice-accent-rgb": activeRgb,
Expand Down Expand Up @@ -109,7 +110,7 @@ export function AgentVisualizer({
}}
/>

{styleId === "builtin:orbital-reactor" ? (
{isOrbitalStyle ? (
<OrbitalSharedRings compact={compact} immersive={immersive} />
) : null}

Expand All @@ -129,54 +130,56 @@ export function AgentVisualizer({
}}
/>

<div
className={`voice-agent-core relative flex items-center justify-center rounded-full border transition-all duration-300 ${coreClass} cursor-pointer`}
style={
state === "listening"
? {
borderColor: `rgba(${listeningRgb}, ${0.46 + visualVolume * 0.12})`,
background: `radial-gradient(circle, rgba(${listeningRgb}, 0.24), var(--voice-shell-bg-strong) 72%)`,
boxShadow: `0 0 ${22 + visualVolume * 18}px rgba(${listeningRgb}, ${0.18 + visualVolume * 0.16})`,
transform: `scale(${orbScale})`,
}
: state === "speaking"
{isOrbitalStyle ? (
<div
className={`voice-agent-core relative flex items-center justify-center rounded-full border transition-all duration-300 ${coreClass} cursor-pointer`}
style={
state === "listening"
? {
borderColor: `rgba(${speakingRgb}, 0.55)`,
background: `radial-gradient(circle, rgba(${speakingRgb},0.24), var(--voice-shell-bg-strong) 72%)`,
boxShadow:
`0 0 ${34 + motionLevel * 24}px rgba(${speakingRgb}, ${0.25 + motionLevel * 0.1}), 0 0 ${64 + motionLevel * 42}px rgba(${speakingRgb}, ${0.1 + motionLevel * 0.08})`,
borderColor: `rgba(${listeningRgb}, ${0.46 + visualVolume * 0.12})`,
background: `radial-gradient(circle, rgba(${listeningRgb}, 0.24), var(--voice-shell-bg-strong) 72%)`,
boxShadow: `0 0 ${22 + visualVolume * 18}px rgba(${listeningRgb}, ${0.18 + visualVolume * 0.16})`,
transform: `scale(${orbScale})`,
}
: state === "processing"
: state === "speaking"
? {
borderColor: `rgba(${processingRgb}, 0.45)`,
background: `radial-gradient(circle, rgba(${processingRgb},0.2), var(--voice-shell-bg-strong) 72%)`,
boxShadow: `0 0 20px rgba(${processingRgb}, 0.15)`,
}
: {
background: "radial-gradient(circle, color-mix(in srgb, var(--voice-shell-highlight) 90%, transparent), var(--voice-shell-bg-strong) 72%)",
borderColor: `rgba(${speakingRgb}, 0.55)`,
background: `radial-gradient(circle, rgba(${speakingRgb},0.24), var(--voice-shell-bg-strong) 72%)`,
boxShadow:
`0 0 ${34 + motionLevel * 24}px rgba(${speakingRgb}, ${0.25 + motionLevel * 0.1}), 0 0 ${64 + motionLevel * 42}px rgba(${speakingRgb}, ${0.1 + motionLevel * 0.08})`,
transform: `scale(${orbScale})`,
}
}
>
{styleId === "builtin:orbital-reactor" && (immersive || compact) ? (
<div className="voice-agent-orbital-core">
<div className="voice-agent-core-grid" />
<div className="voice-agent-core-lattice" />
<div className="voice-agent-core-pulse" />
<div className="voice-agent-core-highlight" />
</div>
) : (
<StateIcon
state={state}
compact={compact}
isRecording={isRecording}
listeningColor={listeningColor}
speakingColor={speakingColor}
listeningRgb={listeningRgb}
processingRgb={processingRgb}
/>
)}
</div>
: state === "processing"
? {
borderColor: `rgba(${processingRgb}, 0.45)`,
background: `radial-gradient(circle, rgba(${processingRgb},0.2), var(--voice-shell-bg-strong) 72%)`,
boxShadow: `0 0 20px rgba(${processingRgb}, 0.15)`,
}
: {
background: "radial-gradient(circle, color-mix(in srgb, var(--voice-shell-highlight) 90%, transparent), var(--voice-shell-bg-strong) 72%)",
}
}
>
{immersive || compact ? (
<div className="voice-agent-orbital-core">
<div className="voice-agent-core-grid" />
<div className="voice-agent-core-lattice" />
<div className="voice-agent-core-pulse" />
<div className="voice-agent-core-highlight" />
</div>
) : (
<StateIcon
state={state}
compact={compact}
isRecording={isRecording}
listeningColor={listeningColor}
speakingColor={speakingColor}
listeningRgb={listeningRgb}
processingRgb={processingRgb}
/>
)}
</div>
) : null}
</Wrapper>
);
}
Expand Down
Loading