Skip to content
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

chat improvements #17

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

colin-codegen[bot]
Copy link
Contributor

@colin-codegen colin-codegen bot commented Aug 15, 2023

The proposed approach offers substantial improvements in terms of modularity and readability. It intends to split the main Chat component into several smaller functional parts. It starts by moving the API call functions getAgentReply and clearChatHistory to a new file named src/hooks/chatApi.ts. Additionally, the useMutation calls are moved to chatApi.ts too. Furthermore, the state management of messages, user inputs, along with handleScroll and submit functionality are moved into a new hook src/hooks/useMessages.ts. Lastly, the smaller components UserMessage and BotMessage are each moved to new separate files.

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