-
Notifications
You must be signed in to change notification settings - Fork 704
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Motivation and Context <!-- Thank you for your contribution to the copilot-chat 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. --> This PR enables chat deletion. For V1, any user is able to delete any chat they're a part of. This will delete the chat for all participants, including Chat Copilot, as well as all related resources (memories, messages, etc.). ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> When a chat is deleted, - It will be immediately removed for the user who initiated the deletion. <img width="1234" alt="Screenshot 2023-08-16 at 5 54 46 PM" src="https://github.com/microsoft/chat-copilot/assets/125500434/7fb8a2e7-c70f-44e2-9e35-91bbe9e3f810"> - If the chat was a multi-user chat, the chat will be disabled in current session. This allows other participants to save any resources before the chat is wiped out. On refresh, chat is removed from list. <img width="1680" alt="Screenshot 2023-08-16 at 5 54 35 PM" src="https://github.com/microsoft/chat-copilot/assets/125500434/5ac2c7d3-f11a-4575-8d8a-5fe2bdb5aba7"> <img width="429" alt="Screenshot 2023-08-16 at 5 54 58 PM" src="https://github.com/microsoft/chat-copilot/assets/125500434/f1bedd1a-7801-406a-8263-2965f67e5a39"> - If the chat was the last chat in the user's current session, a new chat will automatically be created to populate the chat list. ### 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/copilot-chat/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/copilot-chat/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
1 parent
aa2d078
commit c0012fa
Showing
24 changed files
with
405 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export const COPY = { | ||
STEPWISE_RESULT_NOT_FOUND_REGEX: /(Result not found, review _stepsTaken to see what happened\.)\s+(\[{.*}])/g, | ||
CHAT_DELETED_MESSAGE: (chatName?: string) => | ||
`Chat ${ | ||
chatName ? `{${chatName}} ` : '' | ||
}has been removed by another user. You can still access the latest chat history for now. All chat content will be cleared once you refresh or exit the application.`, | ||
REFRESH_APP_ADVISORY: 'Please refresh the page to ensure you have the latest data.', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.