Merge polecat/Coma: add --pinned/--no-pinned list flags

This commit is contained in:
Steve Yegge
2025-12-19 01:28:45 -08:00
3 changed files with 32 additions and 2 deletions

View File

@@ -156,6 +156,9 @@ type ListArgs struct {
// Priority range
PriorityMin *int `json:"priority_min,omitempty"`
PriorityMax *int `json:"priority_max,omitempty"`
// Pinned filtering (bd-p8e)
Pinned *bool `json:"pinned,omitempty"`
}
// CountArgs represents arguments for the count operation

View File

@@ -698,6 +698,9 @@ func (s *Server) handleList(req *Request) Response {
filter.PriorityMin = listArgs.PriorityMin
filter.PriorityMax = listArgs.PriorityMax
// Pinned filtering (bd-p8e)
filter.Pinned = listArgs.Pinned
// Guard against excessive ID lists to avoid SQLite parameter limits
const maxIDs = 1000
if len(filter.IDs) > maxIDs {