web: allow the managed model dialog to leave its loading state
This commit is contained in:
@@ -2650,7 +2650,9 @@ function renderChatModelDialog(session) {
|
|||||||
role: "dialog",
|
role: "dialog",
|
||||||
"aria-modal": "true",
|
"aria-modal": "true",
|
||||||
"aria-label": "Change model",
|
"aria-label": "Change model",
|
||||||
"data-modal-stable": "true",
|
// Preserve typing only once loaded. Keeping a stable loading/error panel
|
||||||
|
// would prevent the asynchronous model response from ever replacing it.
|
||||||
|
"data-modal-stable": !state.chatModelsLoading && !state.chatModelBusy && !state.chatModelsError ? "true" : null,
|
||||||
});
|
});
|
||||||
overlay.addEventListener("click", (event) => {
|
overlay.addEventListener("click", (event) => {
|
||||||
if (event.target === overlay) closeChatModelPicker();
|
if (event.target === overlay) closeChatModelPicker();
|
||||||
|
|||||||
Reference in New Issue
Block a user