This commit is contained in:
Timothy Jaeryang Baek
2026-06-29 12:38:04 -05:00
parent c584a4270c
commit ae5d23f226
4 changed files with 44 additions and 16 deletions
+2 -7
View File
@@ -62,7 +62,7 @@
import { getSessionUser } from '$lib/apis/auths';
import { WEBUI_BASE_URL, WEBUI_API_BASE_URL, PASTED_TEXT_CHARACTER_LIMIT } from '$lib/constants';
import { getOAuthClientAuthorizationUrl } from '$lib/apis/configs';
import { initiateOAuthRedirect } from '$lib/apis/configs';
import { createNoteHandler } from '../notes/utils';
import { getSuggestionRenderer } from '../common/RichTextInput/suggestions';
@@ -1986,12 +1986,7 @@
<Tooltip content={$i18n.t('Click to connect')} placement="top">
<button
on:click|preventDefault={() => {
sessionStorage.setItem('pendingOAuthToolId', pendingTool.id);
const authUrl = getOAuthClientAuthorizationUrl(
pendingTool.serverId,
pendingTool.authType ?? 'mcp'
);
window.open(authUrl, '_self', 'noopener');
initiateOAuthRedirect(pendingTool);
}}
type="button"
class="group px-2 py-[5px] flex gap-1.5 items-center text-xs rounded-full transition-colors duration-300 focus:outline-hidden max-w-full overflow-hidden