Skip to content

Refactor and Enhancements to Chat Components #73

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

Merged
merged 11 commits into from
Jul 9, 2024

Conversation

guillermoscript
Copy link
Owner

This pull request includes several refactorings and enhancements to the chat components in the codebase. The changes improve the functionality, layout, and user experience of the chat feature.

The specific changes include:

  • Changing the role from 'system' to 'assistant' in the TaksMessages component.

  • Fixing a typo in the ExamPrepChat component.

  • Improving the layout and removing unused code in the loading components.

  • Updating the ExamnSuggestions component to use the correct interface name, ExamSuggestion, instead of ExamnSuggestion.

  • Fixing a typo in the CommentsCard component.

  • Updating the ChatWindow and ChatInput components in the Common/chat directory to enhance functionality and user experience.

  • Fixing a typo in the CommentsSections component.

  • Updating the layout of the FreeChatPage component in the app/dashboard/student/chat/[chatId]/free-chat directory.

  • Updating the layout of the chat page for better user experience.

  • Adding a temperature property to the POST function in the chat/student/route.ts file to control the randomness of AI-generated responses.

  • Updating the FreeChatPage component layout to ensure it fills the entire viewport on all screen sizes.

  • Updating the layout of the chat page in the app/dashboard/student/chat/[chatId]/layout.tsx file to improve visual appearance and spacing.

  • Adding a temperature property with a value of 0.5 to the POST function in the chat/student/route.ts file to enhance the functionality of the chat system.

  • Updating the ExamnSuggestions component to use the correct interface name, ExamSuggestion, instead of ExamnSuggestion.

These changes enhance the functionality, layout, and user experience of the chat feature in the application.

…mponent

I will go back to this to use AI streaming components from vercel
refactor: Update ExamnSuggestions component to use ExamSuggestion interface

This commit updates the ExamnSuggestions component to use the correct interface name, ExamSuggestion, instead of ExamnSuggestion. This ensures consistency and clarity in the codebase. The component now correctly references the ExamSuggestion interface for the suggestions prop.
This commit updates the ChatWindow and ChatInput components in the Common/chat directory.

In ChatWindow:
- Added a check to skip rendering the first message in the messages array.
- Adjusted the padding values for different screen sizes.

In ChatInput:
- Added two template buttons for generating exam forms and asking for suggestions.
- Updated the form submission logic to handle the template buttons.
- Added a new prop, isTemplatePresent, to conditionally render the template buttons.

These changes enhance the functionality and user experience of the chat feature in the application.
This commit updates the layout of the FreeChatPage component in the app/dashboard/student/chat/[chatId]/free-chat directory. The changes include adjusting the height calculation for the chat container to ensure it fills the entire viewport on all screen sizes. This improvement enhances the user experience by providing a consistent and visually appealing chat interface.
This commit updates the layout of the chat page in the app/dashboard/student/chat/[chatId]/layout.tsx file. The changes include adjusting the padding values and container size to improve the visual appearance and spacing of the chat interface. These updates enhance the user experience by providing a more visually appealing and user-friendly chat layout.
…oute.ts

This commit adds a temperature property with a value of 0.5 to the POST function in the chat/student/route.ts file. The temperature property is used to control the randomness of the AI-generated responses in the chat feature. This addition enhances the functionality of the chat system by allowing for more controlled and predictable AI responses.
Copy link

vercel bot commented Jul 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lms-front ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 9, 2024 2:58am

@guillermoscript guillermoscript merged commit b58768c into master Jul 9, 2024
2 of 3 checks passed
@guillermoscript guillermoscript deleted the Minor-fix-for-some-issues branch July 9, 2024 02:59
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