chore(tools): centralize pagination cap helper

This commit is contained in:
Mathias Bergqvist
2026-05-04 23:06:38 +02:00
parent 4274b48ea5
commit 1f9934349b
4 changed files with 15 additions and 10 deletions

View File

@@ -76,9 +76,7 @@ func (t *CodeSearch) Call(ctx context.Context, raw json.RawMessage) (json.RawMes
if args.Page < 1 {
args.Page = 1
}
if args.Limit < 1 || args.Limit > 50 {
args.Limit = 30
}
args.Limit = capLimit(args.Limit, 30)
if args.Repo != "" {
return t.singleRepo(ctx, args)