cd "c:\Users\HARJOT SINGH\Desktop\NLP\LiveWire\server"npm installCopy-Item .env.example .env- Visit: https://aistudio.google.com/app/apikey
- Click "Create API Key"
- Copy the key
Open .env and add your key:
PORT=3000
GEMINI_API_KEY=your_actual_key_herenpm run devYou should see:
✅ AI Service initialized successfully
Listening on port 3000
cd "c:\Users\HARJOT SINGH\Desktop\NLP\LiveWire\client"npm installnpm run dev- Open browser to: http://localhost:5173 (or the port shown)
- Create or join a room
- Enter with a username
- Look at the sidebar (left side on desktop, bottom on mobile)
- Click the ✨ (sparkles) icon for "AI Assistant"
- AI panel will open
Try these example queries:
Simple Question:
What is this project about?
Code Analysis (with a file open):
Explain what this code does
Code Modification:
Add error handling to this function
Code Generation:
Create a function that validates email addresses
- Open any file in the editor
- Ask AI: "Add comments to explain this code"
- Wait for response
- You should see a code suggestion box with:
- 💡 Code Suggestion badge
- Explanation
- Accept (green) / Reject (red) buttons
- Click expand to see original vs suggested code
- Click "Accept" to apply the changes
- Go to the same room URL
- Join with different username
- Ask AI a question in AI view
- Accept a code suggestion
- You should see:
- AI responses appear in real-time
- Code changes when accepted
- Typing indicator when AI is processing
When you ask a question, the AI automatically has access to:
✅ Current File: The file you're currently editing ✅ File Structure: Your entire project tree ✅ Drawings: Any diagrams created in drawing mode ✅ Chat History: Recent messages from the team chat
- Check that
GEMINI_API_KEYis set in.env - Verify the API key is correct
- Make sure you copied
.env.exampleto.env
- Restart the server
- Check server console for errors
- Verify Gemini API key is valid
- Check internet connection
- Look at browser console (F12) for errors
- Check server logs for errors
- Make sure query is not empty
- Make sure you have a file open
- Check that you're in the correct room
- Verify file permissions
- Server starts without errors
- "AI Service initialized successfully" message appears
- Client connects to server
- Can create/join a room
- AI icon visible in sidebar
- Can open AI assistant
- Can send queries to AI
- AI responds with answers
- Typing indicator shows while processing
- Code suggestions appear when appropriate
- Can expand code suggestion to see diff
- Can accept code suggestions
- Code updates in editor when accepted
- Can reject code suggestions
- Other users see AI responses (test with 2 browsers)
- Other users see code changes when accepted
-
Code Explanation
- Open any file
- Ask: "Explain this code in detail"
-
Bug Finding
- Ask: "Find bugs in this code"
-
Refactoring
- Ask: "Refactor this to use modern syntax"
-
Documentation
- Ask: "Add JSDoc comments to all functions"
-
Optimization
- Ask: "How can I make this code faster?"
-
Type Safety
- Ask: "Add TypeScript types to this file"
- Explore the AI_README.md for detailed documentation
- Try different types of queries
- Test with your team in real collaboration
- Experiment with complex code modifications
- Try asking about drawings after creating diagrams
- Be specific in your queries for better results
- Always review AI suggestions before accepting
- Use the expand button to compare original vs suggested code
- AI remembers context from chat and drawings
- Multiple team members can review suggestions together
Happy Coding with AI! 🎉