전체 코드 오류와 성능 병목을 점검하고 핵심 핫패스를 정리한다
Some checks failed
Release Gate / gate (push) Has been cancelled

- 런처 색인에서 임시 파일, 숨김/시스템 경로, Office 임시 파일을 감시와 색인 대상에서 제외해 불필요한 재색인과 디스크 I/O를 줄인다

- AX Agent 표현 수준 저장값이 매번 rich로 덮어쓰이던 버그를 수정해 balanced/simple/rich 설정이 실제로 유지되게 한다

- 최소화/숨김 상태의 AX Agent 창은 transcript 재렌더를 지연했다가 다시 보일 때 한 번만 처리하고, 런처 인덱스 상태 타이머도 재사용하도록 바꿔 백그라운드 오버헤드를 줄인다

- 검증: 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-06 23:19:02 +09:00
parent 30e8218ba4
commit 45dfa70951
6 changed files with 112 additions and 24 deletions

View File

@@ -28,6 +28,20 @@ public class IndexService : IDisposable
"target"
};
private static readonly HashSet<string> IgnoredFileExtensions = new(StringComparer.OrdinalIgnoreCase)
{
".tmp",
".temp",
".cache",
".log",
".bak",
".swp",
".swo",
".part",
".download",
".crdownload"
};
private readonly SettingsService _settings;
private readonly List<FileSystemWatcher> _watchers = new();
private readonly object _timerLock = new();
@@ -359,7 +373,7 @@ public class IndexService : IDisposable
{
var ext = Path.GetExtension(fullPath).ToLowerInvariant();
var allowedExts = GetAllowedExtensions();
if (allowedExts.Count == 0 || allowedExts.Contains(ext))
if (!IgnoredFileExtensions.Contains(ext) && (allowedExts.Count == 0 || allowedExts.Contains(ext)))
updated = UpsertEntry(snapshot, CreateFileEntry(fullPath));
}
@@ -765,6 +779,9 @@ public class IndexService : IDisposable
ct.ThrowIfCancellationRequested();
var ext = Path.GetExtension(file).ToLowerInvariant();
if (IgnoredFileExtensions.Contains(ext))
continue;
if (allowedExts.Count > 0 && !allowedExts.Contains(ext))
continue;
@@ -848,6 +865,27 @@ public class IndexService : IDisposable
try
{
var fileName = Path.GetFileName(path);
if (string.IsNullOrWhiteSpace(fileName))
return false;
if (fileName.StartsWith("~$", StringComparison.OrdinalIgnoreCase))
return true;
var ext = Path.GetExtension(fileName);
if (!string.IsNullOrWhiteSpace(ext) && IgnoredFileExtensions.Contains(ext))
return true;
if (File.Exists(path) || Directory.Exists(path))
{
var attrs = File.GetAttributes(path);
if ((attrs & FileAttributes.Hidden) == FileAttributes.Hidden ||
(attrs & FileAttributes.System) == FileAttributes.System)
{
return true;
}
}
var normalized = NormalizePath(path);
foreach (var segment in normalized.Split(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar))
{

View File

@@ -174,10 +174,14 @@ public class SettingsService
private void NormalizeRuntimeSettings()
{
// AX Agent 사용 기본 정책: 항상 활성화.
if (!_settings.AiEnabled)
_settings.AiEnabled = true;
var expressionLevel = (_settings.Llm.AgentUiExpressionLevel ?? "").Trim().ToLowerInvariant();
_settings.Llm.AgentUiExpressionLevel = expressionLevel switch
{
"rich" => "rich",
"balanced" => "balanced",
"simple" => "simple",
_ => "balanced"
};
_settings.Llm.FilePermission = PermissionModeCatalog.NormalizeGlobalMode(_settings.Llm.FilePermission);
_settings.Llm.DefaultAgentPermission = PermissionModeCatalog.NormalizeGlobalMode(_settings.Llm.DefaultAgentPermission);
if (_settings.Llm.ToolPermissions != null && _settings.Llm.ToolPermissions.Count > 0)