jupyter-ai
jupyter-ai copied to clipboard
Make the chat message history user-specific
Problem
The chat message history, used to provide context for questions in Jupyter AI's chat UI, is shared among all users on the same server. If one user clears the message history with a modified /clear or new /reset command (as requested in #616), it is cleared for all users. Chat exchanges use the context from all users.
Proposed Solution
Attribute the chat history to individual users. Grant users the ability to delete only their own chat history, leaving other users' history in context.
Additional context
As of 2024-02-05, magic commands do not use message history; this was removed in #551, which fixed #543.
#428 requests a similar history deletion option for the /ask command; this should be considered for improvement along with this proposed change.
Might be worth thinking about users who will need to delete messages for all users on the server (e.g. teachers in a classroom) and go for full RBAC support.