Skip to content

chat improvements#17

Open
colin-codegen[bot] wants to merge 9 commits into
mainfrom
codegen/col-58-chat-improvements-ab83ebe1-ae53-4688-a634-3cf
Open

chat improvements#17
colin-codegen[bot] wants to merge 9 commits into
mainfrom
codegen/col-58-chat-improvements-ab83ebe1-ae53-4688-a634-3cf

Conversation

@colin-codegen

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

Copy link
Copy Markdown
Contributor

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