From a0a0784e4e16683c428bafa7689ad3e5f4d9d1c0 Mon Sep 17 00:00:00 2001 From: Pavan Kumar Date: Fri, 2 Jan 2026 13:52:38 +0530 Subject: [PATCH 1/2] feat: Integrate Farm Vaidya voice assistant on home page --- VOICE_AGENT_INTEGRATION.md | 140 +++++++++++++ package-lock.json | 151 +++++++++++++- package.json | 9 +- public/Farm-vaidya-icon.png | Bin 0 -> 7553 bytes src/app/page.tsx | 7 + src/app/voice-agent.css | 72 +++++++ src/components/VoiceAgent.tsx | 367 ++++++++++++++++++++++++++++++++++ src/components/ui/button.tsx | 44 ++++ src/components/ui/card.tsx | 78 ++++++++ src/components/ui/toaster.tsx | 2 + src/components/ui/tooltip.tsx | 25 +++ src/hooks/use-toast.ts | 25 +++ src/lib/utils.ts | 6 + 13 files changed, 923 insertions(+), 3 deletions(-) create mode 100644 VOICE_AGENT_INTEGRATION.md create mode 100644 public/Farm-vaidya-icon.png create mode 100644 src/app/voice-agent.css create mode 100644 src/components/VoiceAgent.tsx create mode 100644 src/components/ui/button.tsx create mode 100644 src/components/ui/card.tsx create mode 100644 src/components/ui/toaster.tsx create mode 100644 src/components/ui/tooltip.tsx create mode 100644 src/hooks/use-toast.ts create mode 100644 src/lib/utils.ts diff --git a/VOICE_AGENT_INTEGRATION.md b/VOICE_AGENT_INTEGRATION.md new file mode 100644 index 0000000..992cc7b --- /dev/null +++ b/VOICE_AGENT_INTEGRATION.md @@ -0,0 +1,140 @@ +# Farm Vaidya Voice Agent - Integration Complete! ✅ + +## What's Been Added + +### 1. Files Copied +- ✅ `src/components/VoiceAgent.tsx` - Main voice agent component +- ✅ `src/components/ui/*` - UI components (button, card, tooltip, toaster) +- ✅ `src/hooks/use-toast.ts` - Toast notification hook +- ✅ `src/app/voice-agent.css` - CSS animations +- ✅ `public/Farm-vaidya-icon.png` - Voice agent icon + +### 2. Dependencies Installed +- ✅ @daily-co/daily-js (voice infrastructure) +- ✅ sonner (toast notifications) +- ✅ lucide-react (icons) +- ✅ clsx & tailwind-merge (styling utilities) + +### 3. Environment Variables Added +Check your `.env.local` - these were added: +``` +NEXT_PUBLIC_PIPECAT_TOKEN=pk_aff3af37-4821-4efc-9776-1f2d300a52d0 +NEXT_PUBLIC_PIPECAT_ENDPOINT=https://api.pipecat.daily.co/v1/public/techsprint/start +``` + +## How to Enable the Voice Agent + +### Option 1: Add to All Pages (Recommended) + +Edit `src/app/layout.tsx`: + +```tsx +import VoiceAgent from '@/components/VoiceAgent'; +import { Toaster } from 'sonner'; +import './voice-agent.css'; // Add this import + +export default function RootLayout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + + + + + <> +