diff --git a/src/Core/Services/TestAutomationHttpService.cs b/src/Core/Services/TestAutomationHttpService.cs index 31d5210..147a328 100644 --- a/src/Core/Services/TestAutomationHttpService.cs +++ b/src/Core/Services/TestAutomationHttpService.cs @@ -189,6 +189,9 @@ namespace NavisworksTransport.Core.Services { try { + // 自动模式:测试请求全程窗口自动选择默认动作并立即关闭(与批处理一致) + using (AutomationModeContext.EnterAutomaticMode()) + { string requestLine = await reader.ReadLineAsync().ConfigureAwait(false); if (string.IsNullOrWhiteSpace(requestLine)) { @@ -446,6 +449,7 @@ namespace NavisworksTransport.Core.Services } await WriteJsonResponseAsync(writer, 404, BuildEnvelope(false, error: $"Unknown endpoint: {request.Path}")).ConfigureAwait(false); + } } catch (Exception ex) {