Skip to content

Commit 453c238

Browse files
Pass AnalysisResult through to AdviceContentBuilder (#72)
Thread analysis data to ShowAdviceWindow so triage cards and other structured features have access to parsed statement results. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 079a3d7 commit 453c238

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/PlanViewer.App/Controls/QuerySessionControl.axaml.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ private void HumanAdvice_Click(object? sender, RoutedEventArgs e)
694694
if (analysis == null) { SetStatus("No plan to analyze", autoClear: false); return; }
695695

696696
var text = TextFormatter.Format(analysis);
697-
ShowAdviceWindow("Advice for Humans", text);
697+
ShowAdviceWindow("Advice for Humans", text, analysis);
698698
}
699699

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

709-
private void ShowAdviceWindow(string title, string content)
709+
private void ShowAdviceWindow(string title, string content, AnalysisResult? analysis = null)
710710
{
711-
var styledContent = AdviceContentBuilder.Build(content);
711+
var styledContent = AdviceContentBuilder.Build(content, analysis);
712712

713713
var scrollViewer = new ScrollViewer
714714
{

src/PlanViewer.App/MainWindow.axaml.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ private DockPanel CreatePlanTabContent(PlanViewerControl viewer)
444444
{
445445
if (viewer.CurrentPlan == null) return;
446446
var analysis = ResultMapper.Map(viewer.CurrentPlan, "file", viewer.Metadata);
447-
ShowAdviceWindow("Advice for Humans", TextFormatter.Format(analysis));
447+
ShowAdviceWindow("Advice for Humans", TextFormatter.Format(analysis), analysis);
448448
};
449449

450450
robotBtn.Click += (_, _) =>
@@ -566,9 +566,9 @@ private DockPanel CreatePlanTabContent(PlanViewerControl viewer)
566566
return panel;
567567
}
568568

569-
private void ShowAdviceWindow(string title, string content)
569+
private void ShowAdviceWindow(string title, string content, AnalysisResult? analysis = null)
570570
{
571-
var styledContent = AdviceContentBuilder.Build(content);
571+
var styledContent = AdviceContentBuilder.Build(content, analysis);
572572

573573
var scrollViewer = new ScrollViewer
574574
{

0 commit comments

Comments
 (0)