AX Agent 진행 이력 파편 메시지 정제 및 렌더링 안정화
- 스트리밍 TextDelta와 Thinking summary에 공통 정제기를 적용해 1, [, file_read] 같은 저품질 파편 문구가 이벤트와 카드에 쌓이지 않도록 개선 - V2 라이브 진행 카드와 이력 렌더링에서 정제된 thinking summary만 표시하고 low-signal 조각은 숨기며 process feed는 안전한 기본 문구로 폴백 - AgentProgressSummarySanitizerTests와 AgentLoopResponseClassificationServiceTests를 추가/확장하고 dotnet build 경고 0 오류 0, 지정 테스트 22건 통과를 확인
This commit is contained in:
@@ -187,7 +187,11 @@ public partial class ChatWindow
|
||||
AgentEventType.StepDone when evt.StepTotal > 0
|
||||
=> $"{evt.StepCurrent}/{evt.StepTotal} 단계 완료",
|
||||
AgentEventType.Thinking when !string.IsNullOrWhiteSpace(evt.Summary)
|
||||
=> evt.Summary,
|
||||
=> AgentProgressSummarySanitizer.NormalizeThinkingSummary(evt.Summary, evt.ToolName, maxLength: 120) switch
|
||||
{
|
||||
{ Length: > 0 } cleaned => cleaned,
|
||||
_ => "진행 내용 정리",
|
||||
},
|
||||
AgentEventType.ToolCall
|
||||
=> string.IsNullOrWhiteSpace(itemDisplayName)
|
||||
? $"{transcriptBadgeLabel} 실행"
|
||||
|
||||
@@ -302,7 +302,10 @@ public partial class ChatWindow
|
||||
var secondaryText = TryFindResource("SecondaryText") as Brush ?? Brushes.Gray;
|
||||
var msgMaxWidth = GetMessageMaxWidth();
|
||||
|
||||
var summary = agentEvent.Summary;
|
||||
var summary = AgentProgressSummarySanitizer.NormalizeThinkingSummary(
|
||||
agentEvent.Summary,
|
||||
agentEvent.ToolName,
|
||||
maxLength: 200);
|
||||
if (string.IsNullOrWhiteSpace(summary))
|
||||
return new Border { Width = 0, Height = 0 }; // 빈 thinking은 숨김
|
||||
|
||||
@@ -356,7 +359,7 @@ public partial class ChatWindow
|
||||
});
|
||||
thinkStack.Children.Add(new TextBlock
|
||||
{
|
||||
Text = summary.Length > 200 ? summary[..200] + "..." : summary,
|
||||
Text = summary,
|
||||
FontSize = 11,
|
||||
FontStyle = FontStyles.Italic,
|
||||
Foreground = secondaryText,
|
||||
|
||||
@@ -301,7 +301,11 @@ public partial class ChatWindow
|
||||
|
||||
case AgentEventType.Thinking:
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(agentEvent.Summary)) break;
|
||||
var thinkText = AgentProgressSummarySanitizer.NormalizeThinkingSummary(
|
||||
agentEvent.Summary,
|
||||
agentEvent.ToolName,
|
||||
maxLength: 100);
|
||||
if (string.IsNullOrWhiteSpace(thinkText)) break;
|
||||
|
||||
// 사고 과정을 간략히 표시
|
||||
var thinkRow = new StackPanel
|
||||
@@ -318,8 +322,6 @@ public partial class ChatWindow
|
||||
VerticalAlignment = VerticalAlignment.Center,
|
||||
Margin = new Thickness(0, 0, 4, 0),
|
||||
});
|
||||
var thinkText = agentEvent.Summary;
|
||||
if (thinkText.Length > 100) thinkText = thinkText[..100] + "...";
|
||||
thinkRow.Children.Add(new TextBlock
|
||||
{
|
||||
Text = thinkText,
|
||||
|
||||
Reference in New Issue
Block a user