skydive-cli 0.1.0-beta.288 → 0.1.0-beta.291

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/js/bin.mjs CHANGED
@@ -16,7 +16,7 @@ import zlib from "node:zlib";
16
16
  import os from "node:os";
17
17
 
18
18
  //#region package.json
19
- var version$1 = "0.1.0-beta.288";
19
+ var version$1 = "0.1.0-beta.291";
20
20
 
21
21
  //#endregion
22
22
  //#region src/types.ts
@@ -960,7 +960,7 @@ function createRestClient({ appUrl, sessionToken }) {
960
960
  const { agent } = await post(`/api/v1/agents/${encodeURIComponent(agentId)}`, { model }, updateAgentResponseSchema, "PATCH");
961
961
  return { model: agent.model ?? null };
962
962
  },
963
- listConversations: async ({ agentId, limit }) => {
963
+ listConversations: async ({ agentId, limit, onPage }) => {
964
964
  const all = [];
965
965
  const maxConversations = limit ?? 5e3;
966
966
  let cursor;
@@ -975,6 +975,7 @@ function createRestClient({ appUrl, sessionToken }) {
975
975
  const page = await get(`/api/v1/conversations?${params.toString()}`, listConversationsResponseSchema);
976
976
  all.push(...page.conversations);
977
977
  cursor = page.nextCursor ?? void 0;
978
+ onPage?.(limit ? all.slice(0, limit) : [...all]);
978
979
  } while (cursor && all.length < maxConversations);
979
980
  return limit ? all.slice(0, limit) : all;
980
981
  },
@@ -2591,7 +2592,7 @@ const chatCommand = {
2591
2592
  printError(`Unknown theme "${themeId}". Valid themes: ${themes.map((t) => t.id).join(", ")}`);
2592
2593
  process.exit(1);
2593
2594
  }
2594
- const { runChat } = await import("./boot-CWiCh_T9.mjs");
2595
+ const { runChat } = await import("./boot-fBjqXxKo.mjs");
2595
2596
  await runChat({
2596
2597
  appUrl,
2597
2598
  sessionToken: session.value.sessionToken,
@@ -3236,7 +3237,8 @@ const listCommand$1 = {
3236
3237
  }), argv.agent ?? null);
3237
3238
  const conversations = await client.listConversations({
3238
3239
  agentId: agent.id,
3239
- limit: argv.limit
3240
+ limit: argv.limit,
3241
+ onPage: null
3240
3242
  });
3241
3243
  if (argv.json) {
3242
3244
  output(argv, conversations);
@@ -3373,7 +3375,7 @@ const switchCommand = {
3373
3375
  printError("The workspace picker needs the Bun runtime and it could not be set up automatically. Pass a workspace slug instead, or install Bun and retry.");
3374
3376
  process.exit(1);
3375
3377
  }
3376
- const { runWorkspacePicker } = await import("./boot-CWiCh_T9.mjs");
3378
+ const { runWorkspacePicker } = await import("./boot-fBjqXxKo.mjs");
3377
3379
  await runWorkspacePicker(session);
3378
3380
  return;
3379
3381
  }
@@ -1341,12 +1341,19 @@ function ConversationPickerScreen({ agent }) {
1341
1341
  try {
1342
1342
  const conversations = await rest.listConversations({
1343
1343
  agentId: agent.id,
1344
- limit: 50
1344
+ onPage: (partial) => {
1345
+ if (!cancelled) setState({
1346
+ kind: "ready",
1347
+ conversations: partial,
1348
+ complete: false
1349
+ });
1350
+ }
1345
1351
  });
1346
1352
  if (cancelled) return;
1347
1353
  setState({
1348
1354
  kind: "ready",
1349
- conversations
1355
+ conversations,
1356
+ complete: true
1350
1357
  });
1351
1358
  } catch (err) {
1352
1359
  if (cancelled) return;
@@ -1371,17 +1378,19 @@ function ConversationPickerScreen({ agent }) {
1371
1378
  return /* @__PURE__ */ jsx(ConversationList, {
1372
1379
  agent,
1373
1380
  conversations: state.conversations,
1381
+ complete: state.complete,
1374
1382
  onPick: goTo
1375
1383
  });
1376
1384
  }
1377
- function ConversationList({ agent, conversations, onPick }) {
1385
+ function ConversationList({ agent, conversations, complete, onPick }) {
1378
1386
  const { width, height } = useTerminalDimensions();
1379
1387
  const rest = useStore((s) => s.rest);
1380
1388
  const [query, setQuery] = useState("");
1381
1389
  const [highlight, setHighlight] = useState(0);
1382
- const [list, setList] = useState(conversations);
1390
+ const [removedIds, setRemovedIds] = useState(/* @__PURE__ */ new Set());
1383
1391
  const [confirmId, setConfirmId] = useState(null);
1384
1392
  const [error, setError] = useState(null);
1393
+ const list = conversations.filter((c) => !removedIds.has(c.id));
1385
1394
  const hits = fuzzyFilter(query, list, conversationKeys);
1386
1395
  const rows = [{ kind: "new" }, ...hits.map((hit) => ({
1387
1396
  kind: "conv",
@@ -1408,12 +1417,15 @@ function ConversationList({ agent, conversations, onPick }) {
1408
1417
  };
1409
1418
  const deleteConversation = (id) => {
1410
1419
  if (!rest) return;
1411
- const removed = list.find((c) => c.id === id);
1412
- if (!removed) return;
1420
+ if (!list.some((c) => c.id === id)) return;
1413
1421
  setConfirmId(null);
1414
- setList((prev) => prev.filter((c) => c.id !== id));
1422
+ setRemovedIds((prev) => new Set([...prev, id]));
1415
1423
  rest.deleteConversation({ conversationId: id }).catch((err) => {
1416
- setList((prev) => prev.some((c) => c.id === id) ? prev : [removed, ...prev]);
1424
+ setRemovedIds((prev) => {
1425
+ const next = new Set(prev);
1426
+ next.delete(id);
1427
+ return next;
1428
+ });
1417
1429
  setError(err instanceof Error ? err.message : String(err));
1418
1430
  });
1419
1431
  };
@@ -1478,6 +1490,7 @@ function ConversationList({ agent, conversations, onPick }) {
1478
1490
  hits.length,
1479
1491
  "/",
1480
1492
  list.length,
1493
+ complete ? "" : " (loading…)",
1481
1494
  " · ↑/↓ move · ↵ open · ctrl+d delete · esc back"
1482
1495
  ]
1483
1496
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skydive-cli",
3
- "version": "0.1.0-beta.288",
3
+ "version": "0.1.0-beta.291",
4
4
  "description": "Skydive CLI — manage AI agents from the command line",
5
5
  "homepage": "https://skydive.com",
6
6
  "license": "MIT",