-
Notifications
You must be signed in to change notification settings - Fork 428
generalized chat routes and vibe coding #771
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 Git ↗︎
|
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.
Greptile Summary
This PR implements a significant refactoring of the email template and theme management system, introducing AI-assisted capabilities through a generalized chat system. The changes include:
- Introduction of a new email template editor with live preview and AI assistance
- Generalization of chat functionality through an adapter-based architecture
- New vibe-coding components for consistent UI/UX across AI-assisted features
- Migration from role-based to content-based chat messages
- Enhanced email rendering system supporting both themes and templates
The changes represent a shift from specialized chat implementations to a more flexible, adapter-based system that can handle different types of AI-assisted content generation. The code demonstrates good separation of concerns, type safety, and proper error handling.
The database schema changes (removing ThreadMessageRole) and the new configuration system suggest a more dynamic approach to message handling and template management.
Confidence score: 4/5
- This PR is relatively safe to merge with proper testing of the new template editor
- The score reflects the well-structured changes and proper error handling, but complex UI changes warrant thorough testing
- Key files needing attention:
- apps/backend/src/app/api/latest/internal/ai-chat/[threadId]/route.tsx (AI chat implementation)
- apps/dashboard/src/components/vibe-coding/assistant-chat.tsx (Core chat UI)
- apps/backend/prisma/schema.prisma (Message role removal)
36 files reviewed, 11 comments
Edit PR Review Bot Settings | Greptile
...board/src/app/(main)/(protected)/projects/[projectId]/email-themes/[themeId]/page-client.tsx
Show resolved
Hide resolved
packages/template/src/lib/stack-app/apps/implementations/admin-app-impl.ts
Show resolved
Hide resolved
✨ No issues found! Your code is sparkling clean! ✨ 🗒️ View all ignored comments in this repo
Need help? Join our Discord for support! |
https://www.loom.com/share/acaea08979274fc194357a5359f0938a?sid=6b5a2ac0-1f87-4311-8b40-0c2e22cd965d
Important
This PR adds support for email templates, refactors chat handling, and updates UI components for enhanced email and chat functionalities.
theme_id
ortemplate_id
inrender-email/route.tsx
.ai-chat/[threadId]/route.tsx
for handling chat messages with context typesemail-theme
andemail-template
.email-templates/[templateId]/route.tsx
to update and retrieve email templates.emailTemplateAdapter
andemailThemeAdapter
inadapter-registry.ts
for chat context handling.renderEmailWithTemplate
inemail-themes.tsx
for rendering emails with templates.page-client.tsx
for email templates and themes to useVibeCodeLayout
withAssistantChat
andCodeEditor
.ThemePreview
component to handle email preview rendering with error boundaries.OPENAI_API_KEY
toSTACK_OPENAI_API_KEY
in.env.development
.chat-adapters.ts
to handle tool calls and chat message history.This description was created by
for df210b8. You can customize this summary. It will automatically update as commits are pushed.