1- import { useMcpServers } from "@features/settings/hooks/useMcpServers" ;
1+ import { useMcpServers } from "@features/mcp-servers/hooks/useMcpServers" ;
2+ import { useSetHeaderContent } from "@hooks/useSetHeaderContent" ;
3+ import { Plugs } from "@phosphor-icons/react" ;
24import {
35 AlertDialog ,
46 Box ,
@@ -14,18 +16,18 @@ import type {
1416} from "@renderer/api/posthogClient" ;
1517import { useQueryClient } from "@tanstack/react-query" ;
1618import { useCallback , useEffect , useMemo , useState } from "react" ;
17- import { AddCustomServerForm } from "./mcp /AddCustomServerForm" ;
18- import { MarketplaceView } from "./mcp /MarketplaceView" ;
19- import { McpInstalledRail } from "./mcp /McpInstalledRail" ;
20- import { ServerDetailView } from "./mcp /ServerDetailView" ;
19+ import { AddCustomServerForm } from "./parts /AddCustomServerForm" ;
20+ import { MarketplaceView } from "./parts /MarketplaceView" ;
21+ import { McpInstalledRail } from "./parts /McpInstalledRail" ;
22+ import { ServerDetailView } from "./parts /ServerDetailView" ;
2123
2224type SceneView =
2325 | { kind : "marketplace" }
2426 | { kind : "detail-installation" ; installationId : string }
2527 | { kind : "detail-template" ; templateId : string }
2628 | { kind : "add-custom" } ;
2729
28- export function McpServersSettings ( ) {
30+ export function McpServersView ( ) {
2931 const queryClient = useQueryClient ( ) ;
3032 const [ view , setView ] = useState < SceneView > ( { kind : "marketplace" } ) ;
3133 const [ query , setQuery ] = useState ( "" ) ;
@@ -43,6 +45,22 @@ export function McpServersSettings() {
4345 null ,
4446 ) ;
4547
48+ const headerContent = useMemo (
49+ ( ) => (
50+ < Flex align = "center" gap = "2" className = "w-full min-w-0" >
51+ < Plugs size = { 12 } className = "shrink-0 text-gray-10" />
52+ < Text
53+ className = "truncate whitespace-nowrap font-medium text-[13px]"
54+ title = "MCP servers"
55+ >
56+ MCP servers
57+ </ Text >
58+ </ Flex >
59+ ) ,
60+ [ ] ,
61+ ) ;
62+ useSetHeaderContent ( headerContent ) ;
63+
4664 const {
4765 installations,
4866 installationsLoading,
@@ -254,7 +272,7 @@ export function McpServersSettings() {
254272 } ) ( ) ;
255273
256274 return (
257- < Flex className = "min-h-0 w-full flex-1 overflow-hidden" >
275+ < Flex height = "100%" className = "min-h-0 overflow-hidden" >
258276 < McpInstalledRail
259277 installations = { installationList }
260278 templates = { serverList }
@@ -266,12 +284,7 @@ export function McpServersSettings() {
266284 />
267285 < Box className = "min-h-0 min-w-0 flex-1" >
268286 < ScrollArea className = "h-full w-full" >
269- < Box
270- p = "6"
271- mx = "auto"
272- style = { { zIndex : 1 } }
273- className = "relative max-w-[960px]"
274- >
287+ < Box p = "6" mx = "auto" className = "relative z-[1] max-w-[960px]" >
275288 { mainContent }
276289 </ Box >
277290 </ ScrollArea >
0 commit comments