- OnAgentEvent가 실행 이벤트마다 본문 전체를 즉시 다시 그리지 않도록 execution history 전용 배치 렌더 타이머를 추가함 - Cowork/Code 실행 중 RenderMessages 호출을 120ms 단위로 묶어 본문 번쩍임과 잦은 로그 재배치를 줄임 - 검증: 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:
@@ -83,6 +83,7 @@ public partial class ChatWindow : Window
|
||||
private readonly DispatcherTimer _gitRefreshTimer;
|
||||
private readonly DispatcherTimer _conversationSearchTimer;
|
||||
private readonly DispatcherTimer _inputUiRefreshTimer;
|
||||
private readonly DispatcherTimer _executionHistoryRenderTimer;
|
||||
private CancellationTokenSource? _gitStatusRefreshCts;
|
||||
private int _displayedLength; // 현재 화면에 표시된 글자 수
|
||||
private ResourceDictionary? _agentThemeDictionary;
|
||||
@@ -116,6 +117,7 @@ public partial class ChatWindow : Window
|
||||
private int _sessionPostCompactionResponseCount;
|
||||
private int _sessionPostCompactionPromptTokens;
|
||||
private int _sessionPostCompactionCompletionTokens;
|
||||
private bool _pendingExecutionHistoryAutoScroll;
|
||||
private void ApplyQuickActionVisual(Button button, bool active, string activeBg, string activeFg)
|
||||
{
|
||||
if (button?.Content is not string text)
|
||||
@@ -233,6 +235,15 @@ public partial class ChatWindow : Window
|
||||
RefreshContextUsageVisual();
|
||||
RefreshDraftQueueUi();
|
||||
};
|
||||
_executionHistoryRenderTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(120) };
|
||||
_executionHistoryRenderTimer.Tick += (_, _) =>
|
||||
{
|
||||
_executionHistoryRenderTimer.Stop();
|
||||
RenderMessages(preserveViewport: true);
|
||||
if (_pendingExecutionHistoryAutoScroll)
|
||||
AutoScrollIfNeeded();
|
||||
_pendingExecutionHistoryAutoScroll = false;
|
||||
};
|
||||
|
||||
KeyDown += ChatWindow_KeyDown;
|
||||
UpdateConversationFailureFilterUi();
|
||||
@@ -8536,6 +8547,8 @@ public partial class ChatWindow : Window
|
||||
_cursorTimer.Stop();
|
||||
_elapsedTimer.Stop();
|
||||
_typingTimer.Stop();
|
||||
_executionHistoryRenderTimer.Stop();
|
||||
_pendingExecutionHistoryAutoScroll = false;
|
||||
HideStickyProgress();
|
||||
StopRainbowGlow();
|
||||
_activeStreamText = null;
|
||||
@@ -8592,6 +8605,13 @@ public partial class ChatWindow : Window
|
||||
_ = Dispatcher.BeginInvoke(new Action(() => StartNextQueuedDraftIfAny()), DispatcherPriority.Background);
|
||||
}
|
||||
|
||||
private void ScheduleExecutionHistoryRender(bool autoScroll = true)
|
||||
{
|
||||
_pendingExecutionHistoryAutoScroll |= autoScroll;
|
||||
_executionHistoryRenderTimer.Stop();
|
||||
_executionHistoryRenderTimer.Start();
|
||||
}
|
||||
|
||||
// ─── 코워크 에이전트 지원 ────────────────────────────────────────────
|
||||
|
||||
private string BuildCoworkSystemPrompt()
|
||||
@@ -8995,8 +9015,7 @@ public partial class ChatWindow : Window
|
||||
AppendConversationExecutionEvent(evt, eventTab);
|
||||
if (shouldShowExecutionHistory
|
||||
&& string.Equals(eventTab, _activeTab, StringComparison.OrdinalIgnoreCase))
|
||||
RenderMessages(preserveViewport: true);
|
||||
AutoScrollIfNeeded();
|
||||
ScheduleExecutionHistoryRender(autoScroll: true);
|
||||
|
||||
// 하단 상태바 업데이트
|
||||
UpdateStatusBar(evt);
|
||||
|
||||
Reference in New Issue
Block a user