refactor: remove resource config

This commit is contained in:
Xiao Yijun 2025-07-08 10:21:40 +08:00
commit 3b3205228f
No known key found for this signature in database
GPG key ID: 6F648FC1262DB420

View file

@ -124,10 +124,6 @@ const App = () => {
return localStorage.getItem("lastOauthScope") || "";
});
const [oauthResource, setOauthResource] = useState<string>(() => {
return localStorage.getItem("lastOauthResource") || "";
});
const [pendingSampleRequests, setPendingSampleRequests] = useState<
Array<
PendingRequest & {
@ -198,7 +194,6 @@ const App = () => {
headerName,
oauthClientId,
oauthScope,
oauthResource,
config,
onNotification: (notification) => {
setNotifications((prev) => [...prev, notification as ServerNotification]);
@ -250,10 +245,6 @@ const App = () => {
localStorage.setItem("lastOauthScope", oauthScope);
}, [oauthScope]);
useEffect(() => {
localStorage.setItem("lastOauthResource", oauthResource);
}, [oauthResource]);
useEffect(() => {
saveInspectorConfig(CONFIG_LOCAL_STORAGE_KEY, config);
}, [config]);
@ -681,8 +672,6 @@ const App = () => {
setOauthClientId={setOauthClientId}
oauthScope={oauthScope}
setOauthScope={setOauthScope}
oauthResource={oauthResource}
setOauthResource={setOauthResource}
onConnect={connectMcpServer}
onDisconnect={disconnectMcpServer}
stdErrNotifications={stdErrNotifications}