Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useAuthenticatedMutation } from "@hooks/useAuthenticatedMutation";
import {
CheckCircle,
MagnifyingGlassIcon,
PlugIcon,
Plus,
Expand Down Expand Up @@ -321,12 +320,10 @@ function ServerRow({

function RecommendedServerRow({
server,
isInstalled,
onInstall,
isInstalling,
}: {
server: McpRecommendedServer;
isInstalled: boolean;
onInstall: () => void;
isInstalling: boolean;
}) {
Expand Down Expand Up @@ -359,22 +356,15 @@ function RecommendedServerRow({
</Flex>

<Flex align="center" className="shrink-0">
{isInstalled ? (
<Badge color="green" variant="soft" size="1">
<CheckCircle size={12} weight="fill" />
Active
</Badge>
) : (
<Button
variant="soft"
size="1"
onClick={onInstall}
disabled={isInstalling}
>
{isInstalling ? <Spinner size="1" /> : null}
Connect
</Button>
)}
<Button
variant="soft"
size="1"
onClick={onInstall}
disabled={isInstalling}
>
{isInstalling ? <Spinner size="1" /> : null}
Connect
</Button>
</Flex>
</Flex>
);
Expand Down Expand Up @@ -430,14 +420,15 @@ export function McpServersSettings() {

const filteredServers = useMemo(() => {
if (!servers) return [];
if (!searchTerm) return servers;
const available = servers.filter((s) => !installedUrls.has(s.url));
if (!searchTerm) return available;
const term = searchTerm.toLowerCase();
return servers.filter(
return available.filter(
(s) =>
s.name.toLowerCase().includes(term) ||
s.description.toLowerCase().includes(term),
);
}, [servers, searchTerm]);
}, [servers, searchTerm, installedUrls]);

const handleUninstall = useCallback(() => {
if (uninstallTarget) {
Expand Down Expand Up @@ -546,7 +537,6 @@ export function McpServersSettings() {
<RecommendedServerRow
key={server.url}
server={server}
isInstalled={installedUrls.has(server.url)}
onInstall={() => installRecommended(server)}
isInstalling={installingUrl === server.url}
/>
Expand Down
Loading