feat: clarify web library memory and conversation management
Rebuild & Deploy / rebuild (push) Failing after 17s
Rebuild & Deploy / rebuild (push) Failing after 17s
This commit is contained in:
1 parent
3183ebaea7
commit
41ca590744
11 files changed
+767
-70
No files matched your search
+25
-2
@@ -95,7 +95,13 @@ function setTasksOpen(open) {
|
||||
tasksPanel.hidden = !open; tasksPanel.inert = !open;
|
||||
tasksPanel.classList.toggle("open", open);
|
||||
tasksBtn.setAttribute("aria-expanded", String(open));
|
||||
if (open) closeTasksBtn.focus(); else if (wasOpen) tasksBtn.focus();
|
||||
if (open) {
|
||||
if (document.getElementById('chatSidebar')?.classList.contains('drawer-open')) document.getElementById('drawerClose')?.click();
|
||||
closeTasksBtn.focus();
|
||||
} else if (wasOpen) {
|
||||
const target = tasksBtn.getClientRects().length && !tasksBtn.closest('[inert]') ? tasksBtn : document.getElementById('drawerOpen');
|
||||
target?.focus();
|
||||
}
|
||||
}
|
||||
tasksBtn.setAttribute("aria-expanded", "false");
|
||||
tasksBtn.addEventListener("click", () => setTasksOpen(!tasksPanel.classList.contains("open")));
|
||||
@@ -727,7 +733,18 @@ modelSelect.addEventListener("change", () => {
|
||||
thinkingLevelSelect.addEventListener("change", () => {
|
||||
updateSettingsControls(); setSettingsStatus("Unsaved changes. Save to apply them to your account.");
|
||||
});
|
||||
retryModelSettingsBtn.addEventListener("click", loadModelSettings);
|
||||
retryModelSettingsBtn.addEventListener("click", async () => {
|
||||
await loadModelSettings();
|
||||
if (!window.HopeAuth?.user) return;
|
||||
const account = accountIdentity(), generation = settingsGeneration;
|
||||
try {await window.HopeFeatures?.refresh();}
|
||||
catch (error) {
|
||||
if (settingsResponseIsCurrent(account, generation)) {
|
||||
retryModelSettingsBtn.hidden = false;
|
||||
setSettingsStatus(`File support could not be checked: ${error.message}. Retry to check again. Image attachments remain blocked.`, 'error');
|
||||
}
|
||||
}
|
||||
});
|
||||
modelSettingsForm.addEventListener("submit", async event => {
|
||||
event.preventDefault(); updateSettingsControls();
|
||||
if (saveModelSettingsBtn.disabled) return;
|
||||
@@ -740,6 +757,12 @@ modelSettingsForm.addEventListener("submit", async event => {
|
||||
const data = await HopeAuth.request("/api/settings/model", { method: "PUT", body: JSON.stringify(settings), signal: settingsAbort.signal });
|
||||
if (!settingsResponseIsCurrent(account, generation)) return;
|
||||
savedModelSettings = readSavedSettings(data); renderSavedModelSettings();
|
||||
window.HopeFeatures?.refresh().catch(error => {
|
||||
if (settingsResponseIsCurrent(account, generation)) {
|
||||
retryModelSettingsBtn.hidden = false;
|
||||
setSettingsStatus(`Model saved, but file support could not be checked: ${error.message}. Use Retry to check again. Image attachments remain blocked.`, 'error');
|
||||
}
|
||||
});
|
||||
setSettingsStatus(data.message || "Saved. Your next request will use these account settings; your conversation continues uninterrupted.", "success");
|
||||
} catch (error) {
|
||||
if (!settingsResponseIsCurrent(account, generation)) return;
|
||||
|
||||
Reference in new issue
Block a user