@pipod/cli 0.1.16 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +28 -6
- package/dist/cli.js.map +1 -1
- package/docs/pod-list-pagination.md +52 -0
- package/man/pipod-config.5 +1 -1
- package/man/pipod.1 +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -8133,7 +8133,12 @@ function subObject(fields) {
|
|
|
8133
8133
|
return Object.keys(out2).length > 0 ? out2 : void 0;
|
|
8134
8134
|
};
|
|
8135
8135
|
}
|
|
8136
|
+
function modelPatterns(value) {
|
|
8137
|
+
const pattern = cleanString(2048);
|
|
8138
|
+
return Array.isArray(value) && value.length <= 256 && value.every((entry) => pattern(entry) !== void 0) ? [...value] : void 0;
|
|
8139
|
+
}
|
|
8136
8140
|
var UI_SETTINGS_SCHEMA = {
|
|
8141
|
+
enabledModels: modelPatterns,
|
|
8137
8142
|
// May be a plain name or pi's "light/dark" auto pair.
|
|
8138
8143
|
theme: cleanString(128),
|
|
8139
8144
|
hideThinkingBlock: bool,
|
|
@@ -14894,14 +14899,31 @@ import * as path22 from "path";
|
|
|
14894
14899
|
var PAGE_LIMIT = 200;
|
|
14895
14900
|
async function listAllPods(client, query) {
|
|
14896
14901
|
const pods = [];
|
|
14902
|
+
const seenIds = /* @__PURE__ */ new Set();
|
|
14903
|
+
const seenCursors = /* @__PURE__ */ new Set();
|
|
14904
|
+
let cursor;
|
|
14897
14905
|
let before;
|
|
14898
14906
|
for (; ; ) {
|
|
14899
|
-
const page = await client.listPods({ mine: true, limit: PAGE_LIMIT, before, ...query });
|
|
14900
|
-
|
|
14901
|
-
|
|
14902
|
-
|
|
14903
|
-
|
|
14904
|
-
|
|
14907
|
+
const page = await client.listPods({ mine: true, limit: PAGE_LIMIT, cursor, before, ...query });
|
|
14908
|
+
for (const pod of page.pods) {
|
|
14909
|
+
if (!seenIds.has(pod.id)) pods.push(pod);
|
|
14910
|
+
seenIds.add(pod.id);
|
|
14911
|
+
}
|
|
14912
|
+
const next = page.nextCursor !== void 0 ? page.nextCursor : page.pods.length < PAGE_LIMIT ? null : activityStamp(page.pods.at(-1));
|
|
14913
|
+
if (next === null) return { pods };
|
|
14914
|
+
if (seenCursors.has(next)) {
|
|
14915
|
+
throw new PiPodError("the server repeated a pod-list cursor", {
|
|
14916
|
+
hint: "the listing is incomplete; upgrade the server and try again"
|
|
14917
|
+
});
|
|
14918
|
+
}
|
|
14919
|
+
seenCursors.add(next);
|
|
14920
|
+
if (page.nextCursor !== void 0) {
|
|
14921
|
+
cursor = next;
|
|
14922
|
+
before = void 0;
|
|
14923
|
+
} else {
|
|
14924
|
+
before = next;
|
|
14925
|
+
cursor = void 0;
|
|
14926
|
+
}
|
|
14905
14927
|
}
|
|
14906
14928
|
}
|
|
14907
14929
|
async function podsInScope(client, flags, cwd) {
|