AX Agent 메모리 적용 상태 요약 UI 추가
Some checks failed
Release Gate / gate (push) Has been cancelled

- AX Agent 설정의 에이전트 메모리 섹션에 현재 적용 중인 메모리 계층 요약 row 추가
- 계층형 규칙 수와 학습 메모리 수를 한눈에 보여주고 활성 규칙의 우선순위, 설명, 태그를 바로 읽을 수 있도록 정리
- 새로고침 버튼을 추가해 현재 작업 폴더 기준 메모리 적용 상태를 즉시 다시 계산 가능하게 구현
- 메모리 파일 저장과 학습 메모리 초기화 이후 요약이 자동으로 다시 반영되도록 연결
- README 및 DEVELOPMENT 문서에 2026-04-07 01:00 (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:
2026-04-07 00:39:26 +09:00
parent 0bfec6fb78
commit aef5f51c89
4 changed files with 84 additions and 5 deletions

View File

@@ -4890,11 +4890,11 @@
</StackPanel>
</Grid>
</Border>
<Border Style="{StaticResource AgentSettingsRow}">
<Grid>
<StackPanel HorizontalAlignment="Left">
<TextBlock Style="{StaticResource RowLabel}" Text="메모리 관리"/>
<TextBlock Style="{StaticResource RowHint}" Text="계층형 메모리 파일을 직접 열어 수정하거나, 학습 메모리를 초기화합니다."/>
<Border Style="{StaticResource AgentSettingsRow}">
<Grid>
<StackPanel HorizontalAlignment="Left">
<TextBlock Style="{StaticResource RowLabel}" Text="메모리 관리"/>
<TextBlock Style="{StaticResource RowHint}" Text="계층형 메모리 파일을 직접 열어 수정하거나, 학습 메모리를 초기화합니다."/>
<WrapPanel Margin="0,10,0,0">
<Button Style="{StaticResource MemoryScopeButton}" Content="관리형 편집" Click="BtnEditManagedMemory_Click"/>
<Button Style="{StaticResource MemoryScopeButton}" Content="사용자 편집" Click="BtnEditUserMemory_Click"/>
@@ -4918,6 +4918,24 @@
</StackPanel>
</Grid>
</Border>
<Border Style="{StaticResource AgentSettingsRow}">
<Grid>
<StackPanel HorizontalAlignment="Left" Margin="0,0,60,0">
<TextBlock Style="{StaticResource RowLabel}" Text="적용 중 메모리 계층"/>
<TextBlock x:Name="TxtMemoryOverviewSummary"
Style="{StaticResource RowHint}"
Text="현재 메모리 적용 상태를 불러오는 중입니다."/>
<TextBlock x:Name="TxtMemoryOverviewScopes"
Margin="0,8,0,0"
FontSize="12"
Foreground="{DynamicResource SecondaryText}"
TextWrapping="Wrap"/>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center">
<Button Style="{StaticResource MemoryScopeButton}" Content="새로고침" Click="BtnRefreshMemoryOverview_Click"/>
</StackPanel>
</Grid>
</Border>
<Border Style="{StaticResource AgentSettingsRow}">
<Grid>
<StackPanel HorizontalAlignment="Left" Margin="0,0,60,0">

View File

@@ -70,6 +70,7 @@ public partial class SettingsWindow : Window
Loaded += async (_, _) =>
{
BindIndexProgress();
RefreshMemoryOverview();
RefreshHotkeyBadges();
SetVersionText();
EnsureHotkeyInCombo();
@@ -2979,9 +2980,12 @@ public partial class SettingsWindow : Window
var app = System.Windows.Application.Current as App;
app?.MemoryService?.Clear();
RefreshMemoryOverview();
CustomMessageBox.Show("에이전트 메모리가 초기화되었습니다.", "완료", MessageBoxButton.OK, MessageBoxImage.Information);
}
private void BtnRefreshMemoryOverview_Click(object sender, RoutedEventArgs e) => RefreshMemoryOverview();
private void BtnEditManagedMemory_Click(object sender, RoutedEventArgs e) => OpenMemoryScopeEditor("managed", "관리형 메모리");
private void BtnEditUserMemory_Click(object sender, RoutedEventArgs e) => OpenMemoryScopeEditor("user", "사용자 메모리");
private void BtnEditProjectMemory_Click(object sender, RoutedEventArgs e) => OpenMemoryScopeEditor("project", "프로젝트 메모리");
@@ -3172,6 +3176,7 @@ public partial class SettingsWindow : Window
}
memory.Load(workFolder);
RefreshMemoryOverview();
CustomMessageBox.Show("메모리 파일이 저장되었습니다.", "메모리 편집", MessageBoxButton.OK, MessageBoxImage.Information);
dlg.Close();
}
@@ -3190,6 +3195,50 @@ public partial class SettingsWindow : Window
dlg.ShowDialog();
}
private void RefreshMemoryOverview()
{
if (TxtMemoryOverviewSummary == null || TxtMemoryOverviewScopes == null)
return;
var app = System.Windows.Application.Current as App;
var memory = app?.MemoryService;
if (memory == null)
{
TxtMemoryOverviewSummary.Text = "메모리 서비스를 사용할 수 없습니다.";
TxtMemoryOverviewScopes.Text = "";
return;
}
var workFolder = _vm.Service.Settings.Llm.WorkFolder;
memory.Load(workFolder);
var docs = memory.InstructionDocuments;
var learnedCount = memory.All.Count;
TxtMemoryOverviewSummary.Text = $"계층형 규칙 {docs.Count}개, 학습 메모리 {learnedCount}개가 현재 컨텍스트에 반영됩니다.";
if (docs.Count == 0)
{
TxtMemoryOverviewScopes.Text = "현재 활성화된 계층형 메모리 파일이 없습니다.";
return;
}
var lines = docs
.Take(6)
.Select(doc =>
{
var priority = doc.Priority > 0 ? $"우선순위 {doc.Priority}" : "우선순위 미정";
var description = string.IsNullOrWhiteSpace(doc.Description) ? "" : $" · {doc.Description}";
var tags = doc.Tags.Count > 0 ? $" · tags: {string.Join(", ", doc.Tags)}" : "";
return $"[{doc.Label}] {priority}{description}{tags}";
})
.ToList();
if (docs.Count > lines.Count)
lines.Add($"외 {docs.Count - lines.Count}개 규칙");
TxtMemoryOverviewScopes.Text = string.Join("\n", lines);
}
// ─── 에이전트 훅 관리 ─────────────────────────────────────────────────
private void AddHookBtn_Click(object sender, MouseButtonEventArgs e)