feat: bd list defaults to non-closed issues with 50 limit (GH#788)

Changes:
- Default to excluding closed issues (use --all to include)
- Default limit of 50 issues (use --limit 0 for unlimited)
- --all flag now overrides the closed filter

This addresses agent context blowout from seeing hundreds of closed issues.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-29 17:53:57 -08:00
parent a7f34d8f89
commit 34e2548c86
6 changed files with 48 additions and 2 deletions

View File

@@ -208,6 +208,9 @@ type ListArgs struct {
// Molecule type filtering
MolType string `json:"mol_type,omitempty"`
// Status exclusion (for default non-closed behavior, GH#788)
ExcludeStatus []string `json:"exclude_status,omitempty"`
}
// CountArgs represents arguments for the count operation

View File

@@ -980,6 +980,13 @@ func (s *Server) handleList(req *Request) Response {
filter.MolType = &molType
}
// Status exclusion (for default non-closed behavior, GH#788)
if len(listArgs.ExcludeStatus) > 0 {
for _, s := range listArgs.ExcludeStatus {
filter.ExcludeStatus = append(filter.ExcludeStatus, types.Status(s))
}
}
// Guard against excessive ID lists to avoid SQLite parameter limits
const maxIDs = 1000
if len(filter.IDs) > maxIDs {