권한·도구 결과 카드 액션 문구 고도화

파일 기반 transcript 카드의 액션 버튼 라벨을 상태와 종류에 맞게 세분화했습니다.

변경 확인, 작성 내용 보기, 부분 결과 보기, 오류 파일 보기, 승인 전 미리보기 등 맥락별 문구를 적용했습니다.

README와 DEVELOPMENT 문서를 갱신했고 dotnet build 기준 경고 0 / 오류 0을 확인했습니다.
This commit is contained in:
2026-04-06 14:29:05 +09:00
parent c4d050f2bf
commit 3feb1f0be4
3 changed files with 34 additions and 2 deletions

View File

@@ -148,6 +148,34 @@ public partial class ChatWindow
};
}
private static (string label, string icon) GetPreviewActionMeta(
PermissionRequestPresentation? permissionPresentation,
ToolResultPresentation? toolResultPresentation)
{
if (permissionPresentation != null)
{
return permissionPresentation.Kind switch
{
"file_edit" => ("변경 확인", "\uE70F"),
"file_write" => ("작성 내용 보기", "\uE8A1"),
_ => ("프리뷰 열기", "\uE8A1"),
};
}
if (toolResultPresentation != null)
{
return toolResultPresentation.StatusKind switch
{
"error" => ("오류 파일 보기", "\uE783"),
"partial" => ("부분 결과 보기", "\uE8A1"),
"approval_required" => ("승인 전 미리보기", "\uE8D7"),
_ => ("결과 보기", "\uE8A1"),
};
}
return ("프리뷰 열기", "\uE8A1");
}
private Border CreateAgentInlineActionButton(string text, string icon, Brush foreground, Brush borderBrush, Action onClick)
{
var button = new Border
@@ -379,9 +407,10 @@ public partial class ChatWindow
|| toolResultPresentation != null))
{
var previewPath = evt.FilePath!;
var (actionLabel, actionIcon) = GetPreviewActionMeta(permissionPresentation, toolResultPresentation);
stack.Children.Add(CreateAgentInlineActionButton(
"프리뷰 열기",
"\uE8A1",
actionLabel,
actionIcon,
BrushFromHex("#2563EB"),
BrushFromHex("#BFDBFE"),
() => ShowPreviewPanel(previewPath)));