refac
Co-Authored-By: Taylor Wilsdon <6508528+taylorwilsdon@users.noreply.github.com>
This commit is contained in:
1 parent
857d7e6f37
commit
4d50001c41
2 files changed
+12
No files matched your search
@@ -1177,6 +1177,15 @@
|
|||||||
.filter((id) => id);
|
.filter((id) => id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Restore tool selection after OAuth redirect
|
||||||
|
const pendingToolId = sessionStorage.getItem('pendingOAuthToolId');
|
||||||
|
if (pendingToolId) {
|
||||||
|
sessionStorage.removeItem('pendingOAuthToolId');
|
||||||
|
if (!selectedToolIds.includes(pendingToolId)) {
|
||||||
|
selectedToolIds = [...selectedToolIds, pendingToolId];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($page.url.searchParams.get('call') === 'true') {
|
if ($page.url.searchParams.get('call') === 'true') {
|
||||||
showCallOverlay.set(true);
|
showCallOverlay.set(true);
|
||||||
showControls.set(true);
|
showControls.set(true);
|
||||||
|
|||||||
@@ -339,6 +339,9 @@
|
|||||||
let parts = toolId.split(':');
|
let parts = toolId.split(':');
|
||||||
let serverId = parts?.at(-1) ?? toolId;
|
let serverId = parts?.at(-1) ?? toolId;
|
||||||
|
|
||||||
|
// Persist the tool ID so we can re-enable it after OAuth redirect
|
||||||
|
sessionStorage.setItem('pendingOAuthToolId', toolId);
|
||||||
|
|
||||||
const authUrl = getOAuthClientAuthorizationUrl(serverId, 'mcp');
|
const authUrl = getOAuthClientAuthorizationUrl(serverId, 'mcp');
|
||||||
window.open(authUrl, '_self', 'noopener');
|
window.open(authUrl, '_self', 'noopener');
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in new issue
Block a user