-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/chat widget #2
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Pull Request Overview
This PR implements a comprehensive AI-powered chat widget feature with Discord integration for lead tracking. The implementation includes real-time chat functionality using Vercel's AI SDK, session persistence via localStorage, and automated Discord thread logging for conversation monitoring.
Key changes:
- Added AI chat widget with streaming responses and Discord logging
- Implemented comprehensive test coverage with Vitest
- Enhanced development workflow with Husky pre-commit hooks
Reviewed Changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| vitest.setup.ts | Global test setup with mocked fetch to prevent real API calls |
| vitest.config.ts | Vitest configuration for React testing with happy-dom |
| package.json | Added AI SDK, testing libraries, and development tooling dependencies |
| lib/prompts/chat-system-prompt.ts | System prompt defining AI assistant personality and behavior |
| eslint.config.mjs | Enhanced ESLint rules for unused variables and test coverage |
| components/services/ServicesNavigation.tsx | Added ESLint disable comments for intentional state initialization |
| components/homepage/FinalCallToAction.tsx | Updated CTA link from email to contact page |
| components/common/ThemeProvider.tsx | Added ESLint disable comments for synchronous state initialization |
| components/common/SiteFooter.tsx | Converted logo to chat trigger button |
| components/common/ResponsiveHeader.tsx | Added chat toggle, notification badge, and close button to header |
| components/chat/ChatWidget.tsx | Main chat widget with AI integration and Discord logging |
| components/chat/ChatWidget.test.tsx | Comprehensive test suite for chat widget functionality |
| components/chat/ChatContext.tsx | React context for chat state management |
| app/layout.tsx | Integrated ChatProvider and ChatWidget into root layout |
| app/api/discord/thread/route.ts | API endpoint for creating Discord threads |
| app/api/discord/message/route.ts | API endpoint for logging messages to Discord |
| app/api/chat/route.ts | AI chat API using Vercel AI Gateway |
| app/about/page.tsx | Minor heading text update |
| README.md | Updated environment variables documentation |
| .husky/pre-commit | Added pre-commit hook for linting |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.