Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move Chat component logic to separate file (microsoft#1000)
### Motivation and Context <!-- Thank you for your contribution to the chat-copilot repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> 1. Why is this change required? - This change is required to improve the modularity and readability. 2. What problem does it solve? - This change reduces the complexity of the app.tsx file by isolating the `<Chat />` component into its own file. 3. What scenario does it contribute to? - This contributes to scenarios where developers need to work on or debug the `<Chat/>` component independently of the main app logic. It also makes it easier for new developers to understand the structure of the application. 4. If it fixes an open issue, please link to the issue here. - Not applicable/This PR does not address a specific open issue. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> In this PR, I have created a new file named `Chat.tsx` and moved the relevant JSX and TypeScript code from app.tsx into this new component file. The main goals were to enhance modularity and readability. Here are some specifics: - File Creation: A new file Chat.tsx was created. - Code Migration: Logic specific to `<Chat />` was moved from app.tsx to the new file. - Testing: Ensured that the application behaves as expected after the component migration. No functionality has been altered, only restructured. - Imports/Exports: Updated import statements in app.tsx to reflect the change. ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [Contribution Guidelines](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄
- Loading branch information