File tree Expand file tree Collapse file tree 3 files changed +25
-1
lines changed
src/components/Agentic/common/AgentFlowChart Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,20 @@ const DEFAULT_MCP_SERVER_BLOCK_SIZE = 50; // in pixels
66
77export const Container = styled . div < ContainerProps > `
88 display: flex;
9+ flex-wrap: wrap;
10+ justify-content: center;
911 gap: ${ ( { $zoomLevel } ) =>
1012 $zoomLevel ? $zoomLevel * DEFAULT_GAP_SIZE : DEFAULT_GAP_SIZE } px;
13+ max-width: calc(
14+ 3 *
15+ ${ ( { $zoomLevel } ) =>
16+ $zoomLevel
17+ ? $zoomLevel * DEFAULT_MCP_SERVER_BLOCK_SIZE
18+ : DEFAULT_MCP_SERVER_BLOCK_SIZE } px +
19+ 2 *
20+ ${ ( { $zoomLevel } ) =>
21+ $zoomLevel ? $zoomLevel * DEFAULT_GAP_SIZE : DEFAULT_GAP_SIZE } px
22+ );
1123` ;
1224
1325export const MCPServerBlock = styled . div < MCPServerBlockProps > `
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ export const MCPServersToolbar = ({
9999 < div >
100100 < Tooltip title = { x . display_name } >
101101 < s . MCPServerIconContainer $isEditable = { x . isEditable } >
102- < MCPServerIcon server = { x } size = { 17 } />
102+ < MCPServerIcon server = { x } size = { s . MCP_SERVER_ICON_SIZE } />
103103 </ s . MCPServerIconContainer >
104104 </ Tooltip >
105105 </ div >
Original file line number Diff line number Diff line change 11import styled from "styled-components" ;
22import type { ContainerProps , MCPServerIconContainerProps } from "./types" ;
33
4+ const GAP = 6 ; // in pixels
5+ export const MCP_SERVER_ICON_SIZE = 17 ; // in pixels
6+
47export const Container = styled . div < ContainerProps > `
58 display: flex;
9+ flex-wrap: wrap;
610 gap: 6px;
711 align-items: center;
812 justify-content: center;
@@ -17,6 +21,14 @@ export const Container = styled.div<ContainerProps>`
1721 rgb(255 255 255 / 10%) 0%,
1822 rgb(255 255 255 / 0%) 100%
1923 );
24+ max-width: calc(
25+ 3 *
26+ ${ ( { $zoomLevel } ) =>
27+ $zoomLevel
28+ ? $zoomLevel * MCP_SERVER_ICON_SIZE
29+ : MCP_SERVER_ICON_SIZE } px +
30+ 2 * ${ ( { $zoomLevel } ) => ( $zoomLevel ? $zoomLevel * GAP : GAP ) } px
31+ );
2032` ;
2133
2234export const MCPServerIconContainer = styled . div < MCPServerIconContainerProps > `
You can’t perform that action at this time.
0 commit comments