AX Agent loop 정책을 분리하고 transcript 가상화·성능 계측 구조를 강화한다
Some checks failed
Release Gate / gate (push) Has been cancelled
Some checks failed
Release Gate / gate (push) Has been cancelled
- AgentLoop 검증/문서/compact 정책 메서드를 partial 파일로 분리해 loop 본문의 책임을 줄임 - transcript 렌더에 cache pruning과 deferred scrolling을 적용해 긴 세션의 UI 부담을 낮춤 - AgentPerformanceLogService를 추가해 transcript 렌더와 agent loop 실행 요약을 perf 로그로 남김 - README와 DEVELOPMENT 문서에 2026-04-09 10: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:
@@ -1,5 +1,7 @@
|
||||
using System.Diagnostics;
|
||||
using System.Windows.Threading;
|
||||
using AxCopilot.Models;
|
||||
using AxCopilot.Services;
|
||||
|
||||
namespace AxCopilot.Views;
|
||||
|
||||
@@ -18,6 +20,7 @@ public partial class ChatWindow
|
||||
|
||||
private void RenderMessages(bool preserveViewport = false)
|
||||
{
|
||||
var renderStopwatch = Stopwatch.StartNew();
|
||||
var previousScrollableHeight = GetTranscriptScrollableHeight();
|
||||
var previousVerticalOffset = GetTranscriptVerticalOffset();
|
||||
|
||||
@@ -62,10 +65,32 @@ public partial class ChatWindow
|
||||
|
||||
if (!TryApplyIncrementalTranscriptRender(renderPlan))
|
||||
ApplyFullTranscriptRender(renderPlan);
|
||||
PruneTranscriptElementCache(renderPlan.NewKeys);
|
||||
|
||||
_lastRenderedMessageCount = visibleMessages.Count;
|
||||
_lastRenderedEventCount = visibleEvents.Count;
|
||||
_lastRenderedShowHistory = renderPlan.ShowHistory;
|
||||
renderStopwatch.Stop();
|
||||
if (renderStopwatch.ElapsedMilliseconds >= 24 || _isStreaming)
|
||||
{
|
||||
AgentPerformanceLogService.LogMetric(
|
||||
"transcript",
|
||||
"render_messages",
|
||||
conv.Id,
|
||||
_activeTab ?? "",
|
||||
renderStopwatch.ElapsedMilliseconds,
|
||||
new
|
||||
{
|
||||
preserveViewport,
|
||||
streaming = _isStreaming,
|
||||
lightweight = IsLightweightLiveProgressMode(),
|
||||
visibleMessages = visibleMessages.Count,
|
||||
visibleEvents = visibleEvents.Count,
|
||||
renderedItems = renderPlan.NewKeys.Count,
|
||||
hiddenCount = renderPlan.HiddenCount,
|
||||
transcriptElements = GetTranscriptElementCount(),
|
||||
});
|
||||
}
|
||||
|
||||
if (!preserveViewport)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user