Merged
Conversation
Member
koenmatt
commented
Feb 4, 2026
- Added voice and a bunch of styling and config options
Member
Author
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
|
| }; | ||
|
|
||
| initScene(); | ||
| }, [getAmplitude]); |
There was a problem hiding this comment.
getAmplitude dependency is unnecessary since it has no dependencies and is stable
Suggested change
| }, [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.
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.
Comment on lines
+139
to
+140
| 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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.