Enable automatic web search by default; improve toggle behavior and search planning.
CI / check (22) (push) Successful in 9m35s
CI / check (24) (push) Successful in 9m34s

This commit is contained in:
2026-10-06 08:50:03 +02:00
parent 674abf78f6
commit 7be654af11
17 changed files with 300 additions and 54 deletions
+3 -1
View File
@@ -64,12 +64,14 @@ function toggleChatDrawer() {
function handleDisclosureToggle(event) {
const disclosure = event.target;
if (!(disclosure instanceof HTMLDetailsElement) || !chatDrawer?.contains(disclosure)) return;
// Nested disclosures must not close their parent or lose their expanded state.
if (!disclosure.matches(".chat-drawer-body > details")) return;
if (disclosure.matches(".chat-drawer-more, .chat-drawer-danger")) {
const hint = disclosure.querySelector(":scope > summary .chat-drawer-row-hint");
if (hint) hint.textContent = disclosure.open ? "Hide" : "Show";
}
if (disclosure.open) {
chatDrawer.querySelectorAll("details[open]").forEach((other) => {
chatDrawer.querySelectorAll(".chat-drawer-body > details[open]").forEach((other) => {
if (other !== disclosure) other.open = false;
});
}