Skip to content
Merged
Show file tree
Hide file tree
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
11 changes: 11 additions & 0 deletions desktop/macos/AgentDockApp/Resources/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -346,3 +346,14 @@
"Change interface language?" = "Change interface language?";
"Changing the interface language restarts the AgentDock interface. Any unsaved changes in this window will be lost." = "Changing the interface language restarts the AgentDock interface. Any unsaved changes in this window will be lost.";
"Continue" = "Continue";
"Add" = "Add";
"Add custom ACP" = "Add custom ACP";
"Agent name" = "ACP name";
"Agent name cannot be empty." = "ACP name cannot be empty.";
"Default ACP" = "Default ACP";
"Delete" = "Delete";
"Edit custom ACP" = "Edit custom ACP";
"Name" = "Name";
"Command" = "Command";
"Args JSON" = "Args JSON";
"Save" = "Save";
Original file line number Diff line number Diff line change
Expand Up @@ -346,3 +346,14 @@
"Change interface language?" = "切换界面语言?";
"Changing the interface language restarts the AgentDock interface. Any unsaved changes in this window will be lost." = "切换界面语言会重启 AgentDock 界面,此窗口中未保存的更改将会丢失。";
"Continue" = "继续";
"Add" = "添加";
"Add custom ACP" = "添加自定义ACP";
"Agent name" = "ACP 名称";
"Agent name cannot be empty." = "ACP 名称不能为空。";
"Default ACP" = "默认 ACP";
"Delete" = "删除";
"Edit custom ACP" = "编辑自定义ACP";
"Name" = "名称";
"Command" = "命令";
"Args JSON" = "参数 JSON";
"Save" = "保存";
2 changes: 2 additions & 0 deletions desktop/macos/AgentDockApp/Sources/ACPConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ enum ACPAgentPreset: String, CaseIterable, Codable {

struct ACPProfileConfiguration: Codable, Equatable {
var id: String
var displayName: String? = nil
var kind: ACPAgentPreset
var command: String
var args: [String]
Expand All @@ -360,6 +361,7 @@ struct ACPProfileConfiguration: Codable, Equatable {

enum CodingKeys: String, CodingKey {
case id
case displayName = "display_name"
case kind
case command
case args
Expand Down
647 changes: 346 additions & 301 deletions desktop/macos/AgentDockApp/Sources/AdvancedSettingsWindowController.swift

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ struct EditableServiceSettings {
guard seen.insert(profile.id).inserted else {
throw ValidationError(L10n.format("Duplicate Coding Agent profile ID: %@", profile.id))
}
if profile.kind == .custom {
let displayName = profile.displayName?.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
profile.displayName = displayName.isEmpty ? profile.id : displayName
} else {
profile.displayName = nil
}
switch profile.kind {
case .codex, .claude, .grok:
guard profile.id == profile.kind.rawValue else {
Expand Down
88 changes: 28 additions & 60 deletions desktop/windows/control-panel/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,22 +167,22 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Text="{local:Loc Port}" VerticalAlignment="Center" Margin="0,0,0,10" />
<TextBox x:Name="PortTextBox" Grid.Column="1" Width="130" HorizontalAlignment="Left" Margin="0,0,0,10" />
<TextBlock Text="{local:Loc LogLevel}" Grid.Row="1" VerticalAlignment="Center" Margin="0,0,0,10" />
<ComboBox x:Name="LogLevelComboBox" Grid.Row="1" Grid.Column="1" Width="180" HorizontalAlignment="Left" Margin="0,0,0,10">
<CheckBox x:Name="McpAppsEnabledCheckBox" Grid.Row="0" Grid.ColumnSpan="2" Content="{local:Loc EnableMcpAppsUi}" Margin="0,4,0,12" />
<TextBlock Text="{local:Loc Port}" Grid.Row="1" VerticalAlignment="Center" Margin="0,0,0,10" />
<TextBox x:Name="PortTextBox" Grid.Row="1" Grid.Column="1" Width="130" HorizontalAlignment="Left" Margin="0,0,0,10" />
<TextBlock Text="{local:Loc LogLevel}" Grid.Row="2" VerticalAlignment="Center" Margin="0,0,0,10" />
<ComboBox x:Name="LogLevelComboBox" Grid.Row="2" Grid.Column="1" Width="180" HorizontalAlignment="Left" Margin="0,0,0,10">
<ComboBoxItem Content="debug" />
<ComboBoxItem Content="info" />
<ComboBoxItem Content="warn" />
<ComboBoxItem Content="error" />
</ComboBox>
<TextBlock Text="{local:Loc InterfaceLanguage}" Grid.Row="2" VerticalAlignment="Center" Margin="0,0,0,10" />
<ComboBox x:Name="LanguageComboBox" Grid.Row="2" Grid.Column="1" Width="180" HorizontalAlignment="Left" Margin="0,0,0,10" SelectionChanged="LanguageComboBox_SelectionChanged">
<TextBlock Text="{local:Loc InterfaceLanguage}" Grid.Row="3" VerticalAlignment="Center" Margin="0,0,0,4" />
<ComboBox x:Name="LanguageComboBox" Grid.Row="3" Grid.Column="1" Width="180" HorizontalAlignment="Left" Margin="0,0,0,4" SelectionChanged="LanguageComboBox_SelectionChanged">
<ComboBoxItem Content="{local:Loc FollowSystem}" Tag="system" />
<ComboBoxItem Content="{local:Loc SimplifiedChinese}" Tag="zh-CN" />
<ComboBoxItem Content="{local:Loc EnglishLanguage}" Tag="en" />
</ComboBox>
<CheckBox x:Name="McpAppsEnabledCheckBox" Grid.Row="3" Grid.ColumnSpan="2" Content="{local:Loc EnableMcpAppsUi}" Margin="0,4,0,4" />
</Grid>
</GroupBox>

Expand Down Expand Up @@ -233,59 +233,27 @@
</GroupBox>

<GroupBox Header="{local:Loc CodingAgentAcp}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<CheckBox x:Name="AcpEnabledCheckBox" Grid.ColumnSpan="3" Content="{local:Loc EnableCodingAgent}" Margin="0,4,0,12" Checked="AcpSetting_Changed" Unchecked="AcpSetting_Changed" />

<TextBlock Grid.Row="1" Text="Profile" VerticalAlignment="Center" Margin="0,0,0,10" />
<ComboBox x:Name="AcpProfileComboBox" Grid.Row="1" Grid.Column="1" Width="260" HorizontalAlignment="Left" Margin="0,0,0,10" SelectionChanged="AcpProfile_Changed" />
<StackPanel Grid.Row="1" Grid.Column="2" Orientation="Horizontal" Margin="8,0,0,10">
<ComboBox x:Name="AcpAddProfileComboBox" Width="110" SelectionChanged="AcpAddProfile_Changed">
<ComboBoxItem Content="Add…" Tag="" />
<ComboBoxItem Content="Codex" Tag="codex" />
<ComboBoxItem Content="Claude" Tag="claude" />
<ComboBoxItem Content="Grok Build" Tag="grok" />
<ComboBoxItem Content="{local:Loc Custom}" Tag="custom" />
</ComboBox>
<Button x:Name="AcpRemoveProfileButton" Content="Remove" Margin="8,0,0,0" Padding="10,2" Click="AcpRemoveProfile_Click" />
</StackPanel>

<TextBlock Grid.Row="2" Text="Profile ID" VerticalAlignment="Center" Margin="0,0,0,10" />
<TextBox x:Name="AcpProfileIdTextBox" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Margin="0,0,0,10" TextChanged="AcpSetting_Changed" />

<StackPanel Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" Orientation="Horizontal" Margin="0,0,0,10">
<CheckBox x:Name="AcpProfileEnabledCheckBox" Content="Enabled" Margin="0,0,18,0" Checked="AcpProfileFlag_Changed" Unchecked="AcpProfileFlag_Changed" />
<CheckBox x:Name="AcpProfileDefaultCheckBox" Content="Default" Checked="AcpProfileFlag_Changed" Unchecked="AcpProfileFlag_Changed" />
</StackPanel>

<TextBlock Grid.Row="4" Text="Type" VerticalAlignment="Center" Margin="0,0,0,10" />
<ComboBox x:Name="AcpAgentComboBox" Grid.Row="4" Grid.Column="1" Width="180" HorizontalAlignment="Left" Margin="0,0,0,10" SelectionChanged="AcpSetting_Changed" IsEnabled="False">
<ComboBoxItem Content="Codex" Tag="codex" />
<ComboBoxItem Content="Claude" Tag="claude" />
<ComboBoxItem Content="Grok Build" Tag="grok" />
<ComboBoxItem Content="{local:Loc Custom}" Tag="custom" />
</ComboBox>
<TextBlock x:Name="AcpCommandLabel" Grid.Row="5" Text="Command" VerticalAlignment="Center" Margin="0,0,0,10" />
<TextBox x:Name="AcpCommandTextBox" Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="2" Margin="0,0,0,10" TextChanged="AcpSetting_Changed" ToolTip="{local:Loc AcpCommandTooltip}" />
<TextBlock x:Name="AcpArgsLabel" Grid.Row="6" Text="Args JSON" VerticalAlignment="Center" Margin="0,0,0,10" />
<TextBox x:Name="AcpArgsTextBox" Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="2" Margin="0,0,0,10" Text="[]" TextChanged="AcpSetting_Changed" ToolTip="{local:Loc AcpArgsTooltip}" />
<TextBlock Grid.Row="7" Text="{local:Loc Status}" VerticalAlignment="Top" />
<TextBlock x:Name="AcpStatusText" Grid.Row="7" Grid.Column="1" Grid.ColumnSpan="2" Foreground="#667085" Text="{local:Loc Disabled}" TextWrapping="Wrap" />
</Grid>
<StackPanel>
<CheckBox x:Name="AcpEnabledCheckBox" Content="{local:Loc EnableCodingAgent}" Margin="0,4,0,14" />
<Grid Margin="0,0,0,12">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Text="{local:Loc DefaultAcp}" VerticalAlignment="Center" Margin="0,0,12,0" />
<ComboBox x:Name="AcpDefaultProfileComboBox"
Grid.Column="1"
Width="240"
SelectionChanged="AcpDefaultProfile_SelectionChanged" />
</Grid>
<StackPanel x:Name="AcpProfileListPanel" />
<Button x:Name="AcpAddCustomProfileButton"
Content="{local:Loc AddCustomAcp}"
HorizontalAlignment="Left"
Margin="0,10,0,0"
Padding="10,4"
Click="AcpAddCustomProfile_Click" />
</StackPanel>
</GroupBox>

<GroupBox Header="{local:Loc RuntimePermissions}">
Expand Down
Loading