style(ui): agent strip with worktree panel and diff meter
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -37,6 +37,26 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
[ObservableProperty] private string? _branchLine;
|
||||
[ObservableProperty] private int _turns;
|
||||
[ObservableProperty] private int _tokens;
|
||||
[ObservableProperty] private int _diffAdditions;
|
||||
[ObservableProperty] private int _diffDeletions;
|
||||
[ObservableProperty] private int _commitsOnBranch;
|
||||
|
||||
public string TokensFormatted => Tokens >= 1000 ? $"{Tokens / 1000.0:F1}k" : Tokens.ToString();
|
||||
public string ElapsedFormatted => ""; // placeholder — no start-time stored yet
|
||||
|
||||
partial void OnTokensChanged(int value) => OnPropertyChanged(nameof(TokensFormatted));
|
||||
partial void OnDiffAdditionsChanged(int value) => OnPropertyChanged(nameof(DiffMeterRatio));
|
||||
partial void OnDiffDeletionsChanged(int value) => OnPropertyChanged(nameof(DiffMeterRatio));
|
||||
|
||||
// 0.0–1.0 additions share for the diff meter
|
||||
public double DiffMeterRatio
|
||||
{
|
||||
get
|
||||
{
|
||||
var total = DiffAdditions + DiffDeletions;
|
||||
return total == 0 ? 0.0 : (double)DiffAdditions / total;
|
||||
}
|
||||
}
|
||||
|
||||
public ObservableCollection<LogLineViewModel> Log { get; } = new();
|
||||
public ObservableCollection<SubtaskRowViewModel> Subtasks { get; } = new();
|
||||
|
||||
Reference in New Issue
Block a user