From ee39d56e6dd4ba41a39b8156a9dcf73b78e53255 Mon Sep 17 00:00:00 2001 From: Xiao Yijun Date: Mon, 21 Jul 2025 11:26:27 +0800 Subject: [PATCH] chore: fix lint issue --- client/src/lib/auth.ts | 10 +++++----- client/src/lib/hooks/useConnection.ts | 10 ++++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/client/src/lib/auth.ts b/client/src/lib/auth.ts index 9450a3a5..9989e944 100644 --- a/client/src/lib/auth.ts +++ b/client/src/lib/auth.ts @@ -66,7 +66,6 @@ export const clearClientInformationFromSessionStorage = ({ }; export class InspectorOAuthClientProvider implements OAuthClientProvider { - constructor(protected serverUrl: string) { // Save the server URL to session storage sessionStorage.setItem(SESSION_KEYS.SERVER_URL, serverUrl); @@ -89,10 +88,11 @@ export class InspectorOAuthClientProvider implements OAuthClientProvider { async clientInformation() { // Try to get the preregistered client information from session storage first - const preregisteredClientInformation = await getClientInformationFromSessionStorage({ - serverUrl: this.serverUrl, - isPreregistered: true, - }); + const preregisteredClientInformation = + await getClientInformationFromSessionStorage({ + serverUrl: this.serverUrl, + isPreregistered: true, + }); // If no preregistered client information is found, get the dynamically registered client information return ( diff --git a/client/src/lib/hooks/useConnection.ts b/client/src/lib/hooks/useConnection.ts index ea56e404..4cea62e5 100644 --- a/client/src/lib/hooks/useConnection.ts +++ b/client/src/lib/hooks/useConnection.ts @@ -36,7 +36,11 @@ import { z } from "zod"; import { ConnectionStatus } from "../constants"; import { Notification, StdErrNotificationSchema } from "../notificationTypes"; import { auth } from "@modelcontextprotocol/sdk/client/auth.js"; -import { clearClientInformationFromSessionStorage, InspectorOAuthClientProvider, saveClientInformationToSessionStorage } from "../auth"; +import { + clearClientInformationFromSessionStorage, + InspectorOAuthClientProvider, + saveClientInformationToSessionStorage, +} from "../auth"; import packageJson from "../../../package.json"; import { getMCPProxyAddress, @@ -297,9 +301,7 @@ export function useConnection({ const handleAuthError = async (error: unknown) => { if (is401Error(error)) { - const serverAuthProvider = new InspectorOAuthClientProvider( - sseUrl, - ); + const serverAuthProvider = new InspectorOAuthClientProvider(sseUrl); const result = await auth(serverAuthProvider, { serverUrl: sseUrl,