mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-29 10:09:17 +02:00
refac
This commit is contained in:
@@ -1413,32 +1413,6 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type === 'oauth:complete') {
|
|
||||||
const toolId = event.data.toolId;
|
|
||||||
if (!toolId) return;
|
|
||||||
|
|
||||||
if (event.data.error) {
|
|
||||||
sessionStorage.removeItem('oauthRedirectInProgressToolId');
|
|
||||||
localStorage.removeItem('oauthRedirectInProgressToolId');
|
|
||||||
toast.error(event.data.error);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
sessionStorage.removeItem('pendingOAuthToolId');
|
|
||||||
sessionStorage.removeItem('oauthRedirectInProgressToolId');
|
|
||||||
localStorage.removeItem('pendingOAuthToolId');
|
|
||||||
localStorage.removeItem('oauthRedirectInProgressToolId');
|
|
||||||
const updatedTools = await getTools(localStorage.token).catch(() => null);
|
|
||||||
if (updatedTools) {
|
|
||||||
tools.set(updatedTools);
|
|
||||||
}
|
|
||||||
selectedToolIds = [...new Set([...selectedToolIds, toolId])];
|
|
||||||
pendingOAuthTools = pendingOAuthTools.filter((tool) => tool.id !== toolId);
|
|
||||||
await tick();
|
|
||||||
await continueOAuthRedirect();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (type === 'action:submit') {
|
if (type === 'action:submit') {
|
||||||
console.debug(event.data.text);
|
console.debug(event.data.text);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user