Skip to content

Delete Chat#193

Merged
teresaqhoang merged 19 commits intomicrosoft:mainfrom
teresaqhoang:delete-chat
Aug 22, 2023
Merged

Delete Chat#193
teresaqhoang merged 19 commits intomicrosoft:mainfrom
teresaqhoang:delete-chat

Conversation

@teresaqhoang
Copy link
Copy Markdown
Contributor

Motivation and Context

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

When a chat is deleted,

  • It will be immediately removed for the user who initiated the deletion.
Screenshot 2023-08-16 at 5 54 46 PM
  • 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.
Screenshot 2023-08-16 at 5 54 35 PM Screenshot 2023-08-16 at 5 54 58 PM
  • 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

@github-actions github-actions Bot added webapp Pull requests that update Typescript code webapi Pull requests that update .net code PR: ready for review labels Aug 16, 2023
@teresaqhoang teresaqhoang requested a review from a team August 16, 2023 21:58
@teresaqhoang teresaqhoang self-assigned this Aug 16, 2023
@teresaqhoang teresaqhoang added the enhancement New feature or request label Aug 16, 2023
Comment thread webapi/Controllers/ChatHistoryController.cs Outdated
Comment thread webapi/Controllers/ChatHistoryController.cs Outdated
Comment thread webapi/Controllers/ChatHistoryController.cs
Comment thread webapi/Models/Request/DeleteChatRequest.cs Outdated
Comment thread webapi/Controllers/ChatHistoryController.cs Outdated
Comment thread webapi/Controllers/ChatHistoryController.cs
Comment thread webapi/Controllers/ChatHistoryController.cs Outdated
@teresaqhoang teresaqhoang requested a review from alliscode August 18, 2023 17:20
Comment thread webapi/Controllers/ChatHistoryController.cs Outdated
Comment thread webapi/Controllers/ChatHistoryController.cs Outdated
Comment thread webapp/src/assets/strings.ts Outdated
Comment thread webapp/src/libs/hooks/useChat.ts
Comment thread webapi/Controllers/ChatHistoryController.cs Outdated
Comment thread webapi/Controllers/ChatHistoryController.cs
Comment thread webapi/Controllers/ChatHistoryController.cs
Comment thread webapi/Controllers/ChatHistoryController.cs
Comment thread webapi/Controllers/ChatHistoryController.cs Outdated
Comment thread webapp/src/Constants.ts
@teresaqhoang teresaqhoang requested a review from glahaye August 21, 2023 22:56
glahaye
glahaye previously approved these changes Aug 21, 2023
@teresaqhoang teresaqhoang enabled auto-merge August 22, 2023 21:11
@teresaqhoang teresaqhoang dismissed alliscode’s stale review August 22, 2023 21:24

Discussed offline and got sign-off after I addressed his last comments. Ben's oof now for the week, don't want to block

@teresaqhoang teresaqhoang added this pull request to the merge queue Aug 22, 2023
Merged via the queue into microsoft:main with commit c0012fa Aug 22, 2023
@teresaqhoang teresaqhoang deleted the delete-chat branch August 22, 2023 21:24
teamleader-dev pushed a commit to vlink-group/chat-copilot that referenced this pull request Oct 7, 2024
### 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 😄
kb0039 pushed a commit to aaronba/chat-copilot that referenced this pull request Jan 8, 2025
### 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 😄
jdtoombs pushed a commit to jdtoombs/chat-copilot that referenced this pull request Apr 10, 2025
…t#193)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request webapi Pull requests that update .net code webapp Pull requests that update Typescript code

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

6 participants