MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / getNextPage

Method getNextPage

out/cli.cjs:69873–69890  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69871 this.body = body;
69872 }
69873 hasNextPage() {
69874 const items = this.getPaginatedItems();
69875 if (!items.length)
69876 return false;
69877 return this.nextPageInfo() != null;
69878 }
69879 async getNextPage() {
69880 const nextInfo = this.nextPageInfo();
69881 if (!nextInfo) {
69882 throw new AnthropicError("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");
69883 }
69884 const nextOptions = { ...this.options };
69885 if ("params" in nextInfo && typeof nextOptions.query === "object") {
69886 nextOptions.query = { ...nextOptions.query, ...nextInfo.params };
69887 } else if ("url" in nextInfo) {
69888 const params = [...Object.entries(nextOptions.query || {}), ...nextInfo.url.searchParams.entries()];
69889 for (const [key, value] of params) {
69890 nextInfo.url.searchParams.set(key, value);
69891 }
69892 nextOptions.query = void 0;
69893 nextOptions.path = nextInfo.url.toString();

Callers 1

iterPagesMethod · 0.80

Calls 7

__classPrivateFieldGet6Function · 0.85
__classPrivateFieldGet8Function · 0.85
nextPageInfoMethod · 0.80
requestAPIListMethod · 0.80
entriesMethod · 0.45
setMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected