AX Agent 계획 승인 UI를 테마에 맞게 정리하고 플랜 뷰어 상호작용을 개선
계획 확인 카드와 플랜 뷰어 하단 승인 영역을 AX Agent 테마 리소스 기준으로 다시 정리했다. 승인 카드의 표면/버튼/입력 패널 간격을 통일하고 플랜 뷰어에는 검토 안내 카드, 수정 요청 입력 패널, 테마 호버를 추가했다. README.md와 docs/DEVELOPMENT.md에 2026-04-10 08:47 (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:
1586
src/AxCopilot/Views/ChatWindow.AgentStatusPresentation.cs
Normal file
1586
src/AxCopilot/Views/ChatWindow.AgentStatusPresentation.cs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -859,11 +859,30 @@ internal sealed class PlanViewerWindow : Window
|
||||
_btnPanel.Children.Clear();
|
||||
var accentBrush = Application.Current.TryFindResource("AccentColor") as Brush
|
||||
?? new SolidColorBrush(Color.FromRgb(0x4B, 0x5E, 0xFC));
|
||||
var secondaryText = Application.Current.TryFindResource("SecondaryText") as Brush ?? Brushes.Gray;
|
||||
var accentColor = accentBrush is SolidColorBrush accentSolid ? accentSolid.Color : Color.FromRgb(0x4B, 0x5E, 0xFC);
|
||||
|
||||
var approveLabel = _uiExpressionLevel == "simple" ? "승인" : "승인 후 실행";
|
||||
var editLabel = _uiExpressionLevel == "simple" ? "수정" : "수정 피드백";
|
||||
var rejectLabel = _uiExpressionLevel == "simple" ? "취소" : "거부";
|
||||
|
||||
_btnPanel.Children.Add(new Border
|
||||
{
|
||||
Background = new SolidColorBrush(Color.FromArgb(0x16, accentColor.R, accentColor.G, accentColor.B)),
|
||||
BorderBrush = new SolidColorBrush(Color.FromArgb(0x40, accentColor.R, accentColor.G, accentColor.B)),
|
||||
BorderThickness = new Thickness(1),
|
||||
CornerRadius = new CornerRadius(10),
|
||||
Padding = new Thickness(12, 8, 12, 8),
|
||||
Margin = new Thickness(0, 0, 12, 0),
|
||||
Child = new TextBlock
|
||||
{
|
||||
Text = "검토가 끝나면 바로 실행하거나 방향만 짧게 남길 수 있습니다.",
|
||||
FontSize = 11.5,
|
||||
Foreground = secondaryText,
|
||||
TextWrapping = TextWrapping.Wrap,
|
||||
}
|
||||
});
|
||||
|
||||
var approveBtn = CreateActionButton("\uE73E", approveLabel, accentBrush, Brushes.White, true);
|
||||
approveBtn.MouseLeftButtonUp += (_, _) =>
|
||||
{
|
||||
@@ -904,20 +923,31 @@ internal sealed class PlanViewerWindow : Window
|
||||
|
||||
private void ShowEditInput()
|
||||
{
|
||||
var itemBackground = Application.Current.TryFindResource("ItemBackground") as Brush
|
||||
?? new SolidColorBrush(Color.FromRgb(0x2A, 0x2B, 0x40));
|
||||
var launcherBackground = Application.Current.TryFindResource("LauncherBackground") as Brush
|
||||
?? new SolidColorBrush(Color.FromRgb(0x1A, 0x1B, 0x2E));
|
||||
var primaryText = Application.Current.TryFindResource("PrimaryText") as Brush ?? Brushes.White;
|
||||
var secondaryText = Application.Current.TryFindResource("SecondaryText") as Brush ?? Brushes.Gray;
|
||||
var borderBrush = Application.Current.TryFindResource("BorderColor") as Brush ?? Brushes.Gray;
|
||||
var accentBrush = Application.Current.TryFindResource("AccentColor") as Brush
|
||||
?? new SolidColorBrush(Color.FromRgb(0x4B, 0x5E, 0xFC));
|
||||
|
||||
var editPanel = new Border
|
||||
{
|
||||
Margin = new Thickness(20, 0, 20, 12),
|
||||
Padding = new Thickness(12, 8, 12, 8),
|
||||
CornerRadius = new CornerRadius(10),
|
||||
Background = Application.Current.TryFindResource("ItemBackground") as Brush
|
||||
?? new SolidColorBrush(Color.FromRgb(0x2A, 0x2B, 0x40)),
|
||||
Padding = new Thickness(14, 12, 14, 12),
|
||||
CornerRadius = new CornerRadius(12),
|
||||
Background = itemBackground,
|
||||
BorderBrush = borderBrush,
|
||||
BorderThickness = new Thickness(1),
|
||||
};
|
||||
var editStack = new StackPanel();
|
||||
editStack.Children.Add(new TextBlock
|
||||
{
|
||||
Text = "수정 사항을 입력하세요:",
|
||||
Text = "어떤 방향으로 바꾸면 좋을지 짧게 남겨주세요.",
|
||||
FontSize = 11.5,
|
||||
Foreground = Application.Current.TryFindResource("SecondaryText") as Brush ?? Brushes.Gray,
|
||||
Foreground = secondaryText,
|
||||
Margin = new Thickness(0, 0, 0, 6),
|
||||
});
|
||||
var textBox = new TextBox
|
||||
@@ -927,29 +957,32 @@ internal sealed class PlanViewerWindow : Window
|
||||
AcceptsReturn = true,
|
||||
TextWrapping = TextWrapping.Wrap,
|
||||
FontSize = 13,
|
||||
Background = Application.Current.TryFindResource("LauncherBackground") as Brush
|
||||
?? new SolidColorBrush(Color.FromRgb(0x1A, 0x1B, 0x2E)),
|
||||
Foreground = Application.Current.TryFindResource("PrimaryText") as Brush ?? Brushes.White,
|
||||
CaretBrush = Application.Current.TryFindResource("PrimaryText") as Brush ?? Brushes.White,
|
||||
BorderBrush = Application.Current.TryFindResource("BorderColor") as Brush ?? Brushes.Gray,
|
||||
Background = launcherBackground,
|
||||
Foreground = primaryText,
|
||||
CaretBrush = primaryText,
|
||||
BorderBrush = borderBrush,
|
||||
BorderThickness = new Thickness(1),
|
||||
Padding = new Thickness(10, 8, 10, 8),
|
||||
};
|
||||
editStack.Children.Add(textBox);
|
||||
|
||||
var accentBrush = Application.Current.TryFindResource("AccentColor") as Brush
|
||||
?? new SolidColorBrush(Color.FromRgb(0x4B, 0x5E, 0xFC));
|
||||
var actionRow = new StackPanel
|
||||
{
|
||||
Orientation = Orientation.Horizontal,
|
||||
HorizontalAlignment = HorizontalAlignment.Right,
|
||||
Margin = new Thickness(0, 8, 0, 0),
|
||||
};
|
||||
|
||||
var sendBtn = new Border
|
||||
{
|
||||
Background = accentBrush,
|
||||
CornerRadius = new CornerRadius(8),
|
||||
Padding = new Thickness(14, 6, 14, 6),
|
||||
Margin = new Thickness(0, 8, 0, 0),
|
||||
Margin = new Thickness(0, 0, 8, 0),
|
||||
Cursor = Cursors.Hand,
|
||||
HorizontalAlignment = HorizontalAlignment.Right,
|
||||
Child = new TextBlock
|
||||
{
|
||||
Text = "전송", FontSize = 12.5, FontWeight = FontWeights.SemiBold, Foreground = Brushes.White,
|
||||
Text = "수정 요청 보내기", FontSize = 12.5, FontWeight = FontWeights.SemiBold, Foreground = Brushes.White,
|
||||
},
|
||||
};
|
||||
sendBtn.MouseEnter += (s, _) => ((Border)s).Opacity = 0.85;
|
||||
@@ -960,7 +993,36 @@ internal sealed class PlanViewerWindow : Window
|
||||
if (string.IsNullOrEmpty(feedback)) return;
|
||||
_tcs?.TrySetResult(feedback);
|
||||
};
|
||||
editStack.Children.Add(sendBtn);
|
||||
actionRow.Children.Add(sendBtn);
|
||||
|
||||
var closeBtn = new Border
|
||||
{
|
||||
Background = Brushes.Transparent,
|
||||
BorderBrush = borderBrush,
|
||||
BorderThickness = new Thickness(1),
|
||||
CornerRadius = new CornerRadius(8),
|
||||
Padding = new Thickness(14, 6, 14, 6),
|
||||
Cursor = Cursors.Hand,
|
||||
Child = new TextBlock
|
||||
{
|
||||
Text = "닫기",
|
||||
FontSize = 12.5,
|
||||
FontWeight = FontWeights.SemiBold,
|
||||
Foreground = secondaryText,
|
||||
},
|
||||
};
|
||||
closeBtn.MouseEnter += (s, _) => ((Border)s).Background = itemBackground;
|
||||
closeBtn.MouseLeave += (s, _) => ((Border)s).Background = Brushes.Transparent;
|
||||
closeBtn.MouseLeftButtonUp += (_, _) =>
|
||||
{
|
||||
if (editPanel.Parent is Grid grid)
|
||||
{
|
||||
grid.Children.Remove(editPanel);
|
||||
_btnPanel.Margin = new Thickness(20, 12, 20, 16);
|
||||
}
|
||||
};
|
||||
actionRow.Children.Add(closeBtn);
|
||||
editStack.Children.Add(actionRow);
|
||||
editPanel.Child = editStack;
|
||||
|
||||
if (_btnPanel.Parent is Grid parentGrid)
|
||||
@@ -1008,10 +1070,12 @@ internal sealed class PlanViewerWindow : Window
|
||||
Brush textColor, bool filled)
|
||||
{
|
||||
var color = ((SolidColorBrush)borderColor).Color;
|
||||
var hoverBg = Application.Current?.TryFindResource("ItemHoverBackground") as Brush
|
||||
?? new SolidColorBrush(Color.FromArgb(0x18, 0xFF, 0xFF, 0xFF));
|
||||
var btn = new Border
|
||||
{
|
||||
CornerRadius = new CornerRadius(12),
|
||||
Padding = new Thickness(16, 8, 16, 8),
|
||||
CornerRadius = new CornerRadius(14),
|
||||
Padding = new Thickness(16, 9, 16, 9),
|
||||
Margin = new Thickness(4, 0, 4, 0),
|
||||
Cursor = Cursors.Hand,
|
||||
Background = filled ? borderColor
|
||||
@@ -1033,8 +1097,20 @@ internal sealed class PlanViewerWindow : Window
|
||||
Foreground = filled ? Brushes.White : textColor,
|
||||
});
|
||||
btn.Child = sp;
|
||||
btn.MouseEnter += (s, _) => ((Border)s).Opacity = 0.85;
|
||||
btn.MouseLeave += (s, _) => ((Border)s).Opacity = 1.0;
|
||||
btn.MouseEnter += (s, _) =>
|
||||
{
|
||||
var border = (Border)s;
|
||||
border.Opacity = 0.96;
|
||||
if (!filled)
|
||||
border.Background = hoverBg;
|
||||
};
|
||||
btn.MouseLeave += (s, _) =>
|
||||
{
|
||||
var border = (Border)s;
|
||||
border.Opacity = 1.0;
|
||||
if (!filled)
|
||||
border.Background = new SolidColorBrush(Color.FromArgb(0x18, color.R, color.G, color.B));
|
||||
};
|
||||
return btn;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user