You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (paginationWarning&&!this.shouldOutputJson(flags)) {
443
438
this.log(paginationWarning);
444
439
}
445
440
446
441
if (this.shouldOutputJson(flags)) {
447
-
this.logJsonResult({ items, hasMore }, flags);
442
+
const next =buildPaginationNext(hasMore);
443
+
this.logJsonResult({ items, hasMore, ...(next&& { next }) }, flags);
448
444
} else {
449
445
this.log(`Found ${items.length} items:\n`);
450
446
for (const item ofitems) {
@@ -470,8 +466,8 @@ Key conventions for list output:
470
466
- `formatLabel(text)` for field labels in detail lines (automatically appends `:`)
471
467
- `formatSuccess()` is not used in list commands — it's for confirming an action completed
472
468
- `formatLimitWarning()` should only be shown when `hasMore` is true — it means there are more results beyond the limit
473
-
- Always include `hasMore` in JSON output for paginated commands so consumers know if results are truncated
474
-
- Use `collectPaginatedResults()` for SDK paginated results, `collectHttpPaginatedResults()` for `rest.request()` results, and `collectFilteredPaginatedResults()` when a client-side filter is applied across pages
469
+
- Always include `hasMore`and `next`in JSON output for paginated commands. `next` provides continuation hints (and `start` timestamp for history commands)
470
+
- Use `collectPaginatedResults()` for SDK paginated results and `collectFilteredPaginatedResults()` when a client-side filter is applied across pages
0 commit comments