권한 요청과 도구 결과 transcript 안내를 단순 보조 문구에서 callout 카드 구조로 정리했습니다. 권한 요청은 확인 포인트, 도구 결과는 다음 권장 작업으로 보여주도록 바꿔 카드 성격 차이를 더 분명하게 만들었습니다. README와 DEVELOPMENT 문서를 갱신했고 dotnet build 기준 경고 0 / 오류 0을 확인했습니다.
This commit is contained in:
@@ -83,6 +83,40 @@ public partial class ChatWindow
|
||||
};
|
||||
}
|
||||
|
||||
private Border CreateAgentMetaCallout(string title, string body, Brush titleBrush, Brush background, Brush borderBrush)
|
||||
{
|
||||
return new Border
|
||||
{
|
||||
Background = background,
|
||||
BorderBrush = borderBrush,
|
||||
BorderThickness = new Thickness(1),
|
||||
CornerRadius = new CornerRadius(8),
|
||||
Padding = new Thickness(7, 5, 7, 5),
|
||||
Margin = new Thickness(11, 2, 0, 0),
|
||||
Child = new StackPanel
|
||||
{
|
||||
Children =
|
||||
{
|
||||
new TextBlock
|
||||
{
|
||||
Text = title,
|
||||
FontSize = 7.75,
|
||||
FontWeight = FontWeights.SemiBold,
|
||||
Foreground = titleBrush,
|
||||
},
|
||||
new TextBlock
|
||||
{
|
||||
Text = body,
|
||||
FontSize = 8.1,
|
||||
Foreground = TryFindResource("SecondaryText") as Brush ?? Brushes.DimGray,
|
||||
TextWrapping = TextWrapping.Wrap,
|
||||
Margin = new Thickness(0, 1, 0, 0),
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private static string GetPermissionKindLabel(string kind)
|
||||
{
|
||||
return kind switch
|
||||
@@ -215,14 +249,47 @@ public partial class ChatWindow
|
||||
if (!string.IsNullOrWhiteSpace(guidance))
|
||||
{
|
||||
var clipped = guidance.Length > 92 ? guidance[..92] + "..." : guidance;
|
||||
stack.Children.Add(new TextBlock
|
||||
if (permissionPresentation != null)
|
||||
{
|
||||
Text = clipped,
|
||||
FontSize = 8.15,
|
||||
Foreground = secondaryText,
|
||||
TextWrapping = TextWrapping.Wrap,
|
||||
Margin = new Thickness(11, 1, 0, 0),
|
||||
});
|
||||
var titleBrush = string.Equals(permissionPresentation.Severity, "high", StringComparison.OrdinalIgnoreCase)
|
||||
? BrushFromHex("#B91C1C")
|
||||
: string.Equals(permissionPresentation.Severity, "medium", StringComparison.OrdinalIgnoreCase)
|
||||
? BrushFromHex("#A16207")
|
||||
: BrushFromHex("#2563EB");
|
||||
var background = string.Equals(permissionPresentation.Severity, "high", StringComparison.OrdinalIgnoreCase)
|
||||
? BrushFromHex("#FFF7F7")
|
||||
: string.Equals(permissionPresentation.Severity, "medium", StringComparison.OrdinalIgnoreCase)
|
||||
? BrushFromHex("#FFFBEB")
|
||||
: BrushFromHex("#EFF6FF");
|
||||
var border = string.Equals(permissionPresentation.Severity, "high", StringComparison.OrdinalIgnoreCase)
|
||||
? BrushFromHex("#FECACA")
|
||||
: string.Equals(permissionPresentation.Severity, "medium", StringComparison.OrdinalIgnoreCase)
|
||||
? BrushFromHex("#FDE68A")
|
||||
: BrushFromHex("#BFDBFE");
|
||||
stack.Children.Add(CreateAgentMetaCallout("확인 포인트", clipped, titleBrush, background, border));
|
||||
}
|
||||
else if (toolResultPresentation != null)
|
||||
{
|
||||
var titleBrush = string.Equals(toolResultPresentation.StatusKind, "error", StringComparison.OrdinalIgnoreCase)
|
||||
|| string.Equals(toolResultPresentation.StatusKind, "reject", StringComparison.OrdinalIgnoreCase)
|
||||
? BrushFromHex("#B91C1C")
|
||||
: string.Equals(toolResultPresentation.StatusKind, "approval_required", StringComparison.OrdinalIgnoreCase)
|
||||
? BrushFromHex("#C2410C")
|
||||
: BrushFromHex("#A16207");
|
||||
var background = string.Equals(toolResultPresentation.StatusKind, "error", StringComparison.OrdinalIgnoreCase)
|
||||
|| string.Equals(toolResultPresentation.StatusKind, "reject", StringComparison.OrdinalIgnoreCase)
|
||||
? BrushFromHex("#FFF7F7")
|
||||
: string.Equals(toolResultPresentation.StatusKind, "approval_required", StringComparison.OrdinalIgnoreCase)
|
||||
? BrushFromHex("#FFF7ED")
|
||||
: BrushFromHex("#FFFBEB");
|
||||
var border = string.Equals(toolResultPresentation.StatusKind, "error", StringComparison.OrdinalIgnoreCase)
|
||||
|| string.Equals(toolResultPresentation.StatusKind, "reject", StringComparison.OrdinalIgnoreCase)
|
||||
? BrushFromHex("#FECACA")
|
||||
: string.Equals(toolResultPresentation.StatusKind, "approval_required", StringComparison.OrdinalIgnoreCase)
|
||||
? BrushFromHex("#FED7AA")
|
||||
: BrushFromHex("#FDE68A");
|
||||
stack.Children.Add(CreateAgentMetaCallout("다음 권장 작업", clipped, titleBrush, background, border));
|
||||
}
|
||||
}
|
||||
|
||||
if (chipRow.Children.Count > 0)
|
||||
|
||||
Reference in New Issue
Block a user