using ClaudeDo.Data.Models;
using TaskStatus = ClaudeDo.Data.Models.TaskStatus;

namespace ClaudeDo.Data.Filtering.Filters;

public sealed class ReviewFilter : ITaskListFilter
{
    public string Id => "virtual:review";
    public bool Matches(TaskEntity t) =>
        t.Status == TaskStatus.Done &&
        t.Worktree is { State: WorktreeState.Active };
    public bool ShouldCount(TaskEntity t) => Matches(t);
    public bool MatchesAsContext(TaskEntity t, IReadOnlyList<TaskEntity> all) => false;
}
