메모리 include 감사 로그와 AX Agent 메모리 상태 UX 강화
- AgentMemoryService에 @include 성공/차단 감사 로그(MemoryInclude) 기록 추가 - Cowork/Code 하단 폴더 바에 메모리 규칙/학습 메모리 상태 요약 표시 추가 - 설정의 외부 메모리 include 안내 문구를 감사 로그 기준으로 정리 - dotnet build 검증 완료 (경고 0 / 오류 0)
This commit is contained in:
@@ -76,6 +76,7 @@ public partial class ChatWindow
|
||||
LoadCompactionMetricsFromConversation();
|
||||
UpdatePermissionUI();
|
||||
UpdateDataUsageUI();
|
||||
UpdateMemoryStatusUi();
|
||||
RefreshContextUsageVisual();
|
||||
ScheduleGitBranchRefresh();
|
||||
UpdateGitBranchUi(_currentGitBranchName, GitBranchFilesText?.Text ?? "", GitBranchAddedText?.Text ?? "", GitBranchDeletedText?.Text ?? "", _currentGitTooltip ?? "", BtnGitBranch?.Visibility ?? Visibility.Collapsed);
|
||||
@@ -86,6 +87,61 @@ public partial class ChatWindow
|
||||
_folderDataUsage = GetAutomaticFolderDataUsage();
|
||||
}
|
||||
|
||||
private void UpdateMemoryStatusUi()
|
||||
{
|
||||
if (BtnMemoryStatus == null || MemoryStatusLabel == null)
|
||||
return;
|
||||
|
||||
if (_activeTab == "Chat")
|
||||
{
|
||||
BtnMemoryStatus.Visibility = Visibility.Collapsed;
|
||||
MemoryStatusSeparator.Visibility = Visibility.Collapsed;
|
||||
return;
|
||||
}
|
||||
|
||||
var app = System.Windows.Application.Current as App;
|
||||
var memory = app?.MemoryService;
|
||||
if (memory == null || !_settings.Settings.Llm.EnableAgentMemory)
|
||||
{
|
||||
MemoryStatusLabel.Text = "메모리 꺼짐";
|
||||
BtnMemoryStatus.ToolTip = "에이전트 메모리가 비활성화되어 있습니다.";
|
||||
BtnMemoryStatus.Visibility = Visibility.Visible;
|
||||
MemoryStatusSeparator.Visibility = Visibility.Visible;
|
||||
return;
|
||||
}
|
||||
|
||||
var workFolder = GetCurrentWorkFolder();
|
||||
memory.Load(workFolder);
|
||||
var docs = memory.InstructionDocuments;
|
||||
var learned = memory.All.Count;
|
||||
|
||||
MemoryStatusLabel.Text = docs.Count > 0 || learned > 0
|
||||
? $"메모리 {docs.Count} · 학습 {learned}"
|
||||
: "메모리 없음";
|
||||
|
||||
var lines = docs
|
||||
.Take(4)
|
||||
.Select(doc =>
|
||||
{
|
||||
var priority = doc.Priority > 0 ? $"우선순위 {doc.Priority}" : "우선순위 미정";
|
||||
var description = string.IsNullOrWhiteSpace(doc.Description) ? "" : $" · {doc.Description}";
|
||||
return $"[{doc.Label}] {priority}{description}";
|
||||
})
|
||||
.ToList();
|
||||
|
||||
if (docs.Count > lines.Count)
|
||||
lines.Add($"외 {docs.Count - lines.Count}개 규칙");
|
||||
|
||||
var includePolicy = _settings.Settings.Llm.AllowExternalMemoryIncludes
|
||||
? "외부 include 허용"
|
||||
: "외부 include 차단";
|
||||
BtnMemoryStatus.ToolTip = lines.Count == 0
|
||||
? $"계층형 규칙이 없습니다.\n학습 메모리 {learned}개\n{includePolicy}"
|
||||
: $"계층형 규칙 {docs.Count}개 · 학습 메모리 {learned}개\n{string.Join("\n", lines)}\n{includePolicy}";
|
||||
BtnMemoryStatus.Visibility = Visibility.Visible;
|
||||
MemoryStatusSeparator.Visibility = Visibility.Visible;
|
||||
}
|
||||
|
||||
private void UpdateSelectedPresetGuide(ChatConversation? conversation = null)
|
||||
{
|
||||
if (SelectedPresetGuide == null || SelectedPresetGuideTitle == null || SelectedPresetGuideDesc == null)
|
||||
|
||||
Reference in New Issue
Block a user