AX Agent 내부 설정 탭 분리와 테마 복구
Some checks failed
Release Gate / gate (push) Has been cancelled

- AX Agent 내부 설정에서 스킬/차단 탭을 도구, 스킬, 차단으로 분리하고 각 패널을 기능별로 재배치

- 공통 탭에 테마 스타일과 테마 모드를 실제 선택 카드 UI로 복구하고 기존 숨김 플레이스홀더를 제거

- 메인 설정 좌측의 AX Agent 이동 항목을 맨 아래로 재배치하고 README 및 DEVELOPMENT 문서 이력을 2026-04-05 15:06 (KST) 기준으로 갱신

- 검증: dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify\\ -p:IntermediateOutputPath=obj\\verify\\ / 경고 0 오류 0
This commit is contained in:
2026-04-05 13:39:44 +09:00
parent d102e17d47
commit d368ebf822
5 changed files with 231 additions and 84 deletions

View File

@@ -34,6 +34,14 @@ public partial class SettingsWindow : Window
_revertCallback = revertCallback;
DataContext = vm;
if (MainSettingsTab != null && AgentTabItem != null && MainSettingsTab.Items.Contains(AgentTabItem))
MainSettingsTab.Items.Remove(AgentTabItem);
if (MainSettingsTab != null && AgentShortcutTabItem != null && MainSettingsTab.Items.Contains(AgentShortcutTabItem))
{
MainSettingsTab.Items.Remove(AgentShortcutTabItem);
MainSettingsTab.Items.Add(AgentShortcutTabItem);
}
vm.ThemePreviewRequested += (_, _) => _previewCallback(vm.SelectedThemeKey);
vm.SaveCompleted += (_, _) =>
{
@@ -60,8 +68,11 @@ public partial class SettingsWindow : Window
BuildQuoteCategoryCheckboxes();
BuildDockBarSettings();
BuildTextActionCommandsPanel();
MoveBlockSectionToEtc();
BuildServiceModelPanels();
if (HasLegacyAgentTab())
{
MoveBlockSectionToEtc();
BuildServiceModelPanels();
}
// 스킬이 아직 로드되지 않았으면 백그라운드에서 로드 후 UI 구성
var app = System.Windows.Application.Current as App;
@@ -76,8 +87,11 @@ public partial class SettingsWindow : Window
});
}
BuildToolRegistryPanel();
LoadAdvancedSettings();
if (HasLegacyAgentTab())
{
BuildToolRegistryPanel();
LoadAdvancedSettings();
}
RefreshStorageInfo();
// 개발자 모드는 저장된 설정 유지 (끄면 하위 기능 모두 비활성)
UpdateDevModeContentVisibility();
@@ -85,10 +99,14 @@ public partial class SettingsWindow : Window
ApplyAiEnabledState(app?.SettingsService?.Settings.AiEnabled ?? false, init: true);
ApplyOperationModeState(app?.SettingsService?.Settings.OperationMode);
InitializeDisplayModeUi();
SyncAgentSelectionCards();
if (HasLegacyAgentTab())
SyncAgentSelectionCards();
};
}
private bool HasLegacyAgentTab()
=> MainSettingsTab != null && AgentTabItem != null && MainSettingsTab.Items.Contains(AgentTabItem);
private void SyncAgentSelectionCards()
{
var service = (_vm.LlmService ?? "").Trim().ToLowerInvariant();
@@ -139,8 +157,9 @@ public partial class SettingsWindow : Window
private void InitializeDisplayModeUi()
{
var app = System.Windows.Application.Current as App;
var saved = app?.SettingsService?.Settings?.Llm?.AgentUiExpressionLevel;
SetDisplayMode(saved ?? "balanced", persist: false);
if (app?.SettingsService?.Settings?.Llm != null)
app.SettingsService.Settings.Llm.AgentUiExpressionLevel = "rich";
SetDisplayMode("rich", persist: false);
}
private void DisplayMode_Checked(object sender, RoutedEventArgs e)
@@ -159,14 +178,7 @@ public partial class SettingsWindow : Window
private void AgentDisplayMode_Checked(object sender, RoutedEventArgs e)
{
if (_isDisplayModeSyncing) return;
var rb = sender as RadioButton;
var next = rb?.Name switch
{
"AgentDisplayModeRich" => "rich",
"AgentDisplayModeSimple" => "simple",
_ => "balanced",
};
SetDisplayMode(next, persist: true);
SetDisplayMode("rich", persist: true);
}
private void SetDisplayMode(string mode, bool persist)
@@ -195,7 +207,8 @@ public partial class SettingsWindow : Window
}
ApplyMainTabVisibility(mode);
ApplyAgentSubTabVisibility(mode);
if (HasLegacyAgentTab())
ApplyAgentSubTabVisibility(mode);
if (!persist) return;
var app = System.Windows.Application.Current as App;
@@ -210,11 +223,11 @@ public partial class SettingsWindow : Window
var simpleKeep = new HashSet<string>(StringComparer.OrdinalIgnoreCase)
{
"일반", "테마", "기능", "AX Agent"
"일반", "테마", "기능"
};
var balancedKeep = new HashSet<string>(StringComparer.OrdinalIgnoreCase)
{
"일반", "테마", "클립보드", "캡처", "시스템", "기능", "AX Agent"
"일반", "테마", "클립보드", "캡처", "시스템", "기능"
};
foreach (var item in MainSettingsTab.Items.OfType<TabItem>())
@@ -229,12 +242,6 @@ public partial class SettingsWindow : Window
if (string.Equals(header, "알림", StringComparison.OrdinalIgnoreCase))
visible = false;
if (string.Equals(header, "AX Agent", StringComparison.OrdinalIgnoreCase)
&& !((System.Windows.Application.Current as App)?.SettingsService?.Settings.AiEnabled ?? false))
{
visible = false;
}
item.Visibility = visible ? Visibility.Visible : Visibility.Collapsed;
}
@@ -2583,31 +2590,12 @@ public partial class SettingsWindow : Window
/// <summary>AI 기능 토글 상태를 UI와 설정에 반영합니다.</summary>
private void ApplyAiEnabledState(bool enabled, bool init = false)
{
// 토글 스위치 체크 상태 동기화 (init 시에는 이벤트 억제)
if (AiEnabledToggle != null && AiEnabledToggle.IsChecked != enabled)
{
AiEnabledToggle.IsChecked = enabled;
}
if (AgentAiEnabledToggle != null && AgentAiEnabledToggle.IsChecked != enabled)
{
AgentAiEnabledToggle.IsChecked = enabled;
}
if (AgentTabItem != null)
AgentTabItem.Visibility = enabled ? Visibility.Visible : Visibility.Collapsed;
ApplyMainTabVisibility(NormalizeDisplayMode((System.Windows.Application.Current as App)?.SettingsService?.Settings?.Llm?.AgentUiExpressionLevel));
}
public void SelectAgentSettingsTab()
{
if (AgentTabItem == null || MainSettingsTab == null || AgentTabItem.Visibility != Visibility.Visible)
return;
MainSettingsTab.SelectedItem = AgentTabItem;
if (AgentTabCommon != null)
AgentTabCommon.IsChecked = true;
AgentSubTab_Checked(this, new RoutedEventArgs());
Activate();
OpenAgentSettingsShortcut(closeAfterOpen: false);
}
private void BtnAgentSettingsBack_Click(object sender, RoutedEventArgs e)
@@ -2625,13 +2613,32 @@ public partial class SettingsWindow : Window
private void BtnAgentShortcut_Click(object sender, RoutedEventArgs e)
{
SelectAgentSettingsTab();
OpenAgentSettingsShortcut(closeAfterOpen: true);
}
private void MainSettingsTab_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (MainSettingsTab?.SelectedItem is not TabItem selected)
return;
if (!ReferenceEquals(selected, AgentShortcutTabItem))
return;
OpenAgentSettingsShortcut(closeAfterOpen: true);
}
private void OpenAgentSettingsShortcut(bool closeAfterOpen)
{
var app = System.Windows.Application.Current as App;
app?.OpenAgentSettingsInChat();
if (closeAfterOpen)
Close();
}
private void ApplyOperationModeState(string? mode)
{
var normalized = OperationModePolicy.Normalize(mode);
SyncOperationModeCombo(OperationModeCombo, normalized);
if (AgentOperationModeInternal != null) AgentOperationModeInternal.IsChecked = normalized == OperationModePolicy.InternalMode;
if (AgentOperationModeExternal != null) AgentOperationModeExternal.IsChecked = normalized == OperationModePolicy.ExternalMode;
}
@@ -2833,7 +2840,6 @@ public partial class SettingsWindow : Window
else
{
// 취소/실패 ? 토글 원상복구
if (AiEnabledToggle != null) AiEnabledToggle.IsChecked = false;
if (AgentAiEnabledToggle != null) AgentAiEnabledToggle.IsChecked = false;
}
}