Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/PlanViewer.App/Controls/QuerySessionControl.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ private void HumanAdvice_Click(object? sender, RoutedEventArgs e)
if (analysis == null) { SetStatus("No plan to analyze", autoClear: false); return; }

var text = TextFormatter.Format(analysis);
ShowAdviceWindow("Advice for Humans", text);
ShowAdviceWindow("Advice for Humans", text, analysis);
}

private void RobotAdvice_Click(object? sender, RoutedEventArgs e)
Expand All @@ -706,9 +706,9 @@ private void RobotAdvice_Click(object? sender, RoutedEventArgs e)
ShowAdviceWindow("Advice for Robots", json);
}

private void ShowAdviceWindow(string title, string content)
private void ShowAdviceWindow(string title, string content, AnalysisResult? analysis = null)
{
var styledContent = AdviceContentBuilder.Build(content);
var styledContent = AdviceContentBuilder.Build(content, analysis);

var scrollViewer = new ScrollViewer
{
Expand Down
6 changes: 3 additions & 3 deletions src/PlanViewer.App/MainWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ private DockPanel CreatePlanTabContent(PlanViewerControl viewer)
{
if (viewer.CurrentPlan == null) return;
var analysis = ResultMapper.Map(viewer.CurrentPlan, "file", viewer.Metadata);
ShowAdviceWindow("Advice for Humans", TextFormatter.Format(analysis));
ShowAdviceWindow("Advice for Humans", TextFormatter.Format(analysis), analysis);
};

robotBtn.Click += (_, _) =>
Expand Down Expand Up @@ -566,9 +566,9 @@ private DockPanel CreatePlanTabContent(PlanViewerControl viewer)
return panel;
}

private void ShowAdviceWindow(string title, string content)
private void ShowAdviceWindow(string title, string content, AnalysisResult? analysis = null)
{
var styledContent = AdviceContentBuilder.Build(content);
var styledContent = AdviceContentBuilder.Build(content, analysis);

var scrollViewer = new ScrollViewer
{
Expand Down
Loading