skydive-cli 0.1.0-beta.287 → 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.
|
|
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-
|
|
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-
|
|
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
|
-
|
|
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 [
|
|
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
|
-
|
|
1412
|
-
if (!removed) return;
|
|
1420
|
+
if (!list.some((c) => c.id === id)) return;
|
|
1413
1421
|
setConfirmId(null);
|
|
1414
|
-
|
|
1422
|
+
setRemovedIds((prev) => new Set([...prev, id]));
|
|
1415
1423
|
rest.deleteConversation({ conversationId: id }).catch((err) => {
|
|
1416
|
-
|
|
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
|
}),
|
|
@@ -1752,16 +1765,44 @@ function Indented({ children }) {
|
|
|
1752
1765
|
let cached = null;
|
|
1753
1766
|
let cachedVersion = -1;
|
|
1754
1767
|
let retiring = null;
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1768
|
+
/**
|
|
1769
|
+
* Scope lookup falls back to the FIRST dot segment only (`markup.heading.1`
|
|
1770
|
+
* → `markup`, never `markup.heading`), so every dotted scope the bundled
|
|
1771
|
+
* tree-sitter queries emit must be registered verbatim. The markdown query
|
|
1772
|
+
* tags ATX headings exclusively with `markup.heading.1`–`.6`; before these
|
|
1773
|
+
* were registered, headings (and fenced code blocks, via `markup.raw.block`)
|
|
1774
|
+
* silently rendered as plain text. Guarded by syntax.test.ts.
|
|
1775
|
+
*/
|
|
1776
|
+
function syntaxStyleTable() {
|
|
1777
|
+
return {
|
|
1761
1778
|
default: { fg: theme.assistant },
|
|
1762
1779
|
conceal: { fg: theme.dim },
|
|
1763
1780
|
"markup.heading": {
|
|
1764
|
-
fg: theme.
|
|
1781
|
+
fg: theme.syntaxMagenta,
|
|
1782
|
+
bold: true
|
|
1783
|
+
},
|
|
1784
|
+
"markup.heading.1": {
|
|
1785
|
+
fg: theme.syntaxMagenta,
|
|
1786
|
+
bold: true
|
|
1787
|
+
},
|
|
1788
|
+
"markup.heading.2": {
|
|
1789
|
+
fg: theme.syntaxMagenta,
|
|
1790
|
+
bold: true
|
|
1791
|
+
},
|
|
1792
|
+
"markup.heading.3": {
|
|
1793
|
+
fg: theme.syntaxMagenta,
|
|
1794
|
+
bold: true
|
|
1795
|
+
},
|
|
1796
|
+
"markup.heading.4": {
|
|
1797
|
+
fg: theme.syntaxMagenta,
|
|
1798
|
+
bold: true
|
|
1799
|
+
},
|
|
1800
|
+
"markup.heading.5": {
|
|
1801
|
+
fg: theme.syntaxMagenta,
|
|
1802
|
+
bold: true
|
|
1803
|
+
},
|
|
1804
|
+
"markup.heading.6": {
|
|
1805
|
+
fg: theme.syntaxMagenta,
|
|
1765
1806
|
bold: true
|
|
1766
1807
|
},
|
|
1767
1808
|
"markup.strong": {
|
|
@@ -1777,7 +1818,10 @@ function syntaxStyle() {
|
|
|
1777
1818
|
dim: true
|
|
1778
1819
|
},
|
|
1779
1820
|
"markup.raw": { fg: theme.syntaxTeal },
|
|
1821
|
+
"markup.raw.block": { fg: theme.syntaxTeal },
|
|
1780
1822
|
"markup.list": { fg: theme.syntaxOrange },
|
|
1823
|
+
"markup.list.checked": { fg: theme.syntaxGreen },
|
|
1824
|
+
"markup.list.unchecked": { fg: theme.syntaxOrange },
|
|
1781
1825
|
"markup.quote": {
|
|
1782
1826
|
fg: theme.muted,
|
|
1783
1827
|
italic: true
|
|
@@ -1786,17 +1830,20 @@ function syntaxStyle() {
|
|
|
1786
1830
|
fg: theme.syntaxCyan,
|
|
1787
1831
|
underline: true
|
|
1788
1832
|
},
|
|
1833
|
+
"markup.link.bracket.close": { fg: theme.syntaxCyan },
|
|
1789
1834
|
"markup.link.label": { fg: theme.syntaxCyan },
|
|
1790
1835
|
"markup.link.url": {
|
|
1791
1836
|
fg: theme.dim,
|
|
1792
1837
|
underline: true
|
|
1793
1838
|
},
|
|
1839
|
+
"character.special": { fg: theme.syntaxCyan },
|
|
1794
1840
|
keyword: { fg: theme.syntaxMagenta },
|
|
1795
1841
|
"keyword.function": { fg: theme.syntaxMagenta },
|
|
1796
1842
|
"keyword.return": { fg: theme.syntaxMagenta },
|
|
1797
1843
|
"keyword.operator": { fg: theme.syntaxMagenta },
|
|
1798
1844
|
string: { fg: theme.syntaxGreen },
|
|
1799
1845
|
"string.special": { fg: theme.syntaxTeal },
|
|
1846
|
+
character: { fg: theme.syntaxGreen },
|
|
1800
1847
|
comment: {
|
|
1801
1848
|
fg: theme.dim,
|
|
1802
1849
|
italic: true
|
|
@@ -1826,7 +1873,14 @@ function syntaxStyle() {
|
|
|
1826
1873
|
module: { fg: theme.syntaxBlue },
|
|
1827
1874
|
label: { fg: theme.syntaxCyan },
|
|
1828
1875
|
embedded: { fg: theme.fg }
|
|
1829
|
-
}
|
|
1876
|
+
};
|
|
1877
|
+
}
|
|
1878
|
+
function syntaxStyle() {
|
|
1879
|
+
if (cached && cachedVersion === themeVersion()) return cached;
|
|
1880
|
+
retiring?.destroy();
|
|
1881
|
+
retiring = cached;
|
|
1882
|
+
cachedVersion = themeVersion();
|
|
1883
|
+
cached = SyntaxStyle.fromStyles(syntaxStyleTable());
|
|
1830
1884
|
return cached;
|
|
1831
1885
|
}
|
|
1832
1886
|
|