You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7b855fd
Browse filesBrowse the repository at this point in the historyBrowse files
fix: saving a key on a phone failed with "no active window"
Since 0.5.0 every save asked the browser for permission to reach the
provider's origin, whether or not it was already granted. The prompt needs a
browser window, and a popup opened as a tab (Kiwi, and Firefox on a phone)
has none, so the request failed and the save with it, even for OpenRouter,
which the manifest covers at install.
Only origins not yet granted are asked for now. Where a prompt is needed
and cannot be shown, the error says which host and what to do instead of
"no active window".
// The browser has nowhere to draw the prompt. Say what to do, not what
70
+
// went wrong inside.
71
+
if(/window/i.test(errorMessage(error))){
72
+
thrownewError(
73
+
`This browser cannot ask for permission to reach ${missing.map(host).join(', ')} from here. OpenRouter needs no extra permission, so it works on phones; the other providers need a desktop browser.`,
74
+
);
75
+
}
76
+
throwerror;
77
+
});
78
+
if(!granted)thrownewError('Permission to reach the provider was not granted.');
0 commit comments