Duo Chat: allow editing the a question to course correct the conversation

Problem

When I already have a longer conversation with Duo this conversation accumulated a certain value as Duo knows the larger context that I am currently concerned with. If I then ask a question that is not well formulated (or misses context or has the wrong context) and Duo gets it wrong, I want to be able to go back and improve my question. This is more efficient and probably leads to better results than having to correct my question with a follow-up question: "No that is not what I meant....".

Proposal

  • Enable users to change the course of the conversation from a specific user question onwards:
    • Let users edit any already sent question that is part of the conversation
    • Also let them change the context attached to that question (e.g. include a different file, remove a file, or add a file)
  • When the user made that change and sends the edited question,
    • either delete all follow-ups from that edited question onward
    • or create a new branch like some market leaders do.
  • This should work in the chat in the Web UI as well as in the IDEs.

Industry state of the art

This is a table stakes standard in other chats in the industry.

Option 1 - Branching

When a user edits a message, we branch the conversation so the user has access to both through the UI.

Branching Flow
Screenshot 2025-04-30 at 1.39.14 PM.png

Option 2 - Restarting Chat

When a user edits a message, we delete the previous conversation.

Restarting Flow
Screenshot 2025-04-30 at 1.43.09 PM.png
Edited by 🤖 GitLab Bot 🤖