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:
@@ -1604,6 +1604,16 @@ func (s *SQLiteStorage) SearchIssues(ctx context.Context, query string, filter t
|
||||
args = append(args, types.StatusTombstone)
|
||||
}
|
||||
|
||||
// Status exclusion (for default non-closed behavior, GH#788)
|
||||
if len(filter.ExcludeStatus) > 0 {
|
||||
placeholders := make([]string, len(filter.ExcludeStatus))
|
||||
for i, s := range filter.ExcludeStatus {
|
||||
placeholders[i] = "?"
|
||||
args = append(args, string(s))
|
||||
}
|
||||
whereClauses = append(whereClauses, fmt.Sprintf("status NOT IN (%s)", strings.Join(placeholders, ",")))
|
||||
}
|
||||
|
||||
if filter.Priority != nil {
|
||||
whereClauses = append(whereClauses, "priority = ?")
|
||||
args = append(args, *filter.Priority)
|
||||
|
||||
@@ -998,6 +998,16 @@ func (t *sqliteTxStorage) SearchIssues(ctx context.Context, query string, filter
|
||||
args = append(args, types.StatusTombstone)
|
||||
}
|
||||
|
||||
// Status exclusion (for default non-closed behavior, GH#788)
|
||||
if len(filter.ExcludeStatus) > 0 {
|
||||
placeholders := make([]string, len(filter.ExcludeStatus))
|
||||
for i, s := range filter.ExcludeStatus {
|
||||
placeholders[i] = "?"
|
||||
args = append(args, string(s))
|
||||
}
|
||||
whereClauses = append(whereClauses, fmt.Sprintf("status NOT IN (%s)", strings.Join(placeholders, ",")))
|
||||
}
|
||||
|
||||
if filter.Priority != nil {
|
||||
whereClauses = append(whereClauses, "priority = ?")
|
||||
args = append(args, *filter.Priority)
|
||||
|
||||
Reference in New Issue
Block a user