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>
20 lines
495 B
C#
20 lines
495 B
C#
using System.Collections;
|
|
using Avalonia;
|
|
using Avalonia.Controls;
|
|
|
|
namespace ClaudeDo.Ui.Views.Controls;
|
|
|
|
public partial class DiffLinesView : UserControl
|
|
{
|
|
public static readonly StyledProperty<IEnumerable?> LinesProperty =
|
|
AvaloniaProperty.Register<DiffLinesView, IEnumerable?>(nameof(Lines));
|
|
|
|
public IEnumerable? Lines
|
|
{
|
|
get => GetValue(LinesProperty);
|
|
set => SetValue(LinesProperty, value);
|
|
}
|
|
|
|
public DiffLinesView() => InitializeComponent();
|
|
}
|