Currently, if a chat is created via the API but not prepared, it can lead to an intermediate state where the chat appears empty and unprepared in the UI. This situation arises because creating a chat through the API is a two-step process:
In the UI, these steps are performed back-to-back, ensuring the user is not left in an intermediate state. However, if the UI is started after creating the chat via the API and the chat has not been prepared, the user will see an empty chat that is unprepared and can further cause errors while handling the chats.
Proposed Solution
Automatic preparation: Implement functionality in the UI to detect when an unprepared chat is selected and trigger the preparation process automatically.
Value and/or benefit
Automatically handling unprepared chats in the UI prevents errors and improves UX
Anything else?
Originally been discussed by @pmeier in 445#comment
Feature description
Currently, if a chat is created via the API but not prepared, it can lead to an intermediate state where the chat appears empty and unprepared in the UI. This situation arises because creating a chat through the API is a two-step process:
Creating the chat: https://github.com/Quansight/ragna/blob/55f7fc5d3d13f321eebd16d3b0901ab35ac36bc7/scripts/add_chats.py#L51-L64
Preparing the chat: https://github.com/Quansight/ragna/blob/55f7fc5d3d13f321eebd16d3b0901ab35ac36bc7/scripts/add_chats.py#L66
In the UI, these steps are performed back-to-back, ensuring the user is not left in an intermediate state. However, if the UI is started after creating the chat via the API and the chat has not been prepared, the user will see an empty chat that is unprepared and can further cause errors while handling the chats.
Proposed Solution
Automatic preparation: Implement functionality in the UI to detect when an unprepared chat is selected and trigger the preparation process automatically.
Value and/or benefit
Automatically handling unprepared chats in the UI prevents errors and improves UX
Anything else?
Originally been discussed by @pmeier in 445#comment