refactor(ui): share color-coded diff rendering between per-task and combined diff viewers
Extract the unified-diff parser into UnifiedDiffParser and the styled line renderer into a reusable DiffLinesView control. The combined (planning) diff now parses its unified-diff string and renders color-coded rows (green additions / red deletions, file headers) identical to the per-task viewer instead of dumping plain text into a TextBox. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -66,14 +66,7 @@
|
||||
<Grid Grid.Column="1" Background="{DynamicResource VoidBrush}">
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Auto"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
<TextBox Text="{Binding DisplayedDiff, Mode=OneWay}"
|
||||
IsReadOnly="True"
|
||||
AcceptsReturn="True"
|
||||
FontFamily="{DynamicResource MonoFont}"
|
||||
FontSize="{StaticResource FontSizeBody}"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Padding="8"/>
|
||||
<ctl:DiffLinesView Lines="{Binding DiffLines}"/>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user