移除主页面推理诊断行并保留运行日志记录

This commit is contained in:
tfarcraw 2026-11-18 21:54:13 +08:00
parent 2349ac726d
commit f0f5e650bc
2 changed files with 11 additions and 4 deletions

View File

@ -73,7 +73,6 @@
<TextBlock Text="帧率" />
<TextBlock Grid.Column="1" Text="{Binding FpsText}" TextWrapping="Wrap" Foreground="{StaticResource FgDim}" />
</Grid>
<TextBlock x:Name="InferenceBackend" Text="{Binding InferenceBackendText}" Margin="0,8,0,0" FontSize="12" TextWrapping="Wrap" Foreground="{StaticResource FgDim}" />
<Grid x:Name="RunStatisticsPanel" ColumnDefinitions="Auto,*,Auto,*" RowDefinitions="Auto,Auto,Auto" Margin="0,10,0,0">
<TextBlock Text="完成次数" Margin="0,0,8,6" />
<TextBlock Grid.Column="1" Text="{Binding CompletedCount}" Foreground="{StaticResource Accent}" />

View File

@ -98,6 +98,14 @@ internal static class Smoke
Console.WriteLine("Models: "+string.Join(", ",model.AgentModels));
await model.ShutdownAsync();dialog.Close();_exit=0;return;
}
if(Environment.GetCommandLineArgs().Contains("--diagnostics-only"))
{
var model=app.Container.Resolve<SopPageViewModel>();
model.ApplyRecipeCommand.Execute();await Task.Delay(80);
Check(!window.GetVisualDescendants().OfType<TextBlock>().Any(t=>t.Name=="InferenceBackend"),"Operator page hides inference backend diagnostic details");
Check(model.Logs.Any(l=>l.Message.Contains("推理设备:")&&l.Message.Contains("步骤确认=")),"Inference backend diagnostics remain available in the runtime log");
_exit=0;return;
}
if(Environment.GetCommandLineArgs().Contains("--usb-capture-only")) { await CheckUsbCapture(app); _exit=0; return; }
CheckCameraPreferences(app);
CheckRecipePreferences(app);
@ -126,9 +134,9 @@ internal static class Smoke
sop.SelectedRecipe="pending.yaml";
Check(sop.ActiveRecipe==applied,"Unapplied recipe selection does not change current recipe");
navigation.SelectedIndex=0;await Task.Delay(80);
Check(window.GetVisualDescendants().OfType<TextBlock>().Any(t=>t.Name=="InferenceBackend"&&t.Text==sop.InferenceBackendText)
&&sop.InferenceBackendText.Contains("手部:")&&sop.InferenceBackendText.Contains("步骤确认:"),
"Operator page displays the actual inference backends, including CPU fallback");
Check(!window.GetVisualDescendants().OfType<TextBlock>().Any(t=>t.Name=="InferenceBackend")
&&sop.Logs.Any(l=>l.Message.Contains("推理设备:")&&l.Message.Contains("步骤确认=")),
"Inference backend diagnostics appear in logs instead of the operator page");
Check(window.GetVisualDescendants().OfType<SopPage>().Single().GetVisualDescendants().OfType<TextBlock>().Any(t=>t.Text=="pending.yaml"),"Operator page updates to the selected recipe without applying or starting");
sop.SelectedRecipe=selected;await Task.Delay(80);
Check(window.GetVisualDescendants().OfType<SopPage>().Single().GetVisualDescendants().OfType<TextBlock>().Any(t=>t.Text==selected),"Recipe selection changes notify the operator page immediately");