AX Agent 구형 본문 재시도 카드를 제거해 메시지 축을 더 단순화

- ChatWindow의 AddRetryButton 경로를 제거하고 실패 시 토스트 안내 후 작업 요약 재시도 액션을 사용하도록 정리

- 본문 MessagePanel에 임시 실패 카드를 직접 삽입하던 구형 흐름을 걷어내고 claw-code 방향의 메시지/상태 중심 구조로 추가 정리

- README와 DEVELOPMENT 문서에 2026-04-05 13:52 (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:
2026-04-05 12:59:22 +09:00
parent 554b1fb83e
commit bd8a1ef7bd
3 changed files with 7 additions and 57 deletions

View File

@@ -8461,7 +8461,7 @@ public partial class ChatWindow : Window
{
var errMsg = $"⚠ 오류: {ex.Message}";
assistantContent = errMsg;
AddRetryButton();
ShowToast("실패한 요청은 작업 요약에서 다시 시도할 수 있습니다.", "\uE783", 2600);
draftFailure = ex.Message;
}
finally
@@ -11025,7 +11025,7 @@ public partial class ChatWindow : Window
{
var errMsg = $"⚠ 오류: {ex.Message}";
assistantContent = errMsg;
AddRetryButton();
ShowToast("실패한 요청은 작업 요약에서 다시 시도할 수 있습니다.", "\uE783", 2600);
}
finally
{
@@ -11821,61 +11821,6 @@ public partial class ChatWindow : Window
// 현재는 BringIntoView 기반이므로 별도 하이라이트 제거 불필요
}
// ─── 에러 복구 재시도 버튼 ──────────────────────────────────────────────
private void AddRetryButton()
{
Dispatcher.Invoke(() =>
{
var retryBorder = new Border
{
Background = new SolidColorBrush(Color.FromArgb(0x18, 0xEF, 0x44, 0x44)),
CornerRadius = new CornerRadius(8),
Padding = new Thickness(12, 8, 12, 8),
Margin = new Thickness(40, 4, 80, 4),
HorizontalAlignment = HorizontalAlignment.Left,
Cursor = System.Windows.Input.Cursors.Hand,
};
var retrySp = new StackPanel { Orientation = Orientation.Horizontal };
retrySp.Children.Add(new TextBlock
{
Text = "\uE72C", FontFamily = new FontFamily("Segoe MDL2 Assets"),
FontSize = 12, Foreground = new SolidColorBrush(Color.FromRgb(0xEF, 0x44, 0x44)),
VerticalAlignment = VerticalAlignment.Center, Margin = new Thickness(0, 0, 6, 0),
});
retrySp.Children.Add(new TextBlock
{
Text = "재시도", FontSize = 12, FontWeight = FontWeights.SemiBold,
Foreground = new SolidColorBrush(Color.FromRgb(0xEF, 0x44, 0x44)),
VerticalAlignment = VerticalAlignment.Center,
});
retryBorder.Child = retrySp;
retryBorder.MouseEnter += (s, _) => { if (s is Border b) b.Background = new SolidColorBrush(Color.FromArgb(0x30, 0xEF, 0x44, 0x44)); };
retryBorder.MouseLeave += (s, _) => { if (s is Border b) b.Background = new SolidColorBrush(Color.FromArgb(0x18, 0xEF, 0x44, 0x44)); };
retryBorder.MouseLeftButtonUp += (_, _) =>
{
lock (_convLock)
{
var session = ChatSession;
if (session != null)
{
session.RemoveLastAssistantMessage(_activeTab, _storage);
_currentConversation = session.CurrentConversation;
}
else if (_currentConversation != null)
{
var lastIdx = _currentConversation.Messages.Count - 1;
if (lastIdx >= 0 && _currentConversation.Messages[lastIdx].Role == "assistant")
_currentConversation.Messages.RemoveAt(lastIdx);
}
}
_ = RegenerateLastAsync();
};
MessagePanel.Children.Add(retryBorder);
ForceScrollToEnd();
});
}
// ─── 메시지 우클릭 컨텍스트 메뉴 ───────────────────────────────────────
private void ShowMessageContextMenu(string content, string role)