jupyter-ai
jupyter-ai copied to clipboard
[v3-beta] Reply when messages are edited
Problem
It is not good to clear the chat or continue to prompt in a somewhat "dirty" chat history, both from a cost and quality perspective.
Proposed Solution
In that vein, I would like to edit any message in the chat history. A simple edit button that enables me to alter my previous prompt should be enough.
Additional context
Just like the ChatGPT default UI, I think.
Thanks for the project!
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:
Folks, what do you think would make better UX here?
a) Menu
Move existing delete icon into menu and add edit option there
- times are visually aligned
- options are less discoverable (different option are available for human/agent messages)
b) Both buttons together
- times are misaligned
- options are discoverable
- visually overwhelming
c) Show edit button left to the time on hover only
Hover state:
- times are aligned
- option are more discoverable than in (a) but less than in (b)
- less visually overwhelming than (b) because by default the edit icon is not shown (until users hovers over the message)
@krassowski Thanks for reviving this issue and looking into how this feature can be implemented today! I'm dropping by to mention that we do have plans with Quantstack to simplify the implementation of chat messaging by migrating to a new jupyter-chat dependency, which uses a backend that represents the chat state as a Yjs CRDT. This will allow for messages to be edited more easily than with our existing backend, where message objects are mostly treated as immutable. The new jupyter-chat package will also allow users to have multiple chats. Here is the WIP tracking issue: https://github.com/jupyterlab/jupyter-ai/issues/862
The work on this is still ongoing and very early-stage, but we are planning to migrate Jupyter AI to jupyter-chat within the next 6 months. I still need time to review the code in jupyter-chat, prepare a high-level design, document the roadmap publicly in a pinned issue, as well as participate in the engineering effort required by the migration.
If you plan on opening a PR for this, I would be happy to review it. My only additional request is that a smaller PR (with fewer changed lines of code) would be preferred over large ones, especially for features that are already planned as being part of the migration. Making large code changes could make the migration towards jupyter-chat more challenging.
Folks, what do you think would make better UX here?
I personally recommend option a). I like the visual symmetry it provides, and I'm OK with hiding the "delete exchange" button in a menu. I don't imagine that editing/deleting exchanges will be very common user actions, so keeping them nested within a menu seems sensible.
We may want to take inspiration from ChatGPT's UI for editing messages. See Mike's post here: https://github.com/jupyterlab/jupyter-ai/issues/813#issuecomment-2404438032