AX Agent 재생성 흐름과 엔진 마감 문구를 상태 기반으로 정리
Some checks failed
Release Gate / gate (push) Has been cancelled
Some checks failed
Release Gate / gate (push) Has been cancelled
- regenerate/retry가 MessagePanel 직접 삭제 대신 conversation state 수정 후 RenderMessages 경로를 타도록 정리 - AxAgentExecutionEngine에 UI용 마감 helper를 추가해 취소/오류/빈 응답과 Cowork·Code 완료 문구를 정상 한국어 기준으로 정규화 - Paused/Resumed 실행 이벤트는 debug가 아닐 때 기본 타임라인에서 숨겨 Cowork/Code 노이즈를 축소 - README와 docs/DEVELOPMENT.md에 2026-04-05 18:20 (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:
@@ -155,7 +155,7 @@ public sealed class AxAgentExecutionEngine
|
||||
string? content,
|
||||
ChatStorageService? storage = null)
|
||||
{
|
||||
var normalized = NormalizeAssistantContent(conversation, tab, content);
|
||||
var normalized = NormalizeAssistantContentForUi(conversation, tab, content);
|
||||
if (tab is "Cowork" or "Code")
|
||||
conversation.ShowExecutionHistory = false;
|
||||
|
||||
@@ -163,6 +163,47 @@ public sealed class AxAgentExecutionEngine
|
||||
return normalized;
|
||||
}
|
||||
|
||||
public FinalizedContent FinalizeExecutionContentForUi(string? currentContent, Exception? error = null, bool cancelled = false)
|
||||
{
|
||||
if (cancelled)
|
||||
{
|
||||
var content = string.IsNullOrWhiteSpace(currentContent) ? "(취소됨)" : currentContent!;
|
||||
return new FinalizedContent(content, true, "사용자가 작업을 중단했습니다.");
|
||||
}
|
||||
|
||||
if (error != null)
|
||||
return new FinalizedContent($"오류: {error.Message}", false, error.Message);
|
||||
|
||||
return new FinalizedContent(currentContent ?? string.Empty, false, null);
|
||||
}
|
||||
|
||||
public string NormalizeAssistantContentForUi(
|
||||
ChatConversation conversation,
|
||||
string runTab,
|
||||
string? content)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(content))
|
||||
return content;
|
||||
|
||||
var latestEventSummary = conversation.ExecutionEvents?
|
||||
.Where(evt => !string.IsNullOrWhiteSpace(evt.Summary))
|
||||
.OrderByDescending(evt => evt.Timestamp)
|
||||
.Select(evt => evt.Summary.Trim())
|
||||
.FirstOrDefault();
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(latestEventSummary))
|
||||
{
|
||||
return runTab switch
|
||||
{
|
||||
"Cowork" => $"코워크 작업이 완료되었습니다.\n\n{latestEventSummary}",
|
||||
"Code" => $"코드 작업이 완료되었습니다.\n\n{latestEventSummary}",
|
||||
_ => latestEventSummary,
|
||||
};
|
||||
}
|
||||
|
||||
return "(빈 응답)";
|
||||
}
|
||||
|
||||
public FinalizedContent FinalizeExecutionContent(string? currentContent, Exception? error = null, bool cancelled = false)
|
||||
{
|
||||
if (cancelled)
|
||||
|
||||
Reference in New Issue
Block a user