AX Agent 로컬 응답 경로를 모델 렌더 축으로 통합
Some checks failed
Release Gate / gate (push) Has been cancelled

claw-code 기준 채팅 엔진 정상화 작업을 이어서 진행했습니다.

수동 컨텍스트 압축 결과와 slash 로컬 응답 경로에서 직접 AddMessageBubble로 UI 버블을 꽂던 흐름을 제거하고 conversation/session에 먼저 커밋한 뒤 RenderMessages로만 다시 그리도록 정리했습니다.

이로써 일반 전송, 재생성, 로컬 응답이 서로 다른 렌더 경로를 타며 순서가 꼬이던 상태를 줄였고 Cowork/Code 전용 엔진 정리에 필요한 공통 렌더 축을 더 맞췄습니다.

검증은 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:10:31 +09:00
parent 890c8ce76b
commit f82cfc4541
3 changed files with 12 additions and 18 deletions

View File

@@ -6864,9 +6864,9 @@ public partial class ChatWindow : Window
_storage.Save(conv);
ChatSession?.RememberConversation(runTab, conv.Id);
UpdateChatTitle();
AddMessageBubble("user", commandText);
InputBox.Text = "";
EmptyState.Visibility = Visibility.Collapsed;
RenderMessages(preserveViewport: true);
ForceScrollToEnd();
var llm = _settings.Settings.Llm;
@@ -6895,25 +6895,17 @@ public partial class ChatWindow : Window
? $"컨텍스트 압축을 수행했습니다. 입력 토큰 추정치: {beforeTokens:N0} → {afterTokens:N0}\n- 단계: {compactResult.StageSummary}\n- 절감량: {compactResult.SavedTokens:N0} tokens"
: "현재 대화는 압축할 충분한 이전 컨텍스트가 없어 변경 없이 유지했습니다.";
var assistantMsg = new ChatMessage { Role = "assistant", Content = assistantText };
lock (_convLock)
{
var session = ChatSession;
if (session != null)
{
session.AppendMessage(runTab, assistantMsg);
_currentConversation = session.CurrentConversation;
conv = _currentConversation!;
}
else
{
conv.Messages.Add(assistantMsg);
}
_chatEngine.CommitAssistantMessage(session, conv, runTab, assistantText, _storage);
_currentConversation = session?.CurrentConversation ?? conv;
conv = _currentConversation!;
}
SaveLastConversations();
_storage.Save(conv);
AddMessageBubble("assistant", assistantText);
RenderMessages(preserveViewport: true);
ForceScrollToEnd();
if (StatusTokens != null)
StatusTokens.Text = $"컨텍스트 {Services.TokenEstimator.Format(beforeTokens)} → {Services.TokenEstimator.Format(afterTokens)}";
@@ -6934,7 +6926,6 @@ public partial class ChatWindow : Window
}
var userMsg = new ChatMessage { Role = "user", Content = commandText };
var assistantMsg = new ChatMessage { Role = "assistant", Content = assistantText };
lock (_convLock)
{
@@ -6942,14 +6933,14 @@ public partial class ChatWindow : Window
if (session != null)
{
session.AppendMessage(runTab, userMsg, useForTitle: true);
session.AppendMessage(runTab, assistantMsg);
_chatEngine.CommitAssistantMessage(session, conv, runTab, assistantText, _storage);
_currentConversation = session.CurrentConversation;
conv = _currentConversation!;
}
else
{
conv.Messages.Add(userMsg);
conv.Messages.Add(assistantMsg);
_chatEngine.CommitAssistantMessage(null, conv, runTab, assistantText, _storage);
}
}
@@ -6957,10 +6948,9 @@ public partial class ChatWindow : Window
_storage.Save(conv);
ChatSession?.RememberConversation(runTab, conv.Id);
UpdateChatTitle();
AddMessageBubble("user", commandText);
AddMessageBubble("assistant", assistantText);
InputBox.Text = "";
EmptyState.Visibility = Visibility.Collapsed;
RenderMessages(preserveViewport: true);
ForceScrollToEnd();
}