Merge branch 'main' into oleina/logging

This commit is contained in:
Ola Hungerford 2025-07-26 10:51:01 -07:00 • committed by GitHub
commit e573e855f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -466,10 +466,24 @@ const App = () => {
}, [roots]);
useEffect(() => {
if (!window.location.hash) {
window.location.hash = "resources";
if (mcpClient && !window.location.hash) {
const defaultTab = serverCapabilities?.resources
? "resources"
: serverCapabilities?.prompts
? "prompts"
: serverCapabilities?.tools
? "tools"
: "ping";
window.location.hash = defaultTab;
} else if (!mcpClient && window.location.hash) {
// Clear hash when disconnected - completely remove the fragment
window.history.replaceState(
null,
"",
window.location.pathname + window.location.search,
);
}
}, []);
}, [mcpClient, serverCapabilities]);
useEffect(() => {
const handleHashChange = () => {