런처 즉시 표시 유지하고 색인 시작 시점 지연

LauncherWindow 사전 생성은 복원해 런처 호출 반응성을 유지했습니다.

대신 인덱스 전체 스캔과 감시는 런처를 여는 순간이 아니라 실제 검색이 시작될 때만 한 번 지연 시작하도록 변경했습니다.

README와 DEVELOPMENT 문서를 2026-04-06 17:52(KST) 기준으로 갱신했고 Release 빌드에서 경고 0 오류 0을 확인했습니다.
This commit is contained in:
2026-04-06 17:43:03 +09:00
parent 7889189e41
commit e439fd144e
4 changed files with 13 additions and 15 deletions

View File

@@ -14,7 +14,6 @@ public partial class App : System.Windows.Application
private System.Threading.Mutex? _singleInstanceMutex;
private InputListener? _inputListener;
private LauncherWindow? _launcher;
private LauncherViewModel? _launcherViewModel;
private NotifyIcon? _trayIcon;
private Views.TrayMenuWindow? _trayMenu;
private SettingsService? _settings;
@@ -278,7 +277,11 @@ public partial class App : System.Windows.Application
_pluginHost = pluginHost;
// ─── 런처 윈도우 ──────────────────────────────────────────────────────
_launcherViewModel = new LauncherViewModel(commandResolver, settings);
var vm = new LauncherViewModel(commandResolver, settings);
_launcher = new LauncherWindow(vm)
{
OpenSettingsAction = OpenSettings
};
// ─── 클립보드 히스토리 초기화 (메시지 펌프 시작 직후 — 런처 표시 불필요) ──
Dispatcher.BeginInvoke(
@@ -667,7 +670,7 @@ public partial class App : System.Windows.Application
/// <summary>AX Agent 창 열기 (트레이 메뉴 등에서 호출).</summary>
private Views.ChatWindow? _chatWindow;
private void EnsureIndexWarmupStarted()
public void EnsureIndexWarmupStarted()
{
if (_indexService == null) return;
if (Interlocked.Exchange(ref _indexWarmupStarted, 1) == 1) return;
@@ -688,22 +691,10 @@ public partial class App : System.Windows.Application
private void ShowLauncherWindow()
{
EnsureLauncherCreated();
if (_launcher == null) return;
EnsureIndexWarmupStarted();
_launcher.Show();
}
private void EnsureLauncherCreated()
{
if (_launcher != null || _launcherViewModel == null) return;
_launcher = new LauncherWindow(_launcherViewModel)
{
OpenSettingsAction = OpenSettings
};
}
private void OpenAiChat()
{
if (_settings == null) return;

View File

@@ -280,6 +280,8 @@ public partial class LauncherViewModel : INotifyPropertyChanged
private async Task SearchAsync(string query)
{
(System.Windows.Application.Current as App)?.EnsureIndexWarmupStarted();
// CTS 취소는 setter에서 이미 처리됨. 새 토큰만 발급.
_searchCts = new CancellationTokenSource();
var ct = _searchCts.Token;