This commit is contained in:
Timothy Jaeryang Baek
2026-08-24 17:39:30 -04:00
parent f2313d0c72
commit 8c1f3d3824
+9 -9
View File
@@ -1989,6 +1989,13 @@
// Web functions
//////////////////////////
const openCallOverlay = () => {
setTimeout(() => {
showCallOverlay.set(true);
showControls.set(true);
}, 0);
};
const initNewChat = async () => {
console.log('initNewChat');
resetWebSearchConfirmation();
@@ -2176,8 +2183,7 @@
}
if ($page.url.searchParams.get('call') === 'true') {
showCallOverlay.set(true);
showControls.set(true);
openCallOverlay();
}
// Consume one-shot desktop event (e.g. Spotlight query, call shortcut)
@@ -2186,13 +2192,7 @@
desktopEvent.set(null);
if (event.type === 'call') {
// Defer to next macrotask so the call overlay isn't clobbered by
// showControlsSubscribe's initial callback (value=false → set(false))
// which runs as a pending microtask after this function.
setTimeout(() => {
showCallOverlay.set(true);
showControls.set(true);
}, 0);
openCallOverlay();
} else if (event.type === 'query') {
const query = event.data?.query;
const eventFiles = event.data?.files;