-
Notifications
You must be signed in to change notification settings - Fork 0
Matt/bra2 1100 embed #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
koenmatt
commented
Feb 4, 2026
- Added voice and a bunch of styling and config options
Greptile OverviewGreptile SummaryThis PR adds voice mode functionality with real-time audio visualization and numerous configuration options for the chat widget. Key Changes:
Areas to Note:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant ChatWidget
participant ChatContainer
participant VoiceMode
participant LiveKit
participant MessageInput
participant useChat
User->>ChatWidget: Opens widget
ChatWidget->>useChat: Initialize session
alt Auto-open enabled
ChatWidget->>useChat: sendTriggerMessage()
useChat->>API: Send empty message
API-->>useChat: Welcome response
end
User->>MessageInput: Clicks audio button
MessageInput->>ChatContainer: handleVoiceClick()
ChatContainer->>VoiceMode: Mount VoiceMode
VoiceMode->>VoiceMode: Load Three.js & GSAP from CDN
VoiceMode->>VoiceMode: Initialize particle visualization
User->>VoiceMode: Tap orb to connect
VoiceMode->>LiveKit: POST tokenUrl (with agentName)
LiveKit-->>VoiceMode: Return token & server URL
VoiceMode->>LiveKit: Connect to room
VoiceMode->>VoiceMode: Enable microphone
LiveKit-->>VoiceMode: Remote audio track
VoiceMode->>VoiceMode: Setup audio analysers
VoiceMode->>VoiceMode: Animate particles with audio
User->>VoiceMode: Tap orb to end call
VoiceMode->>LiveKit: Disconnect
VoiceMode->>ChatContainer: onClose()
ChatContainer->>ChatWidget: Return to chat view
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 files reviewed, 3 comments
| }; | ||
|
|
||
| initScene(); | ||
| }, [getAmplitude]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getAmplitude dependency is unnecessary since it has no dependencies and is stable
| }, [getAmplitude]); | |
| }, []); |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/components/VoiceMode/VoiceMode.tsx
Line: 408:408
Comment:
`getAmplitude` dependency is unnecessary since it has no dependencies and is stable
```suggestion
}, []);
```
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.| tokenUrl: string; | ||
| agentName?: string; | ||
| onClose: () => void; | ||
| accentColor?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
accentColor prop is defined but never used in the component
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/components/VoiceMode/VoiceMode.tsx
Line: 16:16
Comment:
`accentColor` prop is defined but never used in the component
How can I resolve this? If you propose a fix, please make it concise.| await loadScript('https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js'); | ||
| await loadScript('https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/gsap.min.js'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Loading external scripts from CDN at runtime creates security risk (no SRI) and performance issues. Consider bundling Three.js and GSAP as dependencies
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/components/VoiceMode/VoiceMode.tsx
Line: 139:140
Comment:
Loading external scripts from CDN at runtime creates security risk (no SRI) and performance issues. Consider bundling Three.js and GSAP as dependencies
How can I resolve this? If you propose a fix, please make it concise.