Skip to content

Commit d127c83

Browse files
Merge pull request #14 from semantic-developer/feature/sd-17
show mcp control always and documentation updates
2 parents c5d07fd + 9cc6183 commit d127c83

File tree

6 files changed

+71
-44
lines changed

6 files changed

+71
-44
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ A cross‑platform desktop UI (Avalonia/.NET 8) for driving the Codex CLI using
5050
- The file is created inside the chosen folder (or opened if it already exists) and loaded into the editor so you can tailor the guidance.
5151
- Codex CLI automatically honors the closest `AGENTS.md` when editing files: deeper files override parent folders, and rules apply to the entire subtree beneath the file.
5252
- Use these files to capture coding conventions, test commands, or “do/don’t” rules that the agent must follow for that part of the repo.
53+
- Learn more about the convention at [agents.md](https://agents.md/).
5354

5455
### Profiles (config.toml) example
5556

@@ -198,6 +199,8 @@ Config file location:
198199
- Linux/macOS: `~/.config/SemanticDeveloper/mcp_servers.json`
199200
- Windows: `%AppData%/SemanticDeveloper/mcp_servers.json`
200201

202+
> Unlike the Codex CLI's `config.toml`, which may also list MCP servers, the app only reads from `mcp_servers.json`. Keep your server command/argument definitions in this JSON file so Semantic Developer can surface them in the UI and pass them to Codex automatically. Profiles still live in `config.toml`, but MCP server wiring should follow the Semantic Developer format.
203+
201204
Selection behavior:
202205
- The checkbox state in the MCP pane determines which servers are passed to Codex at session start.
203206
- Change selections, then click “Restart Session” to apply.

SemanticDeveloper/Installers/Linux/build_deb.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ APP_PROJ="$ROOT/SemanticDeveloper/SemanticDeveloper.csproj"
88
PUBLISH_DIR="$SCRIPT_DIR/out/publish"
99
PKG_ROOT="$SCRIPT_DIR/pkgroot"
1010
DIST_DIR="$SCRIPT_DIR/dist"
11-
VERSION="1.0.1"
11+
VERSION="1.0.2"
1212
ARCH="amd64"
1313
if [[ "$RID" == "linux-arm64" ]]; then ARCH="arm64"; fi
1414

Binary file not shown.

SemanticDeveloper/SemanticDeveloper/MainWindow.axaml

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@
102102
</TreeView>
103103
<!-- Splitter between file tree and MCP tools panel -->
104104
<GridSplitter Grid.Row="2" Height="5" Background="#2A2A2A" HorizontalAlignment="Stretch"
105-
ResizeDirection="Rows" IsVisible="{Binding IsMcpEnabled}"/>
105+
ResizeDirection="Rows"/>
106106
<!-- MCP servers + tools panel -->
107-
<Border Grid.Row="3" Background="#1B1B1B" BorderBrush="#333" BorderThickness="1,1,0,0" Padding="8" IsVisible="{Binding IsMcpEnabled}">
107+
<Border Grid.Row="3" Background="#1B1B1B" BorderBrush="#333" BorderThickness="1,1,0,0" Padding="8">
108108
<Grid RowDefinitions="Auto,*">
109109
<!-- Header with gear + refresh -->
110110
<StackPanel Grid.Row="0" Orientation="Horizontal" Spacing="8" Margin="0,0,0,6">
@@ -119,29 +119,37 @@
119119

120120
<!-- Combined servers + tools with vertical scroll -->
121121
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto" Margin="0,4,0,0">
122-
<ItemsControl ItemsSource="{Binding McpServers}" HorizontalAlignment="Stretch">
123-
<ItemsControl.ItemTemplate>
124-
<DataTemplate>
125-
<Expander IsExpanded="False" Padding="0" Margin="0,2,0,2" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch">
126-
<Expander.Header>
127-
<Grid ColumnDefinitions="Auto,6,*" Margin="0">
128-
<!-- Slightly smaller checkbox to reduce visual weight -->
129-
<CheckBox Grid.Column="0" IsChecked="{Binding Selected, Mode=TwoWay}" VerticalAlignment="Center" FontSize="10"/>
130-
<Border Grid.Column="1"/>
131-
<TextBlock Grid.Column="2" Text="{Binding Name}" VerticalAlignment="Center"/>
132-
</Grid>
133-
</Expander.Header>
134-
<ItemsControl ItemsSource="{Binding Tools}" Margin="0,2,0,0" HorizontalAlignment="Stretch">
135-
<ItemsControl.ItemTemplate>
136-
<DataTemplate>
137-
<TextBlock Text="{Binding Short}" ToolTip.Tip="{Binding Full}" Margin="16,0,0,0"/>
138-
</DataTemplate>
139-
</ItemsControl.ItemTemplate>
140-
</ItemsControl>
141-
</Expander>
142-
</DataTemplate>
143-
</ItemsControl.ItemTemplate>
144-
</ItemsControl>
122+
<StackPanel HorizontalAlignment="Stretch" Spacing="6">
123+
<TextBlock TextWrapping="Wrap" Foreground="#AAAAAA" FontSize="12"
124+
Text="No MCP servers configured yet. Click ⚙ to open mcp_servers.json and add your servers using Semantic Developer's JSON format."
125+
IsVisible="{Binding HasNoMcpServers}"/>
126+
<TextBlock TextWrapping="Wrap" Foreground="#AAAAAA" FontSize="12"
127+
Text="MCP support is currently disabled. Enable it under CLI Settings so selected servers are passed to Codex."
128+
IsVisible="{Binding IsMcpDisabled}"/>
129+
<ItemsControl ItemsSource="{Binding McpServers}" HorizontalAlignment="Stretch">
130+
<ItemsControl.ItemTemplate>
131+
<DataTemplate>
132+
<Expander IsExpanded="False" Padding="0" Margin="0,2,0,2" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch">
133+
<Expander.Header>
134+
<Grid ColumnDefinitions="Auto,6,*" Margin="0">
135+
<!-- Slightly smaller checkbox to reduce visual weight -->
136+
<CheckBox Grid.Column="0" IsChecked="{Binding Selected, Mode=TwoWay}" VerticalAlignment="Center" FontSize="10"/>
137+
<Border Grid.Column="1"/>
138+
<TextBlock Grid.Column="2" Text="{Binding Name}" VerticalAlignment="Center"/>
139+
</Grid>
140+
</Expander.Header>
141+
<ItemsControl ItemsSource="{Binding Tools}" Margin="0,2,0,0" HorizontalAlignment="Stretch">
142+
<ItemsControl.ItemTemplate>
143+
<DataTemplate>
144+
<TextBlock Text="{Binding Short}" ToolTip.Tip="{Binding Full}" Margin="16,0,0,0"/>
145+
</DataTemplate>
146+
</ItemsControl.ItemTemplate>
147+
</ItemsControl>
148+
</Expander>
149+
</DataTemplate>
150+
</ItemsControl.ItemTemplate>
151+
</ItemsControl>
152+
</StackPanel>
145153
</ScrollViewer>
146154
</Grid>
147155
</Border>

SemanticDeveloper/SemanticDeveloper/MainWindow.axaml.cs

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ public MainWindow()
108108

109109
DataContext = this;
110110

111+
McpServers.CollectionChanged += (_, __) =>
112+
{
113+
OnPropertyChanged(nameof(HasMcpServers));
114+
OnPropertyChanged(nameof(HasNoMcpServers));
115+
};
116+
111117
// Capture Enter/Shift+Enter on the CLI input box before default handling
112118
try
113119
{
@@ -216,6 +222,9 @@ void AddOrUpdate(string name)
216222
}
217223
}
218224
catch { }
225+
226+
OnPropertyChanged(nameof(HasMcpServers));
227+
OnPropertyChanged(nameof(HasNoMcpServers));
219228
}
220229

221230
private async void OnCliInputPreviewKeyDown(object? sender, KeyEventArgs e)
@@ -289,9 +298,20 @@ public string ShellPromptPath
289298
public bool IsMcpEnabled
290299
{
291300
get => _mcpEnabled;
292-
set { if (_mcpEnabled == value) return; _mcpEnabled = value; OnPropertyChanged(); }
301+
set
302+
{
303+
if (_mcpEnabled == value) return;
304+
_mcpEnabled = value;
305+
OnPropertyChanged();
306+
OnPropertyChanged(nameof(IsMcpDisabled));
307+
}
293308
}
294309

310+
public bool IsMcpDisabled => !_mcpEnabled;
311+
312+
public bool HasMcpServers => McpServers.Count > 0;
313+
public bool HasNoMcpServers => McpServers.Count == 0;
314+
295315
// Exposed tool names for the MCP panel
296316
public ObservableCollection<string> McpToolNames { get; } = new();
297317
public ObservableCollection<McpServerEntry> McpServers { get; } = new();
@@ -1232,7 +1252,7 @@ private async Task CheckCodexVersionAsync()
12321252

12331253
if (CodexVersionService.IsNewer(latest.Version, installed.Version))
12341254
{
1235-
AppendCliLog($"System: Codex {latest.Version} is available (installed {installed.Version}). Run 'codex update' to upgrade.");
1255+
AppendCliLog($"System: Codex {latest.Version} is available (installed {installed.Version}). Update with 'npm install -g @openai/codex@latest' or 'brew upgrade codex'.");
12361256
}
12371257
}
12381258
catch
@@ -2774,23 +2794,19 @@ private void OnOpenReadmeClick(object? sender, Avalonia.Interactivity.RoutedEven
27742794
{
27752795
try
27762796
{
2777-
var baseDir = AppContext.BaseDirectory;
2778-
var candidates = new[] { "README.md", "README.txt", "README" };
2779-
foreach (var name in candidates)
2797+
const string readmeUrl = "https://github.com/semantic-developer/SemanticDeveloper?tab=readme-ov-file";
2798+
if (OperatingSystem.IsWindows())
27802799
{
2781-
var p = System.IO.Path.Combine(baseDir, name);
2782-
if (System.IO.File.Exists(p))
2783-
{
2784-
if (OperatingSystem.IsWindows())
2785-
Process.Start(new ProcessStartInfo { FileName = p, UseShellExecute = true });
2786-
else if (OperatingSystem.IsMacOS())
2787-
Process.Start("open", p);
2788-
else
2789-
Process.Start("xdg-open", p);
2790-
return;
2791-
}
2800+
Process.Start(new ProcessStartInfo { FileName = readmeUrl, UseShellExecute = true });
2801+
}
2802+
else if (OperatingSystem.IsMacOS())
2803+
{
2804+
Process.Start("open", readmeUrl);
2805+
}
2806+
else
2807+
{
2808+
Process.Start("xdg-open", readmeUrl);
27922809
}
2793-
AppendCliLog("System: README not found in output directory.");
27942810
}
27952811
catch (Exception ex)
27962812
{

SemanticDeveloper/SemanticDeveloper/SemanticDeveloper.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
77
<ApplicationManifest>app.manifest</ApplicationManifest>
88
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
9-
<Version>1.0.1</Version>
9+
<Version>1.0.2</Version>
1010
<Copyright>2025 Stainless Designer LLC</Copyright>
1111
</PropertyGroup>
1212

0 commit comments

Comments
 (0)