From 22eebc13d97bbff8afad92f4320f53776c66f0b6 Mon Sep 17 00:00:00 2001 From: lacvet Date: Sun, 5 Apr 2026 14:19:07 +0900 Subject: [PATCH] =?UTF-8?q?AX=20Agent=20UI=EC=99=80=20=EC=9D=91=EB=8B=B5?= =?UTF-8?q?=20=EB=A7=88=EA=B0=90=20=EC=97=94=EC=A7=84=EC=9D=84=20claw-code?= =?UTF-8?q?=20=EA=B8=B0=EC=A4=80=EC=9C=BC=EB=A1=9C=201=EC=B0=A8=20?= =?UTF-8?q?=EC=9E=AC=EA=B5=AC=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 사이드바, 메시지 축, 빈 상태, 컴포저를 더 얇고 밀도 높은 구조로 재배치하고 보조 상태 스트립 노출을 줄였습니다. 반응형 폭 계산을 다시 조정해 창 크기 변화에서도 메시지와 컴포저가 같은 중심선으로 자연스럽게 줄어들게 했습니다. 응답 취소와 오류 마감은 AxAgentExecutionEngine의 FinalizeExecutionContent로 공통화해 전송과 재생성의 후처리 경로를 맞췄습니다. 검증: dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify\\ -p:IntermediateOutputPath=obj\\verify\\ 경고 0 오류 0 --- README.md | 4 + docs/DEVELOPMENT.md | 6 ++ .../Services/Agent/AxAgentExecutionEngine.cs | 17 ++++ src/AxCopilot/Views/ChatWindow.xaml | 84 ++++++++--------- src/AxCopilot/Views/ChatWindow.xaml.cs | 91 +++++++++---------- 5 files changed, 112 insertions(+), 90 deletions(-) diff --git a/README.md b/README.md index 00c571e..09df1d2 100644 --- a/README.md +++ b/README.md @@ -810,6 +810,10 @@ ow + toggle 시각 언어로 통일했습니다. - [SettingsWindow.xaml](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Views/SettingsWindow.xaml), [ChatWindow.xaml](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Views/ChatWindow.xaml) 에서는 메인 설정과 AX Agent 내부 설정의 `계획 모드` 행을 숨겼고, [SettingsViewModel.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/ViewModels/SettingsViewModel.cs), [AppStateService.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Services/AppStateService.cs) 에서도 항상 `off`만 저장/반영되게 정리했습니다. - 계획 확인 팝업은 [ChatWindow.xaml.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Views/ChatWindow.xaml.cs), [PlanViewerWindow.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Views/PlanViewerWindow.cs) 기준으로 AX Agent 창을 owner로 받아 리소스를 그대로 합치게 바꿨고, 채팅 본문에 별도 인라인 승인 버튼을 다시 꽂지 않도록 정리했습니다. - 업데이트: 2026-04-05 16:20 (KST) +- `claw-code` 기준 UI/엔진 재구성 1차도 반영했습니다. [ChatWindow.xaml](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Views/ChatWindow.xaml) 에서 AX Agent 메인 레이아웃의 사이드바 폭, 메시지 축, 빈 상태 카드, 컴포저 외곽선을 더 압축해 메시지 중심 구조로 다시 정리했고, 상단/보조 스트립과 토큰 카드 노출도 더 보수적으로 줄였습니다. +- [ChatWindow.xaml.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Views/ChatWindow.xaml.cs) 에서는 반응형 폭 계산을 다시 조정해 창이 좁아질 때 메시지 축과 컴포저가 같은 중심선을 따라 자연스럽게 줄어들게 했고, Chat 탭에서는 보조 상태 스트립을 거의 숨기고 Cowork/Code도 실패/승인 대기 같은 핵심 상태만 남기도록 정리했습니다. +- 엔진 쪽은 [AxAgentExecutionEngine.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Services/Agent/AxAgentExecutionEngine.cs) 에 `FinalizeExecutionContent(...)` 를 추가해 취소/오류/빈 응답 정규화를 UI 바깥으로 넘겼고, 전송/재생성 마감 흐름이 같은 helper를 타도록 맞췄습니다. 내부 설정 오버레이 연결은 유지했습니다. +- 업데이트: 2026-04-05 16:33 (KST) - 검증: `dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify\\ -p:IntermediateOutputPath=obj\\verify\\` 경고 0 / 오류 0 - 업데이트: 2026-04-05 15:16 (KST) diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index b3e905e..02e992d 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -4575,3 +4575,9 @@ ow + toggle ?쒓컖 ?몄뼱濡??ㅼ떆 ?뺣젹?덈떎. - [ChatWindow.xaml.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Views/ChatWindow.xaml.cs) 의 `CreatePlanDecisionCallback()`은 더 이상 채팅 본문에 인라인 승인 버튼을 추가하지 않고, [PlanViewerWindow.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Views/PlanViewerWindow.cs) 를 AX Agent 창 owner와 merged resources 기준으로 생성해 플랜 팝업이 AX Agent 테마와 같은 리소스 축을 따르도록 바꿨습니다. - 검증 예정: `dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\verify\ -p:IntermediateOutputPath=obj\verify\` - 업데이트: 2026-04-05 16:20 (KST) +- `claw-code` 기준 UI/엔진 재구성 1차도 진행했습니다. [ChatWindow.xaml](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Views/ChatWindow.xaml) 에서 AX Agent 메인 레이아웃의 사이드바 폭을 줄이고, 메시지/빈 상태/컴포저의 기본 폭과 패딩, 라운드, 그림자 강도를 다시 조정해 메시지 중심 구조로 압축했습니다. +- 보조 상태 UI도 더 얇게 만들었습니다. [ChatWindow.xaml.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Views/ChatWindow.xaml.cs)의 대화 상태 스트립은 Chat 탭에서 숨기고 Cowork/Code도 실패/승인 대기/차단 같은 핵심 상태만 보여 주도록 줄였으며, 빠른 스트립도 Chat에서는 열리지 않게 정리했습니다. +- 반응형 폭 계산은 같은 파일의 `UpdateResponsiveChatLayout()`에서 다시 조정해 메시지 축 상한을 `840`, 컴포저 축 상한을 `760` 기준으로 맞췄고, 좁은 창에서는 둘이 같은 중심선으로 함께 줄어들도록 재계산하게 했습니다. +- 엔진 쪽은 [AxAgentExecutionEngine.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Services/Agent/AxAgentExecutionEngine.cs)에 `FinalizeExecutionContent(...)` 를 추가해 취소/오류/빈 응답 정규화를 공통 helper로 모았습니다. [ChatWindow.xaml.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Views/ChatWindow.xaml.cs)의 일반 전송과 재생성은 이제 같은 helper를 써서 응답 마감을 처리합니다. +- 검증 예정: `dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\verify\ -p:IntermediateOutputPath=obj\verify\` +- 업데이트: 2026-04-05 16:33 (KST) diff --git a/src/AxCopilot/Services/Agent/AxAgentExecutionEngine.cs b/src/AxCopilot/Services/Agent/AxAgentExecutionEngine.cs index 2704660..dd343f9 100644 --- a/src/AxCopilot/Services/Agent/AxAgentExecutionEngine.cs +++ b/src/AxCopilot/Services/Agent/AxAgentExecutionEngine.cs @@ -16,6 +16,7 @@ public sealed class AxAgentExecutionEngine ExecutionMode Mode, IReadOnlyList PromptStack, List Messages); + public sealed record FinalizedContent(string Content, bool Cancelled, string? FailureReason); public sealed record SessionMutationResult( ChatConversation CurrentConversation, ChatConversation UpdatedConversation); @@ -162,6 +163,22 @@ public sealed class AxAgentExecutionEngine return normalized; } + public FinalizedContent FinalizeExecutionContent(string? currentContent, Exception? error = null, bool cancelled = false) + { + if (cancelled) + { + var content = string.IsNullOrWhiteSpace(currentContent) ? "(취소됨)" : currentContent!; + return new FinalizedContent(content, true, "사용자가 작업을 중단했습니다."); + } + + if (error != null) + { + return new FinalizedContent($"⚠ 오류: {error.Message}", false, error.Message); + } + + return new FinalizedContent(currentContent ?? string.Empty, false, null); + } + public SessionMutationResult AppendExecutionEvent( ChatSessionStateService session, ChatStorageService storage, diff --git a/src/AxCopilot/Views/ChatWindow.xaml b/src/AxCopilot/Views/ChatWindow.xaml index c278bcb..657e3c2 100644 --- a/src/AxCopilot/Views/ChatWindow.xaml +++ b/src/AxCopilot/Views/ChatWindow.xaml @@ -406,7 +406,7 @@ - + @@ -477,7 +477,7 @@ BorderThickness="0,0,1,0"> - + @@ -487,18 +487,18 @@ - + - - + - + VerticalAlignment="Center" Margin="8,0,0,0"/> @@ -507,8 +507,8 @@ + FontSize="10.8" Margin="7,0,0,0" VerticalAlignment="Center"/> + FontSize="10.8" Margin="7,0,0,0" VerticalAlignment="Center"/> + Padding="10,2,10,2"> @@ -1181,10 +1181,10 @@ VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Background="{DynamicResource LauncherBackground}" - Padding="24,14,24,8"> + Padding="18,10,18,6"> @@ -1196,8 +1196,8 @@ + MaxWidth="840" + Margin="18,8,18,8"> @@ -1208,24 +1208,24 @@ HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,10,0,2"> - - - + Width="320" + Margin="0,6,0,0"/> @@ -1571,9 +1571,9 @@ Background="{DynamicResource LauncherBackground}" BorderBrush="{DynamicResource BorderColor}" BorderThickness="1" - CornerRadius="14" - Padding="10,8,10,8" - Margin="0,0,0,6"> + CornerRadius="12" + Padding="9,7,9,7" + Margin="0,0,0,5"> @@ -1628,7 +1628,7 @@ - @@ -1651,10 +1651,10 @@ - + @@ -1665,12 +1665,11 @@ - + -