모델 프로파일 기반 Cowork/Code 루프와 진행 UX 고도화 반영
- 등록 모델 실행 프로파일을 검증 게이트, 문서 fallback, post-tool verification까지 확장 적용 - Cowork/Code 진행 카드에 계획/도구/검증/압축/폴백/재시도 단계 메타를 추가해 대기 상태 가시성 강화 - OpenAI/vLLM tool 요청에 병렬 도구 호출 힌트를 추가하고 회귀 프롬프트 문서를 프로파일 기준으로 전면 정리 - 검증: 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:
@@ -1,6 +1,4 @@
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Interop;
|
||||
using System.Windows.Threading;
|
||||
@@ -28,7 +26,6 @@ public partial class ReminderPopupWindow : Window
|
||||
// ─── 타이머 ───────────────────────────────────────────────────────────────
|
||||
private readonly DispatcherTimer _timer;
|
||||
private readonly EventHandler _tickHandler;
|
||||
private readonly CancellationTokenSource _autoCloseCts = new();
|
||||
private readonly DateTime _closeAtUtc;
|
||||
private readonly int _displaySeconds;
|
||||
|
||||
@@ -74,17 +71,17 @@ public partial class ReminderPopupWindow : Window
|
||||
};
|
||||
|
||||
// ── 타이머 ──
|
||||
// DispatcherPriority.Normal: Background보다 높아 에이전트 루프 이벤트 홍수 때도 안정적으로 발화.
|
||||
_tickHandler = (_, _) =>
|
||||
{
|
||||
var remainingSeconds = Math.Max(0, (_closeAtUtc - DateTime.UtcNow).TotalSeconds);
|
||||
var remainingSeconds = Math.Max(0.0, (_closeAtUtc - DateTime.UtcNow).TotalSeconds);
|
||||
CountdownBar.Value = remainingSeconds;
|
||||
if (remainingSeconds <= 0)
|
||||
if (remainingSeconds <= 0.0)
|
||||
Close();
|
||||
};
|
||||
_timer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(1) };
|
||||
_timer = new DispatcherTimer(DispatcherPriority.Normal) { Interval = TimeSpan.FromMilliseconds(500) };
|
||||
_timer.Tick += _tickHandler;
|
||||
_timer.Start();
|
||||
_ = StartAutoCloseAsync(_autoCloseCts.Token);
|
||||
|
||||
// ── Esc 키 닫기 ──
|
||||
KeyDown += (_, e) =>
|
||||
@@ -139,34 +136,10 @@ public partial class ReminderPopupWindow : Window
|
||||
|
||||
private void CloseBtn_Click(object sender, RoutedEventArgs e) => Close();
|
||||
|
||||
private async Task StartAutoCloseAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
try
|
||||
{
|
||||
await Task.Delay(TimeSpan.FromSeconds(_displaySeconds), cancellationToken);
|
||||
if (cancellationToken.IsCancellationRequested)
|
||||
return;
|
||||
|
||||
await Dispatcher.InvokeAsync(() =>
|
||||
{
|
||||
if (IsVisible)
|
||||
Close();
|
||||
}, DispatcherPriority.Background, cancellationToken);
|
||||
}
|
||||
catch (TaskCanceledException)
|
||||
{
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnClosed(EventArgs e)
|
||||
{
|
||||
_autoCloseCts.Cancel();
|
||||
_timer.Stop();
|
||||
_timer.Tick -= _tickHandler;
|
||||
_autoCloseCts.Dispose();
|
||||
base.OnClosed(e);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user