Skip to content

Lab/main dev#2

Merged
LuisFX merged 14 commits into
lab/main-dev-rc1from
lab/main-dev
Sep 5, 2025
Merged

Lab/main dev#2
LuisFX merged 14 commits into
lab/main-dev-rc1from
lab/main-dev

Conversation

@LuisFX

@LuisFX LuisFX commented Sep 5, 2025

Copy link
Copy Markdown
Owner

PR with complete voice/realtime provider and example app.

LuisFX added 14 commits August 29, 2025 15:55
…ations

This commit adds complete integration of OpenAI's Realtime API (WebRTC-based voice) with CopilotKit, enabling developers to build voice-enabled AI applications with ultra-low latency.

Key Changes:
- Add useRealtimeChat hook for WebRTC voice communication
- Implement bidirectional message bridging between Realtime and CopilotKit
- Create complete voice-enabled form filling example application
- Add comprehensive documentation and technical guides

Technical Highlights:
- Fixed critical event name issue (conversation.item.input_audio_transcription.completed)
- Enabled whisper-1 transcription configuration for user voice messages
- Corrected parameter naming to snake_case (prefix_padding_ms, silence_duration_ms)
- Implemented proper tool registration with type: "function" requirement
- Added message deduplication to prevent UI duplicates
- Created automated clean rebuild script for development

The integration enables any CopilotKit application to add voice capabilities with minimal code changes, opening up new possibilities for accessible and natural AI interactions.
…oice actions

- Replaced the use of useCopilotContext and useCopilotChatInternal with useRealtimeActionHandler.
- Simplified the handling of the "confirmIncidentReport" action by leveraging the new voice action execution method.
- Updated the example to focus on medical intake, including changes to the form fields and voice commands.
- Renamed components and adjusted prompts to reflect the medical context.
- Added new fields for patient information, symptoms, and medical history.
- Enhanced the README files to provide clearer instructions for the medical intake process.
- Introduced a new pnpm lock file for dependency management.
- Introduced a new action, `scheduleAppointment`, allowing users to schedule medical appointments with editable fields for date, time, type, and provider.
- Enhanced the `IncidentReportForm` component to include an interactive appointment editor for user input.
- Updated documentation to reflect the new scheduling capabilities and parameters for the appointment action.
- Removed the `realtimeMode` property from `CopilotKitProps`, `CopilotContextParams`, and related hooks, simplifying the API.
- Updated message handling to include voice metadata for better context in user and assistant messages.
- Introduced a new `executeAction` method in `useRealtimeActionHandler` to handle actions triggered by voice, with source context.
- Enhanced the `RenderMessage` component to display voice indicators and handle voice metadata appropriately.
- Deleted obsolete `RealtimeActionExecutionMessage` and `VoiceTranscriptMessage` types to streamline message types.
- Eliminated the `realtimeMode` property from the `CopilotKit` component, streamlining the layout and simplifying the API for users.
- Introduced detailed logging for message updates and context changes in the CopilotMessages component to improve debugging and traceability.
- Updated the useRealtimeActionHandler to manage message order and delays for voice actions, ensuring proper handling of user transcripts.
- Refactored message rendering to include a unified source indicator for both voice and text messages, enhancing user experience and clarity.
- Improved the useRealtimeChat hook to track message creation order and manage pending user transcripts effectively.
…nscript management

- Enhanced the useRealtimeActionHandler to include callId metadata for better tracking of actions.
- Updated message handling for voice interactions to ensure proper ordering and processing of user transcripts.
- Introduced a mechanism to track pending user transcripts in useRealtimeChat, improving message reliability.
- Refactored argument handling in action execution to clean up unnecessary data before processing.
… transcript management

- Refined the useRealtimeChat hook to buffer assistant responses until user transcripts arrive, ensuring proper message ordering.
- Implemented a mechanism to track pending assistant messages, enhancing reliability in voice interactions.
- Updated message rendering to streamline the display of voice and text messages, removing unnecessary source indicators for clarity.
- Enhanced logging for message flow and processing, aiding in debugging and traceability of voice interactions.
- Added a loading state for the "connecting" status to improve user feedback during connection attempts.
- Introduced an error state with a "Reconnect" button for better handling of connection issues.
- Updated the "End Call" button styling for improved visibility and user experience.
@coderabbitai

coderabbitai Bot commented Sep 5, 2025

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch lab/main-dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@LuisFX
LuisFX merged commit 188593d into lab/main-dev-rc1 Sep 5, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant