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:
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user