AX Agent 프리뷰 UI를 claw-code 스타일로 정리하고 프리뷰 surface를 공통화
Some checks failed
Release Gate / gate (push) Has been cancelled
Some checks failed
Release Gate / gate (push) Has been cancelled
- AX Agent 권한 승인 프리뷰에 공통 preview surface helper를 도입해 제목/요약/본문 box 구성을 일관되게 정리함 - 우측 파일 프리뷰 패널에 파일명, 경로, 형식·크기 메타 헤더를 추가하고 텍스트 프리뷰를 bordered preview box 안에 렌더하도록 개선함 - README와 DEVELOPMENT 문서에 2026-04-06 01:08 (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:
@@ -17460,6 +17460,7 @@ public partial class ChatWindow : Window
|
||||
private async void LoadPreviewContent(string filePath)
|
||||
{
|
||||
var ext = System.IO.Path.GetExtension(filePath).ToLowerInvariant();
|
||||
SetPreviewHeader(filePath);
|
||||
|
||||
// 모든 콘텐츠 숨기기
|
||||
PreviewWebView.Visibility = Visibility.Collapsed;
|
||||
@@ -17469,6 +17470,7 @@ public partial class ChatWindow : Window
|
||||
|
||||
if (!System.IO.File.Exists(filePath))
|
||||
{
|
||||
SetPreviewHeaderState("파일을 찾을 수 없습니다");
|
||||
PreviewEmpty.Text = "파일을 찾을 수 없습니다";
|
||||
PreviewEmpty.Visibility = Visibility.Visible;
|
||||
return;
|
||||
@@ -17510,6 +17512,7 @@ public partial class ChatWindow : Window
|
||||
break;
|
||||
|
||||
default:
|
||||
SetPreviewHeaderState("지원되지 않는 형식");
|
||||
PreviewEmpty.Text = "미리보기할 수 없는 파일 형식입니다";
|
||||
PreviewEmpty.Visibility = Visibility.Visible;
|
||||
break;
|
||||
@@ -17517,11 +17520,39 @@ public partial class ChatWindow : Window
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
SetPreviewHeaderState("미리보기 오류");
|
||||
PreviewTextBlock.Text = $"미리보기 오류: {ex.Message}";
|
||||
PreviewTextScroll.Visibility = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
private void SetPreviewHeader(string filePath)
|
||||
{
|
||||
if (PreviewHeaderTitle == null || PreviewHeaderSubtitle == null || PreviewHeaderMeta == null)
|
||||
return;
|
||||
|
||||
var fileName = System.IO.Path.GetFileName(filePath);
|
||||
var extension = System.IO.Path.GetExtension(filePath).TrimStart('.').ToUpperInvariant();
|
||||
var fileInfo = new System.IO.FileInfo(filePath);
|
||||
var sizeText = fileInfo.Exists
|
||||
? fileInfo.Length >= 1024 * 1024
|
||||
? $"{fileInfo.Length / 1024d / 1024d:F1} MB"
|
||||
: $"{Math.Max(1, fileInfo.Length / 1024d):F0} KB"
|
||||
: "파일 없음";
|
||||
|
||||
PreviewHeaderTitle.Text = string.IsNullOrWhiteSpace(fileName) ? "미리보기" : fileName;
|
||||
PreviewHeaderSubtitle.Text = filePath;
|
||||
PreviewHeaderMeta.Text = string.IsNullOrWhiteSpace(extension)
|
||||
? sizeText
|
||||
: $"{extension} · {sizeText}";
|
||||
}
|
||||
|
||||
private void SetPreviewHeaderState(string state)
|
||||
{
|
||||
if (PreviewHeaderMeta != null && !string.IsNullOrWhiteSpace(state))
|
||||
PreviewHeaderMeta.Text = state;
|
||||
}
|
||||
|
||||
private bool _webViewInitialized;
|
||||
private static readonly string WebView2DataFolder =
|
||||
System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
|
||||
@@ -17617,6 +17648,9 @@ public partial class ChatWindow : Window
|
||||
{
|
||||
_previewTabs.Clear();
|
||||
_activePreviewTab = null;
|
||||
if (PreviewHeaderTitle != null) PreviewHeaderTitle.Text = "미리보기";
|
||||
if (PreviewHeaderSubtitle != null) PreviewHeaderSubtitle.Text = "선택한 파일이 여기에 표시됩니다";
|
||||
if (PreviewHeaderMeta != null) PreviewHeaderMeta.Text = "파일 메타";
|
||||
PreviewColumn.Width = new GridLength(0);
|
||||
SplitterColumn.Width = new GridLength(0);
|
||||
PreviewPanel.Visibility = Visibility.Collapsed;
|
||||
|
||||
Reference in New Issue
Block a user