AX Agent 도구·스킬 정합성 재구성 및 실행 품질 보강
변경 목적: - AX Agent의 도구 이름, 내부 설정, 스킬 정책, 실행 루프 사이의 불일치를 줄이고 전체 동작 품질을 높인다. - claw-code 수준의 일관된 동작 품질을 참고하되 AX 구조에 맞는 고유한 카탈로그·정규화 레이어로 재구성한다. 핵심 수정사항: - 도구 canonical id, legacy alias, 탭 노출, 설정 카테고리, read-only 분류를 중앙 카탈로그로 통합했다. - ToolRegistry, AgentLoopService, 병렬 실행 분류, 권한 처리, 훅 처리, 스킬 allowed-tools 해석이 같은 이름 체계를 사용하도록 정리했다. - Agent 설정/일반 설정/도움말의 도구 카드와 훅 편집기, 스킬 설명을 현재 런타임 구조에 맞게 갱신했다. - 컨텍스트 압축, intent gate, spawn agents, session learning, model prompt adapter, workspace context 관련 변경과 테스트 추가를 함께 반영했다. - 문서 이력과 비교/로드맵 문서를 최신 상태로 갱신했다. 검증 결과: - dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\verify_toolcat\ -p:IntermediateOutputPath=obj\verify_toolcat\ : 경고 0 / 오류 0 - dotnet test src/AxCopilot.Tests/AxCopilot.Tests.csproj -c Release -v minimal --filter AgentToolCatalogTests -p:OutputPath=bin\verify_toolcat_tests\ -p:IntermediateOutputPath=obj\verify_toolcat_tests\ : 통과 8
This commit is contained in:
@@ -85,7 +85,7 @@ public partial class ChatWindow
|
||||
private void ApplyPermissionLevel(string level)
|
||||
{
|
||||
_settings.Settings.Llm.FilePermission = PermissionModeCatalog.NormalizeGlobalMode(level);
|
||||
try { _settings.Save(); } catch { }
|
||||
ScheduleSettingsSave();
|
||||
_appState.LoadFromSettings(_settings);
|
||||
UpdatePermissionUI();
|
||||
SaveConversationSettings();
|
||||
@@ -97,6 +97,14 @@ public partial class ChatWindow
|
||||
private void BtnPermission_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (PermissionPopup == null) return;
|
||||
|
||||
// Dynamically retarget popup to whichever button was clicked (FolderBar or Inline)
|
||||
if (sender is UIElement clickedElement &&
|
||||
(ReferenceEquals(clickedElement, BtnPermissionInline) || ReferenceEquals(clickedElement, BtnPermission)))
|
||||
{
|
||||
PermissionPopup.PlacementTarget = clickedElement;
|
||||
}
|
||||
|
||||
InitPermissionPanelDelegation();
|
||||
_lastHoveredPermBorder = null;
|
||||
PermissionItems.Children.Clear();
|
||||
@@ -233,7 +241,7 @@ public partial class ChatWindow
|
||||
toolPermissions[existingKey ?? toolName] = PermissionModeCatalog.NormalizeToolOverride(mode);
|
||||
}
|
||||
|
||||
try { _settings.Save(); } catch { }
|
||||
ScheduleSettingsSave();
|
||||
_appState.LoadFromSettings(_settings);
|
||||
UpdatePermissionUI();
|
||||
SaveConversationSettings();
|
||||
@@ -257,7 +265,37 @@ public partial class ChatWindow
|
||||
{
|
||||
var map = _settings.Settings.Llm.PermissionPopupSections ??= new Dictionary<string, bool>(StringComparer.OrdinalIgnoreCase);
|
||||
map[sectionKey] = expanded;
|
||||
try { _settings.Save(); } catch { }
|
||||
ScheduleSettingsSave();
|
||||
}
|
||||
|
||||
/// <summary>Shift+Tab으로 권한 모드를 순환합니다 (Claude Code 스타일).</summary>
|
||||
private void CyclePermissionMode()
|
||||
{
|
||||
var llm = _settings.Settings.Llm;
|
||||
llm.FilePermission = NextPermission(llm.FilePermission);
|
||||
ScheduleSettingsSave();
|
||||
_appState.LoadFromSettings(_settings);
|
||||
UpdatePermissionUI();
|
||||
SaveConversationSettings();
|
||||
RefreshInlineSettingsPanel();
|
||||
|
||||
// Toast 알림
|
||||
var label = PermissionModeCatalog.ToDisplayLabel(llm.FilePermission);
|
||||
var icon = PermissionModeCatalog.NormalizeGlobalMode(llm.FilePermission) switch
|
||||
{
|
||||
"Plan" => "\uE769",
|
||||
"AcceptEdits" => "\uE73E",
|
||||
"BypassPermissions" => "\uE7BA",
|
||||
"Deny" => "\uE711",
|
||||
_ => "\uE8D7",
|
||||
};
|
||||
ShowToast(label, icon);
|
||||
}
|
||||
|
||||
private void PlanModeBannerClose_Click(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (PlanModeBanner != null)
|
||||
PlanModeBanner.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
private void BtnPermissionTopBannerClose_Click(object sender, RoutedEventArgs e)
|
||||
@@ -269,18 +307,26 @@ public partial class ChatWindow
|
||||
private void UpdatePermissionUI()
|
||||
{
|
||||
if (PermissionLabel == null || PermissionIcon == null) return;
|
||||
|
||||
// 계획 모드 배너 기본 숨김 — Plan 분기에서만 표시
|
||||
if (PlanModeBanner != null)
|
||||
PlanModeBanner.Visibility = Visibility.Collapsed;
|
||||
|
||||
ChatConversation? currentConversation;
|
||||
lock (_convLock) currentConversation = _currentConversation;
|
||||
var summary = _appState.GetPermissionSummary(currentConversation);
|
||||
var perm = PermissionModeCatalog.NormalizeGlobalMode(summary.EffectiveMode);
|
||||
PermissionLabel.Text = PermissionModeCatalog.ToDisplayLabel(perm);
|
||||
if (PermissionLabelInline != null) PermissionLabelInline.Text = PermissionLabel.Text;
|
||||
PermissionIcon.Text = perm switch
|
||||
{
|
||||
"AcceptEdits" => "\uE73E",
|
||||
"Plan" => "\uE769",
|
||||
"BypassPermissions" => "\uE7BA",
|
||||
"Deny" => "\uE711",
|
||||
_ => "\uE8D7",
|
||||
};
|
||||
if (PermissionIconInline != null) PermissionIconInline.Text = PermissionIcon.Text;
|
||||
if (BtnPermission != null)
|
||||
{
|
||||
var operationMode = OperationModePolicy.Normalize(_settings.Settings.OperationMode);
|
||||
@@ -296,7 +342,9 @@ public partial class ChatWindow
|
||||
{
|
||||
var activeColor = new SolidColorBrush(Color.FromRgb(0x10, 0x7C, 0x10));
|
||||
PermissionLabel.Foreground = activeColor;
|
||||
if (PermissionLabelInline != null) PermissionLabelInline.Foreground = activeColor;
|
||||
PermissionIcon.Foreground = activeColor;
|
||||
if (PermissionIconInline != null) PermissionIconInline.Foreground = activeColor;
|
||||
if (BtnPermission != null)
|
||||
BtnPermission.BorderBrush = BrushFromHex("#86EFAC");
|
||||
if (PermissionTopBanner != null)
|
||||
@@ -314,7 +362,9 @@ public partial class ChatWindow
|
||||
{
|
||||
var denyColor = new SolidColorBrush(Color.FromRgb(0x10, 0x7C, 0x10));
|
||||
PermissionLabel.Foreground = denyColor;
|
||||
if (PermissionLabelInline != null) PermissionLabelInline.Foreground = denyColor;
|
||||
PermissionIcon.Foreground = denyColor;
|
||||
if (PermissionIconInline != null) PermissionIconInline.Foreground = denyColor;
|
||||
if (BtnPermission != null)
|
||||
BtnPermission.BorderBrush = BrushFromHex("#86EFAC");
|
||||
if (PermissionTopBanner != null)
|
||||
@@ -324,15 +374,40 @@ public partial class ChatWindow
|
||||
PermissionTopBannerIcon.Foreground = denyColor;
|
||||
PermissionTopBannerTitle.Text = "현재 권한 모드 · 읽기 전용";
|
||||
PermissionTopBannerTitle.Foreground = denyColor;
|
||||
PermissionTopBannerText.Text = "파일 읽기만 허용하고 생성, 수정, 삭제는 차단합니다.";
|
||||
PermissionTopBannerText.Text = "기존 파일은 읽기만 가능하며 수정/삭제가 차단되고, 새 파일 생성은 가능합니다.";
|
||||
PermissionTopBanner.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
}
|
||||
else if (perm == PermissionModeCatalog.Plan)
|
||||
{
|
||||
var planColor = new SolidColorBrush(Color.FromRgb(0xD9, 0x77, 0x06));
|
||||
PermissionLabel.Foreground = planColor;
|
||||
if (PermissionLabelInline != null) PermissionLabelInline.Foreground = planColor;
|
||||
PermissionIcon.Foreground = planColor;
|
||||
if (PermissionIconInline != null) PermissionIconInline.Foreground = planColor;
|
||||
if (BtnPermission != null)
|
||||
BtnPermission.BorderBrush = BrushFromHex("#FDE68A");
|
||||
if (PermissionTopBanner != null)
|
||||
{
|
||||
PermissionTopBanner.BorderBrush = BrushFromHex("#FDE68A");
|
||||
PermissionTopBannerIcon.Text = "\uE769";
|
||||
PermissionTopBannerIcon.Foreground = planColor;
|
||||
PermissionTopBannerTitle.Text = "현재 권한 모드 · 계획 모드";
|
||||
PermissionTopBannerTitle.Foreground = planColor;
|
||||
PermissionTopBannerText.Text = "파일을 읽고 분석한 뒤, 실행 전에 계획을 먼저 보여줍니다.";
|
||||
PermissionTopBanner.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
// 계획 모드 배너 표시
|
||||
if (PlanModeBanner != null)
|
||||
PlanModeBanner.Visibility = Visibility.Visible;
|
||||
}
|
||||
else if (perm == PermissionModeCatalog.BypassPermissions)
|
||||
{
|
||||
var autoColor = new SolidColorBrush(Color.FromRgb(0xC2, 0x41, 0x0C));
|
||||
PermissionLabel.Foreground = autoColor;
|
||||
if (PermissionLabelInline != null) PermissionLabelInline.Foreground = autoColor;
|
||||
PermissionIcon.Foreground = autoColor;
|
||||
if (PermissionIconInline != null) PermissionIconInline.Foreground = autoColor;
|
||||
if (BtnPermission != null)
|
||||
BtnPermission.BorderBrush = BrushFromHex("#FDBA74");
|
||||
if (PermissionTopBanner != null)
|
||||
@@ -351,7 +426,9 @@ public partial class ChatWindow
|
||||
var defaultFg = BrushFromHex("#2563EB");
|
||||
var iconFg = new SolidColorBrush(Color.FromRgb(0x25, 0x63, 0xEB));
|
||||
PermissionLabel.Foreground = defaultFg;
|
||||
if (PermissionLabelInline != null) PermissionLabelInline.Foreground = defaultFg;
|
||||
PermissionIcon.Foreground = iconFg;
|
||||
if (PermissionIconInline != null) PermissionIconInline.Foreground = iconFg;
|
||||
if (BtnPermission != null)
|
||||
BtnPermission.BorderBrush = BrushFromHex("#BFDBFE");
|
||||
if (PermissionTopBanner != null)
|
||||
|
||||
Reference in New Issue
Block a user