|
14 | 14 | <Grid RowDefinitions="Auto,*" ColumnDefinitions="*"> |
15 | 15 | <!-- Top toolbar --> |
16 | 16 | <Border Background="#2B2B2B" Padding="12"> |
17 | | - <Grid ColumnDefinitions="Auto,12,*,Auto,8,Auto,12,Auto,8,Auto,8,Auto"> |
| 17 | + <Grid ColumnDefinitions="Auto,12,*,Auto,8,Auto,12,Auto,8,Auto,8,Auto,8,Auto"> |
18 | 18 | <Button x:Name="SelectWorkspaceButton" Foreground="#E6E6E6" Click="OnSelectWorkspaceClick">Select Workspace…</Button> |
19 | 19 | <Border Grid.Column="1"/> |
20 | 20 | <TextBlock Grid.Column="2" TextTrimming="CharacterEllipsis" VerticalAlignment="Center" Foreground="#E6E6E6"> |
|
42 | 42 | <Button Grid.Column="9" x:Name="OpenCliSettingsButton" Foreground="#E6E6E6" Click="OnOpenCliSettingsClick">CLI Settings</Button> |
43 | 43 | <Border Grid.Column="10"/> |
44 | 44 | <Button Grid.Column="11" x:Name="OpenAboutButton" Foreground="#E6E6E6" Click="OnOpenAboutClick">About</Button> |
| 45 | + <Border Grid.Column="12"/> |
| 46 | + <Button Grid.Column="13" x:Name="OpenReadmeButton" Foreground="#E6E6E6" |
| 47 | + Click="OnOpenReadmeClick" ToolTip.Tip="Open README">?</Button> |
45 | 48 | </Grid> |
46 | 49 | </Border> |
47 | 50 |
|
48 | 51 | <!-- Body split: left file tree, right CLI output --> |
49 | 52 | <Grid Grid.Row="1"> |
50 | 53 | <Grid.ColumnDefinitions> |
51 | | - <ColumnDefinition Width="220"/> |
| 54 | + <ColumnDefinition Width="230" MinWidth="230"/> |
52 | 55 | <ColumnDefinition Width="Auto"/> |
53 | 56 | <ColumnDefinition Width="*"/> |
54 | 57 | <ColumnDefinition Width="Auto"/> |
55 | | - <ColumnDefinition Width="*" MinWidth="400"/> |
| 58 | + <ColumnDefinition Width="*" MinWidth="425"/> |
56 | 59 | </Grid.ColumnDefinitions> |
57 | 60 | <!-- Left: directory tree --> |
58 | 61 | <Border BorderBrush="#333" BorderThickness="0,0,1,0" Background="#1F1F1F"> |
59 | | - <Grid RowDefinitions="Auto,*"> |
| 62 | + <Grid RowDefinitions="Auto,*,Auto,*"> |
60 | 63 | <TextBlock Margin="10,8" FontWeight="SemiBold" Text="Workspace Files" Foreground="#E6E6E6"/> |
61 | 64 | <TreeView x:Name="WorkspaceTree" Grid.Row="1" ItemsSource="{Binding TreeRoots}" SelectionChanged="OnTreeSelectionChanged"> |
62 | 65 | <TreeView.DataTemplates> |
|
82 | 85 | </TreeDataTemplate> |
83 | 86 | </TreeView.DataTemplates> |
84 | 87 | </TreeView> |
| 88 | + <!-- Splitter between file tree and MCP tools panel --> |
| 89 | + <GridSplitter Grid.Row="2" Height="5" Background="#2A2A2A" HorizontalAlignment="Stretch" |
| 90 | + ResizeDirection="Rows" IsVisible="{Binding IsMcpEnabled}"/> |
| 91 | + <!-- MCP servers + tools panel --> |
| 92 | + <Border Grid.Row="3" Background="#1B1B1B" BorderBrush="#333" BorderThickness="1,1,0,0" Padding="8" IsVisible="{Binding IsMcpEnabled}"> |
| 93 | + <Grid RowDefinitions="Auto,*"> |
| 94 | + <!-- Header with gear + refresh --> |
| 95 | + <StackPanel Grid.Row="0" Orientation="Horizontal" Spacing="8" Margin="0,0,0,6"> |
| 96 | + <TextBlock FontWeight="SemiBold" Text="MCP" Foreground="#E6E6E6" VerticalAlignment="Center"/> |
| 97 | + <Button Width="22" Height="22" |
| 98 | + HorizontalContentAlignment="Center" VerticalContentAlignment="Center" |
| 99 | + Padding="0" Click="OnOpenMcpConfigClick" ToolTip.Tip="Open mcp_servers.json">⚙</Button> |
| 100 | + <Button Width="22" Height="22" |
| 101 | + HorizontalContentAlignment="Center" VerticalContentAlignment="Center" |
| 102 | + Padding="0" Click="OnMcpRefreshConfigClick" ToolTip.Tip="Refresh servers">↻</Button> |
| 103 | + </StackPanel> |
| 104 | + |
| 105 | + <!-- Combined servers + tools with vertical scroll --> |
| 106 | + <ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto" Margin="0,4,0,0"> |
| 107 | + <ItemsControl ItemsSource="{Binding McpServers}" HorizontalAlignment="Stretch"> |
| 108 | + <ItemsControl.ItemTemplate> |
| 109 | + <DataTemplate> |
| 110 | + <Expander IsExpanded="False" Padding="0" Margin="0,2,0,2" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch"> |
| 111 | + <Expander.Header> |
| 112 | + <Grid ColumnDefinitions="Auto,6,*" Margin="0"> |
| 113 | + <!-- Slightly smaller checkbox to reduce visual weight --> |
| 114 | + <CheckBox Grid.Column="0" IsChecked="{Binding Selected, Mode=TwoWay}" VerticalAlignment="Center" FontSize="10"/> |
| 115 | + <Border Grid.Column="1"/> |
| 116 | + <TextBlock Grid.Column="2" Text="{Binding Name}" VerticalAlignment="Center"/> |
| 117 | + </Grid> |
| 118 | + </Expander.Header> |
| 119 | + <ItemsControl ItemsSource="{Binding Tools}" Margin="0,2,0,0" HorizontalAlignment="Stretch"> |
| 120 | + <ItemsControl.ItemTemplate> |
| 121 | + <DataTemplate> |
| 122 | + <TextBlock Text="{Binding Short}" ToolTip.Tip="{Binding Full}" Margin="16,0,0,0"/> |
| 123 | + </DataTemplate> |
| 124 | + </ItemsControl.ItemTemplate> |
| 125 | + </ItemsControl> |
| 126 | + </Expander> |
| 127 | + </DataTemplate> |
| 128 | + </ItemsControl.ItemTemplate> |
| 129 | + </ItemsControl> |
| 130 | + </ScrollViewer> |
| 131 | + </Grid> |
| 132 | + </Border> |
85 | 133 | </Grid> |
86 | 134 | </Border> |
87 | 135 | <!-- Splitter --> |
|
203 | 251 | <Button x:Name="RestartCliButton" Click="OnRestartCliClick" IsEnabled="{Binding HasWorkspace}">Restart Session</Button> |
204 | 252 | <Button x:Name="StopCliButton" Click="OnStopCliClick" IsEnabled="{Binding IsCliRunning}">Stop</Button> |
205 | 253 | <Button x:Name="ClearLogButton" Click="OnClearLogClick">Clear Log</Button> |
| 254 | + <Button x:Name="RunAppButton" Click="OnRunAppClick" IsEnabled="{Binding HasWorkspace}">Run App</Button> |
206 | 255 | <Button x:Name="OpenShellButton" Click="OnOpenShellClick">Shell</Button> |
207 | 256 | </StackPanel> |
208 | 257 | <Grid ColumnDefinitions="*,Auto" ColumnSpacing="8"> |
|
0 commit comments