wayang-ai 0.6.0 → 0.6.1

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.
Files changed (2) hide show
  1. package/dist/cli.js +35 -11
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -823,7 +823,7 @@ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
823
823
  function UserRow({ item, width }) {
824
824
  const dim = !item.read;
825
825
  const text = item.content;
826
- const padded = text.length < width ? text + " ".repeat(4) : text;
826
+ const padded = text.length < width ? text.padEnd(width) : text;
827
827
  return /* @__PURE__ */ jsxs(Box, { children: [
828
828
  /* @__PURE__ */ jsxs(
829
829
  Text,
@@ -1598,6 +1598,7 @@ function StreamingSpinner(props) {
1598
1598
 
1599
1599
  // src/tui/components/chat-area/chat-area.tsx
1600
1600
  import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
1601
+ var PENDING_INDENT = theme.secondary.indent;
1601
1602
  function shouldShowGap(prev, _current) {
1602
1603
  if (!prev) return false;
1603
1604
  return true;
@@ -1621,13 +1622,24 @@ var ChatArea = React2.memo(function ChatArea2({ items, busy, streamingItems, con
1621
1622
  },
1622
1623
  item.id
1623
1624
  ) }, "chat"),
1624
- /* @__PURE__ */ jsxs5(Box5, { paddingX: 1, marginTop: items.length > 0 ? theme.spacing.blockGap : 0, children: [
1625
- /* @__PURE__ */ jsx8(StreamingSpinner, { spinning: busy }),
1626
- streamingItems?.[0]?.content && /* @__PURE__ */ jsx8(Text6, { children: streamingItems[0].content })
1627
- ] }),
1628
- dynamicItems.length > 0 && /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", paddingX: 3, marginTop: 1, marginBottom: 1, children: [
1629
- /* @__PURE__ */ jsx8(Box5, { justifyContent: "flex-start", children: /* @__PURE__ */ jsx8(Text6, { color: theme.baseToken.color.textSubtle, dimColor: true, children: "\xB7\xB7\xB7 waiting for process \xB7\xB7\xB7" }) }),
1630
- dynamicItems.map((item) => /* @__PURE__ */ jsx8(Box5, { flexDirection: "column", marginTop: shouldShowGap(null, item) ? theme.spacing.blockGap : 0, children: /* @__PURE__ */ jsx8(ItemRow, { item, contentWidth: width, lookups }) }, item.id))
1625
+ /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", children: [
1626
+ /* @__PURE__ */ jsxs5(Box5, { paddingX: 1, marginTop: items.length > 0 ? theme.spacing.blockGap : 0, children: [
1627
+ /* @__PURE__ */ jsx8(StreamingSpinner, { spinning: busy }),
1628
+ /* @__PURE__ */ jsx8(Box5, { flexDirection: "column", flexGrow: 1, children: streamingItems?.[0]?.content && /* @__PURE__ */ jsx8(Text6, { children: streamingItems[0].content }) })
1629
+ ] }),
1630
+ dynamicItems.length > 0 && /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", paddingX: 1, marginTop: theme.spacing.blockGap, marginBottom: 1, children: [
1631
+ /* @__PURE__ */ jsx8(Box5, { marginLeft: PENDING_INDENT, justifyContent: "flex-start", children: /* @__PURE__ */ jsx8(Text6, { color: theme.baseToken.color.textSubtle, dimColor: true, children: "\xB7\xB7\xB7 waiting for process \xB7\xB7\xB7" }) }),
1632
+ dynamicItems.map((item, idx) => /* @__PURE__ */ jsx8(
1633
+ Box5,
1634
+ {
1635
+ flexDirection: "column",
1636
+ marginLeft: PENDING_INDENT,
1637
+ marginTop: shouldShowGap(idx > 0 ? dynamicItems[idx - 1] : null, item) ? theme.spacing.blockGap : 0,
1638
+ children: /* @__PURE__ */ jsx8(ItemRow, { item, contentWidth: width - PENDING_INDENT, lookups })
1639
+ },
1640
+ item.id
1641
+ ))
1642
+ ] })
1631
1643
  ] })
1632
1644
  ] });
1633
1645
  });
@@ -2374,7 +2386,7 @@ function ControllerPage({ onExit }) {
2374
2386
  });
2375
2387
  });
2376
2388
  return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", children: [
2377
- /* @__PURE__ */ jsx13(Box10, { marginBottom: 1, children: /* @__PURE__ */ jsx13(
2389
+ /* @__PURE__ */ jsx13(Box10, { flexDirection: "column", marginBottom: 1, children: /* @__PURE__ */ jsx13(
2378
2390
  ChatArea,
2379
2391
  {
2380
2392
  items: displayItems,
@@ -2430,7 +2442,7 @@ function AppContent() {
2430
2442
  // package.json
2431
2443
  var package_default = {
2432
2444
  name: "wayang-ai",
2433
- version: "0.6.0",
2445
+ version: "0.6.1",
2434
2446
  description: "Multi-agent orchestration platform",
2435
2447
  type: "module",
2436
2448
  license: "MIT",
@@ -5493,6 +5505,11 @@ var ClaudeCodeWorker = class _ClaudeCodeWorker {
5493
5505
  if (wirePermissions) {
5494
5506
  options.canUseTool = (toolName, input) => this.handleCanUseTool(toolName, input);
5495
5507
  }
5508
+ options.stderr = (data) => {
5509
+ const text = String(data).trimEnd();
5510
+ if (!text.trim()) return;
5511
+ this.logger.debug({ workerId: this.id }, `[claude stderr] ${text}`);
5512
+ };
5496
5513
  const stream = query({
5497
5514
  prompt: this.buildPromptIterable(task.description),
5498
5515
  options
@@ -5502,6 +5519,7 @@ var ClaudeCodeWorker = class _ClaudeCodeWorker {
5502
5519
  for await (const message of stream) {
5503
5520
  if (this.abortController.signal.aborted) break;
5504
5521
  this.processStreamMessage(message, onProgress);
5522
+ if (this._terminalResult) break;
5505
5523
  }
5506
5524
  } finally {
5507
5525
  this._activeQuery = null;
@@ -5655,10 +5673,11 @@ ${leftoverText}` : `${buildThirdPartyPrompt(this.skills)}${initialPrompt}`;
5655
5673
  done: false
5656
5674
  };
5657
5675
  }
5658
- while (this._messageQueue.length === 0) {
5676
+ while (true) {
5659
5677
  if (this.abortController.signal.aborted || this._terminalResult) {
5660
5678
  return { value: void 0, done: true };
5661
5679
  }
5680
+ if (this._messageQueue.length > 0) break;
5662
5681
  await new Promise((resolve11) => {
5663
5682
  this._messageResolve = resolve11;
5664
5683
  });
@@ -5786,6 +5805,11 @@ controller: ${answer}`,
5786
5805
  error: msg.errors.join("\n") || `Claude Code error: ${msg.subtype}`
5787
5806
  };
5788
5807
  }
5808
+ if (this._messageResolve) {
5809
+ const resolve11 = this._messageResolve;
5810
+ this._messageResolve = null;
5811
+ resolve11();
5812
+ }
5789
5813
  const prev = this.state.get("runtimeState");
5790
5814
  this.state.set("runtimeState", {
5791
5815
  ...prev,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wayang-ai",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Multi-agent orchestration platform",
5
5
  "type": "module",
6
6
  "license": "MIT",