feat: Add 'bd count' command for counting and grouping issues
Implements a new 'bd count' command that provides efficient issue counting with filtering and grouping capabilities. Features: - Basic count: Returns total count of issues matching filters - All filtering options from 'bd list' (status, priority, type, assignee, labels, dates, etc.) - Grouping via --by-* flags: status, priority, type, assignee, label - JSON output support for both simple and grouped counts - Both daemon and direct mode support Implementation: - Added OpCount operation and CountArgs to RPC protocol - Added Count() method to RPC client - Implemented handleCount() server-side handler with optimized bulk label fetching - Created cmd/bd/count.go with full CLI implementation Performance optimization: - Pre-fetches all labels in a single query when using --by-label to avoid N+1 queries 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -178,6 +178,8 @@ func (s *Server) handleRequest(req *Request) Response {
|
||||
resp = s.handleClose(req)
|
||||
case OpList:
|
||||
resp = s.handleList(req)
|
||||
case OpCount:
|
||||
resp = s.handleCount(req)
|
||||
case OpShow:
|
||||
resp = s.handleShow(req)
|
||||
case OpResolveID:
|
||||
|
||||
Reference in New Issue
Block a user