skydive-cli 0.1.0-beta.49 → 0.1.0-beta.50

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
@@ -13,7 +13,7 @@ import fs from "node:fs";
13
13
  import zlib from "node:zlib";
14
14
 
15
15
  //#region package.json
16
- var version$1 = "0.1.0-beta.49";
16
+ var version$1 = "0.1.0-beta.50";
17
17
 
18
18
  //#endregion
19
19
  //#region src/types.ts
@@ -2046,7 +2046,7 @@ const chatCommand = {
2046
2046
  printError(`Unknown theme "${themeId}". Valid themes: ${themes.map((t) => t.id).join(", ")}`);
2047
2047
  process.exit(1);
2048
2048
  }
2049
- const { runChat } = await import("./boot-h5qiGgfB.mjs");
2049
+ const { runChat } = await import("./boot-SDnaYmi-.mjs");
2050
2050
  await runChat({
2051
2051
  appUrl,
2052
2052
  sessionToken: session.value.sessionToken,
@@ -2064,7 +2064,7 @@ async function runPrintMode({ argv, appUrl }) {
2064
2064
  printError(`${session.error.message} For non-interactive use, run \`skydive auth login --web\` first, or set SKYDIVE_SESSION_TOKEN.`);
2065
2065
  process.exit(1);
2066
2066
  }
2067
- const { runPrint, readStdin } = await import("./print-B76KzChc.mjs").then((n) => n.t);
2067
+ const { runPrint, readStdin } = await import("./print-BtMdNPJR.mjs").then((n) => n.t);
2068
2068
  let prompt = (argv.print ?? "").trim();
2069
2069
  if (!prompt) {
2070
2070
  if (process.stdin.isTTY) {
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { i as createRestClient, n as resolveAgent, r as HttpError } from "./print-B76KzChc.mjs";
2
+ import { i as createRestClient, n as resolveAgent, r as HttpError } from "./print-BtMdNPJR.mjs";
3
3
  import { _ as resolveWebUrl, a as noColorRequested, c as themeMode, d as themesForMode, f as getActiveWorkspaceId, g as getSavedTheme, h as DEFAULT_APP_URL, i as monoTheme, l as themeModeFromColorFgBg, m as DEFAULT_API_URL, n as applyTheme, o as theme, p as listWorkspaces, r as findTheme, s as themeForMode, t as DEFAULT_THEME_ID, u as themeVersion, v as saveTheme } from "./bin.mjs";
4
4
  import path, { basename, isAbsolute, join, win32 } from "node:path";
5
5
  import { z } from "zod";
@@ -2999,6 +2999,17 @@ function RenderItem({ item }) {
2999
2999
  barColor: null,
3000
3000
  children: /* @__PURE__ */ jsx(CardItem, { item })
3001
3001
  });
3002
+ case "recap": return /* @__PURE__ */ jsx(Row, {
3003
+ barColor: null,
3004
+ children: /* @__PURE__ */ jsxs("text", {
3005
+ fg: theme.dim,
3006
+ children: [
3007
+ /* @__PURE__ */ jsx("b", { children: "recap" }),
3008
+ " ",
3009
+ /* @__PURE__ */ jsx("i", { children: item.text })
3010
+ ]
3011
+ })
3012
+ });
3002
3013
  }
3003
3014
  }
3004
3015
  function StreamingAssistantText({ text }) {
@@ -4786,9 +4797,15 @@ function ChatScreen({ agent, conversation }) {
4786
4797
  let cancelled = false;
4787
4798
  (async () => {
4788
4799
  try {
4789
- const messages = await rest.listMessages({ conversationId: initialConversationId });
4800
+ const [messages, recapText] = await Promise.all([rest.listMessages({ conversationId: initialConversationId }), rest.getRecap({ conversationId: initialConversationId }).catch(() => null)]);
4790
4801
  if (cancelled) return;
4791
- setItems(uiMessagesToItems(messages));
4802
+ const loaded = uiMessagesToItems(messages);
4803
+ if (recapText && loaded.length > 0) loaded.push({
4804
+ kind: "recap",
4805
+ id: `recap-${initialConversationId}`,
4806
+ text: recapText
4807
+ });
4808
+ setItems(loaded);
4792
4809
  } catch (err) {
4793
4810
  if (cancelled) return;
4794
4811
  setItems((prev) => [...prev, {
@@ -107,6 +107,10 @@ function createRestClient({ appUrl, sessionToken }) {
107
107
  const { messages } = await get(`/api/v1/conversations/${encodeURIComponent(conversationId)}/messages`, listMessagesResponseSchema);
108
108
  return messages;
109
109
  },
110
+ getRecap: async ({ conversationId }) => {
111
+ const { recap } = await get(`/api/v1/conversations/${encodeURIComponent(conversationId)}/recap`, recapResponseSchema);
112
+ return recap?.text ?? null;
113
+ },
110
114
  uploadAttachment: async ({ agentId, fileName, mediaType, data }) => {
111
115
  const size = data.byteLength;
112
116
  const presign = await post("/api/v1/attachments/presign", {
@@ -311,6 +315,7 @@ const uiMessageSchema = z.object({
311
315
  role: z.string(),
312
316
  parts: z.array(uiMessagePartSchema)
313
317
  });
318
+ const recapResponseSchema = z.object({ recap: z.object({ text: z.string() }).nullable() });
314
319
  const listMessagesResponseSchema = z.object({ messages: z.array(uiMessageSchema) });
315
320
  const sendResultSchema = z.object({
316
321
  runId: z.string(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skydive-cli",
3
- "version": "0.1.0-beta.49",
3
+ "version": "0.1.0-beta.50",
4
4
  "description": "Skydive CLI — manage AI agents from the command line",
5
5
  "homepage": "https://skydive.com",
6
6
  "license": "MIT",