twinnydotdev / twinny

The most no-nonsense, locally or API-hosted AI code completion plugin for Visual Studio Code - like GitHub Copilot but completely free and 100% private.
https://twinny.dev
MIT License
2.3k stars 126 forks source link

Edit and re-submit in chat mode #233

Open PkmX opened 2 months ago

PkmX commented 2 months ago

Is your feature request related to a problem? Please describe. In chat mode, it is not unusual that you have to refine or re-phrase the message you sent because the AI doesn't quite understand the prompt. Right now this requires the user to clarify in a follow-up question (which eats your context limit and potentially confuses less-capable LLMs) or start a new conversation entirely (need to retype or copy/paste the entire history leading up to the message you want to edit).

Describe the solution you'd like Add an edit button to each message that allows you to edit and re-submit. This feature is already present in many other chat UIs.

ChrisDeadman commented 2 months ago

Gradio provides a ChatInferface that looks like this: image

And I have to say, after getting used to the Undo(remove response from model, remove user message, put removed user message back into input textbox to allow editing) and Retry (regenerate response from model) I found it to be much more useful and intuitive than the way ChatGPT lets you edit a previous message.

Maybe two simple Undo and Retry buttons are enough?

PkmX commented 2 months ago

Either way seems fine for me. The clear button would be useful as well since sometimes I just want to ask a quick question without cluttering the conversation history.

rjmacarthy commented 2 months ago

Thanks for the great suggestion, so are we referring to only the last submitted message for editing or individual messages inside the conversation history?

Many thanks.

ChrisDeadman commented 2 months ago

For me any of the solutions would be fine