merge main

This commit is contained in:
Pulkit Sharma
2025-04-03 00:47:21 +05:30
16 changed files with 729 additions and 2684 deletions

View File

@@ -32,7 +32,6 @@ import {
MessageSquare,
} from "lucide-react";
import { toast } from "react-toastify";
import { z } from "zod";
import "./App.css";
import ConsoleTab from "./components/ConsoleTab";
@@ -50,11 +49,12 @@ import {
getMCPProxyAddress,
getMCPServerRequestTimeout,
} from "./utils/configUtils";
import { useToast } from "@/hooks/use-toast";
const params = new URLSearchParams(window.location.search);
const CONFIG_LOCAL_STORAGE_KEY = "inspectorConfig_v1";
const App = () => {
const { toast } = useToast();
// Handle OAuth callback route
const [resources, setResources] = useState<Resource[]>([]);
const [resourceTemplates, setResourceTemplates] = useState<
@@ -215,11 +215,14 @@ const App = () => {
newUrl.searchParams.delete("serverUrl");
window.history.replaceState({}, "", newUrl.toString());
// Show success toast for OAuth
toast.success("Successfully authenticated with OAuth");
toast({
title: "Success",
description: "Successfully authenticated with OAuth",
});
// Connect to the server
connectMcpServer();
}
}, [connectMcpServer]);
}, [connectMcpServer, toast]);
useEffect(() => {
fetch(`${getMCPProxyAddress(config)}/config`)