From d9309b45fa7b8a86bfcb0677436a954578fb8937 Mon Sep 17 00:00:00 2001 From: lacvet Date: Mon, 6 Apr 2026 21:37:07 +0900 Subject: [PATCH] =?UTF-8?q?AX=20Agent=20=EC=BD=94=EB=93=9C=20=ED=83=AD=20?= =?UTF-8?q?=EC=A0=80=EC=9E=A5=EC=86=8C=20=EC=9A=94=EC=95=BD=EC=A4=84?= =?UTF-8?q?=EA=B3=BC=20=EB=A6=AC=EB=B7=B0=20=EC=A7=84=EC=9E=85=20UX=20?= =?UTF-8?q?=EA=B0=9C=EC=84=A0\n\n-=20=EC=BD=94=EB=93=9C=20=ED=83=AD=20?= =?UTF-8?q?=EC=9E=85=EB=A0=A5=EB=B6=80=20=EC=9C=84=20=EC=A0=80=EC=9E=A5?= =?UTF-8?q?=EC=86=8C=20=EC=9A=94=EC=95=BD=EC=A4=84=EC=97=90=20=EB=A1=9C?= =?UTF-8?q?=EC=BB=AC/=EC=9B=8C=ED=81=AC=ED=8A=B8=EB=A6=AC,=20upstream=20?= =?UTF-8?q?=EB=B0=B0=EC=A7=80=EB=A5=BC=20=EC=B6=94=EA=B0=80=ED=95=B4=20rep?= =?UTF-8?q?o=20context=EB=A5=BC=20=EB=8D=94=20=EB=AA=85=ED=99=95=ED=9E=88?= =?UTF-8?q?=20=ED=91=9C=EC=8B=9C\n-=20=EB=B3=80=EA=B2=BD=20=EC=83=81?= =?UTF-8?q?=ED=83=9C=EC=97=90=20=EB=94=B0=EB=9D=BC=20=EC=95=A1=EC=85=98=20?= =?UTF-8?q?=EB=AC=B8=EA=B5=AC=EB=A5=BC=20=EB=8F=99=EC=A0=81=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EB=B0=94=EA=BE=B8=EA=B3=A0=20/review=20slash=20?= =?UTF-8?q?=EB=AA=85=EB=A0=B9=EC=9C=BC=EB=A1=9C=20=EB=B0=94=EB=A1=9C=20?= =?UTF-8?q?=EC=9D=B4=EC=96=B4=EC=A7=80=EB=8A=94=20=EB=A6=AC=EB=B7=B0=20?= =?UTF-8?q?=EB=B0=B0=EC=A7=80=20=EC=B6=94=EA=B0=80\n-=20=EC=BD=94=EB=93=9C?= =?UTF-8?q?=20=ED=83=AD=20=EC=9E=85=EB=A0=A5=20=EC=9B=8C=ED=84=B0=EB=A7=88?= =?UTF-8?q?=ED=81=AC=EC=99=80=20=EC=95=88=EB=82=B4=20=EB=AC=B8=EA=B5=AC?= =?UTF-8?q?=EB=A5=BC=20=EC=A0=80=EC=9E=A5=EC=86=8C=20=EB=B0=B0=EB=84=88=20?= =?UTF-8?q?=ED=9D=90=EB=A6=84=EC=97=90=20=EB=A7=9E=EA=B2=8C=20=EC=A0=95?= =?UTF-8?q?=EB=A6=AC\n\n=EA=B2=80=EC=A6=9D:\n-=20dotnet=20build=20src/AxCo?= =?UTF-8?q?pilot/AxCopilot.csproj=20-c=20Release=20-v=20minimal=20-p:Outpu?= =?UTF-8?q?tPath=3Dbin\\verify\\=20-p:IntermediateOutputPath=3Dobj\\verify?= =?UTF-8?q?\\\n-=20=EA=B2=BD=EA=B3=A0=200=20/=20=EC=98=A4=EB=A5=98=200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 + docs/DEVELOPMENT.md | 7 ++ .../Views/ChatWindow.FooterPresentation.cs | 8 +-- .../Views/ChatWindow.GitBranchPresentation.cs | 68 +++++++++++++++++-- src/AxCopilot/Views/ChatWindow.xaml | 44 +++++++++++- 5 files changed, 118 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 482255c..6a604ab 100644 --- a/README.md +++ b/README.md @@ -1354,3 +1354,6 @@ MIT License 업데이트: 2026-04-06 20:18 (KST) - AX Agent 메시지 마크다운 렌더에 코드 심볼 강조를 추가해 Cowork/Code 답변의 파일 경로·camelCase/PascalCase·snake_case가 더 선명하게 보이도록 조정했다. - 코드 탭 입력부 위에 저장소/브랜치/변경 수치를 보여주는 Git 요약 배너를 추가해 `claude-code` 스타일의 repo context를 더 빠르게 읽을 수 있게 맞췄다. +- 업데이트: 2026-04-06 20:28 (KST) +- AX Agent 코드 탭 입력부 위 저장소 요약줄을 더 `claude-code` 스타일에 가깝게 정리했습니다. `로컬/워크트리`, `upstream` 상태를 얇은 배지로 표시하고, 변경이 있을 때 액션 문구가 `변경 · 브랜치 보기`로 바뀌도록 했습니다. +- 코드 탭 저장소 요약줄에 `리뷰` 배지를 추가해 기존 slash 명령 `/review`로 바로 이어지게 했습니다. 입력 중인 문구가 있으면 유지한 채 리뷰 흐름만 얹도록 조정했습니다. diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index bf4d32c..7d90080 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -5020,3 +5020,10 @@ ow + toggle ?쒓컖 ?몄뼱濡??ㅼ떆 ?뺣젹?덈떎. 업데이트: 2026-04-06 20:18 (KST) - Improved AX Agent markdown rendering for Cowork/Code by highlighting file paths plus code-like symbols, and added a compact repository summary banner above the Code composer to surface branch and diff context closer to `claude-code`. +## 2026-04-06 20:28 (KST) + +- AX Agent 코드 탭의 저장소 요약줄을 `claude-code` 레퍼런스에 더 가깝게 정리했다. + - 저장소/브랜치 외에 `로컬/워크트리` 배지와 `upstream` 배지를 추가 + - 변경이 있을 때 액션 라벨을 `변경 · 브랜치 보기`로 동적으로 변경 +- 코드 탭 저장소 요약줄에서 `/review` slash 명령으로 바로 이어지는 `리뷰` 배지를 추가했다. + - 기존 입력 중인 텍스트는 유지하고 slash chip만 덧붙이도록 구성 diff --git a/src/AxCopilot/Views/ChatWindow.FooterPresentation.cs b/src/AxCopilot/Views/ChatWindow.FooterPresentation.cs index 664855e..d3989f7 100644 --- a/src/AxCopilot/Views/ChatWindow.FooterPresentation.cs +++ b/src/AxCopilot/Views/ChatWindow.FooterPresentation.cs @@ -19,7 +19,7 @@ public partial class ChatWindow ? "문서 작성, 데이터 분석, 파일 작업을 요청하세요. 필요하면 작업 폴더 파일도 함께 참고합니다." : "문서 작성, 데이터 분석, 파일 작업을 요청하세요. 작업 폴더를 선택하면 관련 파일도 함께 참고합니다.", "Code" => hasFolder - ? "코드 수정, 원인 분석, 빌드·테스트를 요청하세요. 작업 폴더의 코드와 문서를 함께 검토합니다." + ? "코드 수정, 원인 분석, 빌드·테스트를 요청하세요. 작업 폴더 코드를 참고하고, 상단 저장소 배너로 브랜치와 변경 상태를 함께 봅니다." : "작업 폴더를 선택한 뒤 코드 수정, 원인 분석, 빌드·테스트를 요청하세요.", _ => "질문, 요약, 초안 작성, 아이디어 정리를 요청하세요.", }; @@ -41,9 +41,9 @@ public partial class ChatWindow return preset.Description.Trim(); if (string.Equals(_activeTab, "Cowork", StringComparison.OrdinalIgnoreCase)) - return "이 작업 유형에 맞는 문서/데이터/파일 작업 흐름으로 이어집니다."; + return "선택한 작업 유형에 맞는 문서·데이터·파일 작업 흐름으로 이어집니다."; - return "이 주제에 맞는 답변 톤과 초안 방향으로 대화를 이어갑니다."; + return "선택한 대화 주제에 맞는 응답 방향과 초안 흐름으로 이어집니다."; } private void UpdateFolderBar() @@ -109,7 +109,7 @@ public partial class ChatWindow return; } - var preset = Services.PresetService.GetByTabWithCustom(_activeTab, _settings.Settings.Llm.CustomPresets) + var preset = PresetService.GetByTabWithCustom(_activeTab, _settings.Settings.Llm.CustomPresets) .FirstOrDefault(p => string.Equals(p.Category?.Trim(), category, StringComparison.OrdinalIgnoreCase)); if (preset == null) { diff --git a/src/AxCopilot/Views/ChatWindow.GitBranchPresentation.cs b/src/AxCopilot/Views/ChatWindow.GitBranchPresentation.cs index bd0c3a9..baa4085 100644 --- a/src/AxCopilot/Views/ChatWindow.GitBranchPresentation.cs +++ b/src/AxCopilot/Views/ChatWindow.GitBranchPresentation.cs @@ -43,33 +43,46 @@ public partial class ChatWindow if (CodeRepoSummaryBar == null) return; + var currentFolder = GetCurrentWorkFolder(); var isVisible = visibility == Visibility.Visible && string.Equals(_activeTab, "Code", StringComparison.OrdinalIgnoreCase) && - !string.IsNullOrWhiteSpace(GetCurrentWorkFolder()); + !string.IsNullOrWhiteSpace(currentFolder); CodeRepoSummaryBar.Visibility = isVisible ? Visibility.Visible : Visibility.Collapsed; if (!isVisible) return; - var gitRoot = _currentGitRoot ?? ResolveGitRoot(GetCurrentWorkFolder()); + var gitRoot = _currentGitRoot ?? ResolveGitRoot(currentFolder); var repoName = !string.IsNullOrWhiteSpace(gitRoot) ? System.IO.Path.GetFileName(gitRoot.TrimEnd('\\', '/')) : "저장소"; var normalizedBranch = string.IsNullOrWhiteSpace(branchName) ? "detached" : branchName!; + var normalizedGitRoot = string.IsNullOrWhiteSpace(gitRoot) + ? "" + : gitRoot!.TrimEnd('\\', '/'); + var normalizedCurrentFolder = string.IsNullOrWhiteSpace(currentFolder) + ? "" + : currentFolder!.TrimEnd('\\', '/'); + var isWorkspaceSubfolder = !string.IsNullOrWhiteSpace(normalizedGitRoot) && + !string.IsNullOrWhiteSpace(normalizedCurrentFolder) && + !string.Equals(normalizedGitRoot, normalizedCurrentFolder, StringComparison.OrdinalIgnoreCase); if (CodeRepoSummaryRepoLabel != null) CodeRepoSummaryRepoLabel.Text = repoName; if (CodeRepoSummaryBranchLabel != null) CodeRepoSummaryBranchLabel.Text = normalizedBranch; + if (CodeRepoSummaryDetailText != null) { var details = new List(); if (!string.IsNullOrWhiteSpace(filesText)) - details.Add($"변경 파일 {filesText}"); + details.Add($"변경 {filesText}"); if (!string.IsNullOrWhiteSpace(addedText)) details.Add(addedText); if (!string.IsNullOrWhiteSpace(deletedText)) details.Add(deletedText); + if (!string.IsNullOrWhiteSpace(_currentGitUpstreamStatus)) + details.Add(_currentGitUpstreamStatus!); CodeRepoSummaryDetailText.Text = details.Count > 0 ? string.Join(" · ", details) @@ -90,6 +103,47 @@ public partial class ChatWindow CodeRepoSummaryDeletedPill.Visibility = hasDeleted ? Visibility.Visible : Visibility.Collapsed; CodeRepoSummaryDeletedText.Text = hasDeleted ? deletedText : ""; } + + if (CodeRepoSummaryWorkspacePill != null && CodeRepoSummaryWorkspaceText != null) + { + CodeRepoSummaryWorkspacePill.Visibility = Visibility.Visible; + CodeRepoSummaryWorkspaceText.Text = isWorkspaceSubfolder ? "워크트리" : "로컬"; + } + + if (CodeRepoSummaryUpstreamPill != null && CodeRepoSummaryUpstreamText != null) + { + var hasUpstream = !string.IsNullOrWhiteSpace(_currentGitUpstreamStatus); + CodeRepoSummaryUpstreamPill.Visibility = hasUpstream ? Visibility.Visible : Visibility.Collapsed; + CodeRepoSummaryUpstreamText.Text = hasUpstream ? _currentGitUpstreamStatus! : ""; + } + + if (CodeRepoSummaryActionText != null) + { + var hasChanges = _currentGitChangedFileCount > 0 || + !string.IsNullOrWhiteSpace(addedText) || + !string.IsNullOrWhiteSpace(deletedText); + CodeRepoSummaryActionText.Text = hasChanges ? "변경 · 브랜치 보기" : "브랜치 보기"; + } + + if (CodeRepoSummaryReviewPill != null) + CodeRepoSummaryReviewPill.Visibility = Visibility.Visible; + } + + private void CodeRepoSummaryReviewPill_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) + { + e.Handled = true; + if (!string.Equals(_activeTab, "Code", StringComparison.OrdinalIgnoreCase) || InputBox == null) + return; + + var existingText = InputBox.Text; + ShowSlashChip("/review"); + if (!string.IsNullOrWhiteSpace(existingText)) + { + InputBox.Text = existingText; + InputBox.CaretIndex = InputBox.Text.Length; + } + + InputBox.Focus(); } private async void CodeRepoSummaryBar_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) @@ -183,7 +237,7 @@ public partial class ChatWindow GitBranchItems.Children.Add(CreatePopupMenuRow( "\uE8C8", "상태 요약 복사", - "브랜치 변경 파일, 추가/삭제 라인 복사", + "브랜치, 변경 파일, 추가/삭제 라인 요약을 복사합니다.", false, accentBrush, secondaryText, @@ -196,8 +250,8 @@ public partial class ChatWindow GitBranchItems.Children.Add(CreatePopupMenuRow( "\uE72B", - "새로고침", - "Git 상태를 다시 조회합니다.", + "다시 조회", + "Git 상태를 다시 불러옵니다.", false, accentBrush, secondaryText, @@ -280,7 +334,7 @@ public partial class ChatWindow GitBranchItems.Children.Add(CreatePopupMenuRow( "\uE710", "새 브랜치 생성", - "현재 작업 기준으로 새 브랜치를 만들고 전환합니다.", + "현재 작업을 기준으로 새 브랜치를 만들고 전환합니다.", false, accentBrush, secondaryText, diff --git a/src/AxCopilot/Views/ChatWindow.xaml b/src/AxCopilot/Views/ChatWindow.xaml index 3bb9a81..3a28e84 100644 --- a/src/AxCopilot/Views/ChatWindow.xaml +++ b/src/AxCopilot/Views/ChatWindow.xaml @@ -1750,6 +1750,34 @@ Orientation="Horizontal" VerticalAlignment="Center" Margin="12,0,0,0"> + + + + + + + + + -