skydive-cli 0.2.0-beta.509 → 0.2.0-beta.559

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
@@ -20,7 +20,7 @@ import semver from "semver";
20
20
 
21
21
  //#region package.json
22
22
  var name = "skydive-cli";
23
- var version = "0.2.0-beta.509";
23
+ var version = "0.2.0-beta.559";
24
24
 
25
25
  //#endregion
26
26
  //#region src/types.ts
@@ -1200,7 +1200,7 @@ const importCommand = {
1200
1200
  process.exit(1);
1201
1201
  }
1202
1202
  }
1203
- const { runChat } = await import("./boot-C-wL4WoP.mjs");
1203
+ const { runChat } = await import("./boot-CCz28zCI.mjs");
1204
1204
  await runChat({
1205
1205
  appUrl,
1206
1206
  sessionToken: session.value.sessionToken,
@@ -1511,7 +1511,7 @@ const chatCommand = {
1511
1511
  printError(`Unknown theme "${themeId}". Valid themes: ${themes.map((t) => t.id).join(", ")}`);
1512
1512
  process.exit(1);
1513
1513
  }
1514
- const { runChat } = await import("./boot-C-wL4WoP.mjs");
1514
+ const { runChat } = await import("./boot-CCz28zCI.mjs");
1515
1515
  await runChat({
1516
1516
  appUrl,
1517
1517
  sessionToken: session.value.sessionToken,
@@ -1810,7 +1810,7 @@ const switchCommand = {
1810
1810
  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.");
1811
1811
  process.exit(1);
1812
1812
  }
1813
- const { runWorkspacePicker } = await import("./boot-C-wL4WoP.mjs");
1813
+ const { runWorkspacePicker } = await import("./boot-CCz28zCI.mjs");
1814
1814
  await runWorkspacePicker(session);
1815
1815
  return;
1816
1816
  }
@@ -17,7 +17,7 @@ import { createHash } from "node:crypto";
17
17
  import { constants } from "node:fs";
18
18
  import { MarkdownRenderable, RenderableEvents, SyntaxStyle, createCliRenderer, decodePasteBytes, detectLinks } from "@opentui/core";
19
19
  import { createRoot, extend, useKeyboard, usePaste, useRenderer, useTerminalDimensions } from "@opentui/react";
20
- import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
20
+ import { createContext, memo, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
21
21
  import { create } from "zustand";
22
22
  import { createConnection } from "node:net";
23
23
  import { access, appendFile, mkdir, mkdtemp, readFile, readdir, rename, rm, stat, unlink, writeFile } from "node:fs/promises";
@@ -8427,6 +8427,7 @@ function ChatScreen({ agent, conversation }) {
8427
8427
  agentHost
8428
8428
  ]);
8429
8429
  const multiAgent = useMemo(() => conversationAgentNames(items, agent.name), [items, agent.name]).size > 1;
8430
+ const themeGeneration = themeVersion();
8430
8431
  useEffect(() => {
8431
8432
  if (!rest || !conversationId) return;
8432
8433
  const abort = new AbortController();
@@ -9643,22 +9644,11 @@ function ChatScreen({ agent, conversation }) {
9643
9644
  agent.name,
9644
9645
  " below."
9645
9646
  ]
9646
- }) : /* @__PURE__ */ jsx(Fragment, { children: items.map((item, i) => {
9647
- const label = multiAgent ? agentLabelFor(items, i) : null;
9648
- return /* @__PURE__ */ jsxs("box", {
9649
- style: { flexDirection: "column" },
9650
- children: [label ? /* @__PURE__ */ jsx("box", {
9651
- style: {
9652
- paddingLeft: 3,
9653
- paddingRight: 1
9654
- },
9655
- children: /* @__PURE__ */ jsx("text", {
9656
- fg: theme.muted,
9657
- children: /* @__PURE__ */ jsx("b", { children: label })
9658
- })
9659
- }) : null, /* @__PURE__ */ jsx(RenderItem, { item })]
9660
- }, item.id);
9661
- }) }), run.kind !== "idle" ? /* @__PURE__ */ jsx(ActivityRow, {
9647
+ }) : items.map((item, i) => /* @__PURE__ */ jsx(TranscriptRow, {
9648
+ item,
9649
+ label: multiAgent ? agentLabelFor(items, i) : null,
9650
+ themeVersion: themeGeneration
9651
+ }, item.id)), run.kind !== "idle" ? /* @__PURE__ */ jsx(ActivityRow, {
9662
9652
  label: run.kind === "sending" ? "sending" : "working",
9663
9653
  startedAtMs: run.startedAtMs
9664
9654
  }) : null]
@@ -9933,6 +9923,34 @@ function CredentialPromptBox({ prompt, height, onInput, onSubmit }) {
9933
9923
  });
9934
9924
  }
9935
9925
  /**
9926
+ * One transcript row: the optional agent-attribution label plus the item's own
9927
+ * rendering. Memoized on the item because the reducer rebuilds the `items`
9928
+ * array on every stream chunk while leaving finished items' objects untouched.
9929
+ * Without the memo, one text delta re-rendered every row in the scrollback, and
9930
+ * each re-render pushes content through that row's native OpenTUI text buffers,
9931
+ * which never hand their memory back — so a long session grew O(turns^2)
9932
+ * resident memory (~1GB after 6k deltas in a soak; ~190MB with the memo).
9933
+ *
9934
+ * `themeVersion` is a prop rather than a read because rows resolve colors from
9935
+ * the mutable `theme` binding during render: a swap mutates that object in
9936
+ * place, so the memo needs the version bump to know its output is stale.
9937
+ */
9938
+ const TranscriptRow = memo(function TranscriptRow({ item, label }) {
9939
+ return /* @__PURE__ */ jsxs("box", {
9940
+ style: { flexDirection: "column" },
9941
+ children: [label ? /* @__PURE__ */ jsx("box", {
9942
+ style: {
9943
+ paddingLeft: 3,
9944
+ paddingRight: 1
9945
+ },
9946
+ children: /* @__PURE__ */ jsx("text", {
9947
+ fg: theme.muted,
9948
+ children: /* @__PURE__ */ jsx("b", { children: label })
9949
+ })
9950
+ }) : null, /* @__PURE__ */ jsx(RenderItem, { item })]
9951
+ });
9952
+ });
9953
+ /**
9936
9954
  * A live indicator at the foot of the transcript while a run is in flight: an
9937
9955
  * animated spinner plus a label and a seconds counter, so it's obvious the
9938
9956
  * agent is still working even during long gaps between chunks. The counter
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skydive-cli",
3
- "version": "0.2.0-beta.509",
3
+ "version": "0.2.0-beta.559",
4
4
  "description": "Skydive CLI — cloud agents from the command line",
5
5
  "homepage": "https://skydive.com",
6
6
  "license": "MIT",