권한·도구 결과 transcript 안내 강화
Some checks failed
Release Gate / gate (push) Has been cancelled

권한 요청과 도구 결과 metadata를 실제 transcript 카드에 반영했습니다.

ActionHint, Severity, RequiresPreview, FollowUpHint, NeedsAttention, StatusKind를 이용해 보조 문구와 주의 chip을 표시하도록 정리했습니다.

README와 DEVELOPMENT 문서를 갱신했고 dotnet build 기준 경고 0 / 오류 0을 확인했습니다.
This commit is contained in:
2026-04-06 13:03:18 +09:00
parent e747032501
commit 7fd4d1ae5a
3 changed files with 116 additions and 0 deletions

View File

@@ -47,6 +47,104 @@ public partial class ChatWindow
};
}
private Border CreateAgentMetaChip(string text, string icon, Brush foreground, Brush background, Brush borderBrush)
{
return new Border
{
Background = background,
BorderBrush = borderBrush,
BorderThickness = new Thickness(1),
CornerRadius = new CornerRadius(999),
Padding = new Thickness(5, 1.5, 5, 1.5),
Margin = new Thickness(0, 0, 4, 0),
Child = new StackPanel
{
Orientation = Orientation.Horizontal,
Children =
{
new TextBlock
{
Text = icon,
FontFamily = new FontFamily("Segoe MDL2 Assets"),
FontSize = 7.5,
Foreground = foreground,
VerticalAlignment = VerticalAlignment.Center,
},
new TextBlock
{
Text = text,
FontSize = 7.75,
Foreground = foreground,
Margin = new Thickness(3, 0, 0, 0),
VerticalAlignment = VerticalAlignment.Center,
}
}
}
};
}
private void AppendAgentEventPresentationMeta(
StackPanel stack,
AgentEvent evt,
PermissionRequestPresentation? permissionPresentation,
ToolResultPresentation? toolResultPresentation,
Brush secondaryText,
Brush hintBg,
Brush borderColor)
{
string? guidance = null;
var chipRow = new WrapPanel
{
Margin = new Thickness(11, 2, 0, 0),
Orientation = Orientation.Horizontal,
};
if (permissionPresentation != null)
{
guidance = permissionPresentation.ActionHint;
if (permissionPresentation.RequiresPreview)
chipRow.Children.Add(CreateAgentMetaChip("미리보기 권장", "\uE8A7", secondaryText, hintBg, borderColor));
if (evt.Type == AgentEventType.PermissionRequest)
{
if (string.Equals(permissionPresentation.Severity, "high", StringComparison.OrdinalIgnoreCase))
chipRow.Children.Add(CreateAgentMetaChip("주의 필요", "\uE814", secondaryText, hintBg, borderColor));
else if (string.Equals(permissionPresentation.Severity, "medium", StringComparison.OrdinalIgnoreCase))
chipRow.Children.Add(CreateAgentMetaChip("검토 권장", "\uE946", secondaryText, hintBg, borderColor));
}
}
if (toolResultPresentation != null)
{
guidance = toolResultPresentation.FollowUpHint;
if (toolResultPresentation.NeedsAttention)
chipRow.Children.Add(CreateAgentMetaChip("확인 필요", "\uE814", secondaryText, hintBg, borderColor));
if (string.Equals(toolResultPresentation.StatusKind, "approval_required", StringComparison.OrdinalIgnoreCase))
chipRow.Children.Add(CreateAgentMetaChip("승인 후 계속", "\uE8D7", secondaryText, hintBg, borderColor));
else if (string.Equals(toolResultPresentation.StatusKind, "partial", StringComparison.OrdinalIgnoreCase))
chipRow.Children.Add(CreateAgentMetaChip("후속 점검", "\uE7BA", secondaryText, hintBg, borderColor));
}
if (!string.IsNullOrWhiteSpace(guidance))
{
var clipped = guidance.Length > 92 ? guidance[..92] + "..." : guidance;
stack.Children.Add(new TextBlock
{
Text = clipped,
FontSize = 8.15,
Foreground = secondaryText,
TextWrapping = TextWrapping.Wrap,
Margin = new Thickness(11, 1, 0, 0),
});
}
if (chipRow.Children.Count > 0)
stack.Children.Add(chipRow);
}
private void AddAgentEventBanner(AgentEvent evt)
{
var logLevel = _settings.Settings.Llm.AgentLogLevel;
@@ -272,6 +370,18 @@ public partial class ChatWindow
});
}
if (permissionPresentation != null || toolResultPresentation != null)
{
AppendAgentEventPresentationMeta(
sp,
evt,
permissionPresentation,
toolResultPresentation,
secondaryText,
hintBg,
borderColor);
}
var reviewChipRow = BuildReviewSignalChipRow(
kind: null,
toolName: evt.ToolName,