@volter-ai-dev/supercode-ui 0.1.48 → 0.1.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/components.mjs CHANGED
@@ -1325,7 +1325,7 @@ function ContinuationBar({ state, adapter, labels = DEFAULT_LABELS }) {
1325
1325
  join: state.canAttach,
1326
1326
  branch: state.canBranch
1327
1327
  };
1328
- const continuation = available.join ? "join" : available.resume ? "resume" : available.branch ? "branch" : state.supportsAttach ? "join" : state.supportsResume ? "resume" : state.supportsBranch ? "branch" : null;
1328
+ const continuation = state.supportsAttach ? "join" : state.supportsResume ? "resume" : state.supportsBranch ? "branch" : available.join ? "join" : available.resume ? "resume" : available.branch ? "branch" : null;
1329
1329
  if (!continuation) return /* @__PURE__ */ jsx3("div", { className: "scui-continuation", children: /* @__PURE__ */ jsxs3("span", { children: [
1330
1330
  /* @__PURE__ */ jsx3("strong", { children: activeElsewhere ? "Active elsewhere" : "Read-only" }),
1331
1331
  /* @__PURE__ */ jsx3("small", { children: "This session cannot be continued by an available harness." })
@@ -2640,7 +2640,7 @@ function Receipt({ state, adapter }) {
2640
2640
  ] });
2641
2641
  return null;
2642
2642
  }
2643
- function ConversationActions({ state, adapter, actionPending, onSettings }) {
2643
+ function ConversationActions({ state, adapter, actionPending, onNew, onSettings }) {
2644
2644
  const [open, setOpen] = useState6(false);
2645
2645
  const root = useRef7(null);
2646
2646
  const panel = useRef7(null);
@@ -2651,6 +2651,7 @@ function ConversationActions({ state, adapter, actionPending, onSettings }) {
2651
2651
  {
2652
2652
  label: "Session",
2653
2653
  items: [
2654
+ { key: "new", label: "New chat", onSelect: onNew },
2654
2655
  state.canDetach ? { key: "detach", label: "Detach to read-only", intent: { action: "detach" } } : null,
2655
2656
  state.canOpenTerminal ? { key: "terminal", label: "Prepare terminal handoff", intent: { action: "terminal" } } : null,
2656
2657
  state.canExport && state.exportBackTarget ? { key: "export", label: `Export back to ${harnessDisplayName(state.exportBackTarget)}`, intent: { action: "export", targetHarness: state.exportBackTarget } } : null,
@@ -2721,7 +2722,6 @@ function ChatHeader({ state, adapter, pendingStatus, actionPending, onBack, onNe
2721
2722
  const harness = state.attached?.harness ?? state.harness;
2722
2723
  const title = state.attached ? sessionDisplayName(state.attached) : harnessDisplayName(harness) || "Agent chat";
2723
2724
  const status = state.needsInput ? "Needs input" : pendingStatus === "failed" ? "Send failed" : state.busy ? "Working" : pendingStatus === "sending" ? "Sending" : pendingStatus === "editing" ? "Editing message" : state.messaging === "live_peer" ? "Live" : state.mode === "mirror" ? "Read-only" : "Ready";
2724
- const menu = state.canDetach || state.canOpenTerminal || state.canBranch || state.canAttach || state.canExport || state.canReduce || state.interopSettings || state.interopSettingsError;
2725
2725
  useEffect8(() => {
2726
2726
  if (state.mode === "mirror" && !state.canSend) back.current?.focus({ preventScroll: true });
2727
2727
  }, []);
@@ -2737,8 +2737,7 @@ function ChatHeader({ state, adapter, pendingStatus, actionPending, onBack, onNe
2737
2737
  ] })
2738
2738
  ] }),
2739
2739
  HeaderActions ? /* @__PURE__ */ jsx10(HeaderActions, { state, adapter, value: "chat" }) : null,
2740
- menu ? /* @__PURE__ */ jsx10(ConversationActions, { state, adapter, actionPending, onSettings }) : null,
2741
- /* @__PURE__ */ jsx10("button", { type: "button", "aria-label": "New chat", onClick: onNew, children: /* @__PURE__ */ jsx10(UiIcon, { name: "plus", size: 18 }) }),
2740
+ /* @__PURE__ */ jsx10(ConversationActions, { state, adapter, actionPending, onNew, onSettings }),
2742
2741
  onClose ? /* @__PURE__ */ jsx10("button", { type: "button", "aria-label": "Close", onClick: onClose, children: /* @__PURE__ */ jsx10(UiIcon, { name: "close", size: 18 }) }) : null
2743
2742
  ] });
2744
2743
  }
package/composer.mjs CHANGED
@@ -319,7 +319,7 @@ function ContinuationBar({ state, adapter, labels = DEFAULT_LABELS }) {
319
319
  join: state.canAttach,
320
320
  branch: state.canBranch
321
321
  };
322
- const continuation = available.join ? "join" : available.resume ? "resume" : available.branch ? "branch" : state.supportsAttach ? "join" : state.supportsResume ? "resume" : state.supportsBranch ? "branch" : null;
322
+ const continuation = state.supportsAttach ? "join" : state.supportsResume ? "resume" : state.supportsBranch ? "branch" : available.join ? "join" : available.resume ? "resume" : available.branch ? "branch" : null;
323
323
  if (!continuation) return /* @__PURE__ */ jsx3("div", { className: "scui-continuation", children: /* @__PURE__ */ jsxs3("span", { children: [
324
324
  /* @__PURE__ */ jsx3("strong", { children: activeElsewhere ? "Active elsewhere" : "Read-only" }),
325
325
  /* @__PURE__ */ jsx3("small", { children: "This session cannot be continued by an available harness." })
package/embed.mjs CHANGED
@@ -1288,7 +1288,7 @@ function ContinuationBar({ state, adapter, labels = DEFAULT_LABELS }) {
1288
1288
  join: state.canAttach,
1289
1289
  branch: state.canBranch
1290
1290
  };
1291
- const continuation = available.join ? "join" : available.resume ? "resume" : available.branch ? "branch" : state.supportsAttach ? "join" : state.supportsResume ? "resume" : state.supportsBranch ? "branch" : null;
1291
+ const continuation = state.supportsAttach ? "join" : state.supportsResume ? "resume" : state.supportsBranch ? "branch" : available.join ? "join" : available.resume ? "resume" : available.branch ? "branch" : null;
1292
1292
  if (!continuation) return /* @__PURE__ */ jsx3("div", { className: "scui-continuation", children: /* @__PURE__ */ jsxs3("span", { children: [
1293
1293
  /* @__PURE__ */ jsx3("strong", { children: activeElsewhere ? "Active elsewhere" : "Read-only" }),
1294
1294
  /* @__PURE__ */ jsx3("small", { children: "This session cannot be continued by an available harness." })
@@ -2557,7 +2557,7 @@ function Receipt({ state, adapter }) {
2557
2557
  ] });
2558
2558
  return null;
2559
2559
  }
2560
- function ConversationActions({ state, adapter, actionPending, onSettings }) {
2560
+ function ConversationActions({ state, adapter, actionPending, onNew, onSettings }) {
2561
2561
  const [open, setOpen] = useState6(false);
2562
2562
  const root = useRef7(null);
2563
2563
  const panel = useRef7(null);
@@ -2568,6 +2568,7 @@ function ConversationActions({ state, adapter, actionPending, onSettings }) {
2568
2568
  {
2569
2569
  label: "Session",
2570
2570
  items: [
2571
+ { key: "new", label: "New chat", onSelect: onNew },
2571
2572
  state.canDetach ? { key: "detach", label: "Detach to read-only", intent: { action: "detach" } } : null,
2572
2573
  state.canOpenTerminal ? { key: "terminal", label: "Prepare terminal handoff", intent: { action: "terminal" } } : null,
2573
2574
  state.canExport && state.exportBackTarget ? { key: "export", label: `Export back to ${harnessDisplayName(state.exportBackTarget)}`, intent: { action: "export", targetHarness: state.exportBackTarget } } : null,
@@ -2638,7 +2639,6 @@ function ChatHeader({ state, adapter, pendingStatus, actionPending, onBack, onNe
2638
2639
  const harness = state.attached?.harness ?? state.harness;
2639
2640
  const title = state.attached ? sessionDisplayName(state.attached) : harnessDisplayName(harness) || "Agent chat";
2640
2641
  const status = state.needsInput ? "Needs input" : pendingStatus === "failed" ? "Send failed" : state.busy ? "Working" : pendingStatus === "sending" ? "Sending" : pendingStatus === "editing" ? "Editing message" : state.messaging === "live_peer" ? "Live" : state.mode === "mirror" ? "Read-only" : "Ready";
2641
- const menu = state.canDetach || state.canOpenTerminal || state.canBranch || state.canAttach || state.canExport || state.canReduce || state.interopSettings || state.interopSettingsError;
2642
2642
  useEffect8(() => {
2643
2643
  if (state.mode === "mirror" && !state.canSend) back.current?.focus({ preventScroll: true });
2644
2644
  }, []);
@@ -2654,8 +2654,7 @@ function ChatHeader({ state, adapter, pendingStatus, actionPending, onBack, onNe
2654
2654
  ] })
2655
2655
  ] }),
2656
2656
  HeaderActions ? /* @__PURE__ */ jsx9(HeaderActions, { state, adapter, value: "chat" }) : null,
2657
- menu ? /* @__PURE__ */ jsx9(ConversationActions, { state, adapter, actionPending, onSettings }) : null,
2658
- /* @__PURE__ */ jsx9("button", { type: "button", "aria-label": "New chat", onClick: onNew, children: /* @__PURE__ */ jsx9(UiIcon, { name: "plus", size: 18 }) }),
2657
+ /* @__PURE__ */ jsx9(ConversationActions, { state, adapter, actionPending, onNew, onSettings }),
2659
2658
  onClose ? /* @__PURE__ */ jsx9("button", { type: "button", "aria-label": "Close", onClick: onClose, children: /* @__PURE__ */ jsx9(UiIcon, { name: "close", size: 18 }) }) : null
2660
2659
  ] });
2661
2660
  }
package/messenger.mjs CHANGED
@@ -1285,7 +1285,7 @@ function ContinuationBar({ state, adapter, labels = DEFAULT_LABELS }) {
1285
1285
  join: state.canAttach,
1286
1286
  branch: state.canBranch
1287
1287
  };
1288
- const continuation = available.join ? "join" : available.resume ? "resume" : available.branch ? "branch" : state.supportsAttach ? "join" : state.supportsResume ? "resume" : state.supportsBranch ? "branch" : null;
1288
+ const continuation = state.supportsAttach ? "join" : state.supportsResume ? "resume" : state.supportsBranch ? "branch" : available.join ? "join" : available.resume ? "resume" : available.branch ? "branch" : null;
1289
1289
  if (!continuation) return /* @__PURE__ */ jsx3("div", { className: "scui-continuation", children: /* @__PURE__ */ jsxs3("span", { children: [
1290
1290
  /* @__PURE__ */ jsx3("strong", { children: activeElsewhere ? "Active elsewhere" : "Read-only" }),
1291
1291
  /* @__PURE__ */ jsx3("small", { children: "This session cannot be continued by an available harness." })
@@ -2554,7 +2554,7 @@ function Receipt({ state, adapter }) {
2554
2554
  ] });
2555
2555
  return null;
2556
2556
  }
2557
- function ConversationActions({ state, adapter, actionPending, onSettings }) {
2557
+ function ConversationActions({ state, adapter, actionPending, onNew, onSettings }) {
2558
2558
  const [open, setOpen] = useState6(false);
2559
2559
  const root = useRef7(null);
2560
2560
  const panel = useRef7(null);
@@ -2565,6 +2565,7 @@ function ConversationActions({ state, adapter, actionPending, onSettings }) {
2565
2565
  {
2566
2566
  label: "Session",
2567
2567
  items: [
2568
+ { key: "new", label: "New chat", onSelect: onNew },
2568
2569
  state.canDetach ? { key: "detach", label: "Detach to read-only", intent: { action: "detach" } } : null,
2569
2570
  state.canOpenTerminal ? { key: "terminal", label: "Prepare terminal handoff", intent: { action: "terminal" } } : null,
2570
2571
  state.canExport && state.exportBackTarget ? { key: "export", label: `Export back to ${harnessDisplayName(state.exportBackTarget)}`, intent: { action: "export", targetHarness: state.exportBackTarget } } : null,
@@ -2635,7 +2636,6 @@ function ChatHeader({ state, adapter, pendingStatus, actionPending, onBack, onNe
2635
2636
  const harness = state.attached?.harness ?? state.harness;
2636
2637
  const title = state.attached ? sessionDisplayName(state.attached) : harnessDisplayName(harness) || "Agent chat";
2637
2638
  const status = state.needsInput ? "Needs input" : pendingStatus === "failed" ? "Send failed" : state.busy ? "Working" : pendingStatus === "sending" ? "Sending" : pendingStatus === "editing" ? "Editing message" : state.messaging === "live_peer" ? "Live" : state.mode === "mirror" ? "Read-only" : "Ready";
2638
- const menu = state.canDetach || state.canOpenTerminal || state.canBranch || state.canAttach || state.canExport || state.canReduce || state.interopSettings || state.interopSettingsError;
2639
2639
  useEffect8(() => {
2640
2640
  if (state.mode === "mirror" && !state.canSend) back.current?.focus({ preventScroll: true });
2641
2641
  }, []);
@@ -2651,8 +2651,7 @@ function ChatHeader({ state, adapter, pendingStatus, actionPending, onBack, onNe
2651
2651
  ] })
2652
2652
  ] }),
2653
2653
  HeaderActions ? /* @__PURE__ */ jsx9(HeaderActions, { state, adapter, value: "chat" }) : null,
2654
- menu ? /* @__PURE__ */ jsx9(ConversationActions, { state, adapter, actionPending, onSettings }) : null,
2655
- /* @__PURE__ */ jsx9("button", { type: "button", "aria-label": "New chat", onClick: onNew, children: /* @__PURE__ */ jsx9(UiIcon, { name: "plus", size: 18 }) }),
2654
+ /* @__PURE__ */ jsx9(ConversationActions, { state, adapter, actionPending, onNew, onSettings }),
2656
2655
  onClose ? /* @__PURE__ */ jsx9("button", { type: "button", "aria-label": "Close", onClick: onClose, children: /* @__PURE__ */ jsx9(UiIcon, { name: "close", size: 18 }) }) : null
2657
2656
  ] });
2658
2657
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter-ai-dev/supercode-ui",
3
- "version": "0.1.48",
3
+ "version": "0.1.50",
4
4
  "type": "module",
5
5
  "description": "Composable default UI kit for Supercode-powered coding-agent experiences",
6
6
  "exports": {
@@ -1325,7 +1325,7 @@ function ContinuationBar({ state, adapter, labels = DEFAULT_LABELS }) {
1325
1325
  join: state.canAttach,
1326
1326
  branch: state.canBranch
1327
1327
  };
1328
- const continuation = available.join ? "join" : available.resume ? "resume" : available.branch ? "branch" : state.supportsAttach ? "join" : state.supportsResume ? "resume" : state.supportsBranch ? "branch" : null;
1328
+ const continuation = state.supportsAttach ? "join" : state.supportsResume ? "resume" : state.supportsBranch ? "branch" : available.join ? "join" : available.resume ? "resume" : available.branch ? "branch" : null;
1329
1329
  if (!continuation) return /* @__PURE__ */ jsx3("div", { className: "scui-continuation", children: /* @__PURE__ */ jsxs3("span", { children: [
1330
1330
  /* @__PURE__ */ jsx3("strong", { children: activeElsewhere ? "Active elsewhere" : "Read-only" }),
1331
1331
  /* @__PURE__ */ jsx3("small", { children: "This session cannot be continued by an available harness." })
@@ -2640,7 +2640,7 @@ function Receipt({ state, adapter }) {
2640
2640
  ] });
2641
2641
  return null;
2642
2642
  }
2643
- function ConversationActions({ state, adapter, actionPending, onSettings }) {
2643
+ function ConversationActions({ state, adapter, actionPending, onNew, onSettings }) {
2644
2644
  const [open, setOpen] = useState6(false);
2645
2645
  const root = useRef7(null);
2646
2646
  const panel = useRef7(null);
@@ -2651,6 +2651,7 @@ function ConversationActions({ state, adapter, actionPending, onSettings }) {
2651
2651
  {
2652
2652
  label: "Session",
2653
2653
  items: [
2654
+ { key: "new", label: "New chat", onSelect: onNew },
2654
2655
  state.canDetach ? { key: "detach", label: "Detach to read-only", intent: { action: "detach" } } : null,
2655
2656
  state.canOpenTerminal ? { key: "terminal", label: "Prepare terminal handoff", intent: { action: "terminal" } } : null,
2656
2657
  state.canExport && state.exportBackTarget ? { key: "export", label: `Export back to ${harnessDisplayName(state.exportBackTarget)}`, intent: { action: "export", targetHarness: state.exportBackTarget } } : null,
@@ -2721,7 +2722,6 @@ function ChatHeader({ state, adapter, pendingStatus, actionPending, onBack, onNe
2721
2722
  const harness = state.attached?.harness ?? state.harness;
2722
2723
  const title = state.attached ? sessionDisplayName(state.attached) : harnessDisplayName(harness) || "Agent chat";
2723
2724
  const status = state.needsInput ? "Needs input" : pendingStatus === "failed" ? "Send failed" : state.busy ? "Working" : pendingStatus === "sending" ? "Sending" : pendingStatus === "editing" ? "Editing message" : state.messaging === "live_peer" ? "Live" : state.mode === "mirror" ? "Read-only" : "Ready";
2724
- const menu = state.canDetach || state.canOpenTerminal || state.canBranch || state.canAttach || state.canExport || state.canReduce || state.interopSettings || state.interopSettingsError;
2725
2725
  useEffect8(() => {
2726
2726
  if (state.mode === "mirror" && !state.canSend) back.current?.focus({ preventScroll: true });
2727
2727
  }, []);
@@ -2737,8 +2737,7 @@ function ChatHeader({ state, adapter, pendingStatus, actionPending, onBack, onNe
2737
2737
  ] })
2738
2738
  ] }),
2739
2739
  HeaderActions ? /* @__PURE__ */ jsx10(HeaderActions, { state, adapter, value: "chat" }) : null,
2740
- menu ? /* @__PURE__ */ jsx10(ConversationActions, { state, adapter, actionPending, onSettings }) : null,
2741
- /* @__PURE__ */ jsx10("button", { type: "button", "aria-label": "New chat", onClick: onNew, children: /* @__PURE__ */ jsx10(UiIcon, { name: "plus", size: 18 }) }),
2740
+ /* @__PURE__ */ jsx10(ConversationActions, { state, adapter, actionPending, onNew, onSettings }),
2742
2741
  onClose ? /* @__PURE__ */ jsx10("button", { type: "button", "aria-label": "Close", onClick: onClose, children: /* @__PURE__ */ jsx10(UiIcon, { name: "close", size: 18 }) }) : null
2743
2742
  ] });
2744
2743
  }
@@ -319,7 +319,7 @@ function ContinuationBar({ state, adapter, labels = DEFAULT_LABELS }) {
319
319
  join: state.canAttach,
320
320
  branch: state.canBranch
321
321
  };
322
- const continuation = available.join ? "join" : available.resume ? "resume" : available.branch ? "branch" : state.supportsAttach ? "join" : state.supportsResume ? "resume" : state.supportsBranch ? "branch" : null;
322
+ const continuation = state.supportsAttach ? "join" : state.supportsResume ? "resume" : state.supportsBranch ? "branch" : available.join ? "join" : available.resume ? "resume" : available.branch ? "branch" : null;
323
323
  if (!continuation) return /* @__PURE__ */ jsx3("div", { className: "scui-continuation", children: /* @__PURE__ */ jsxs3("span", { children: [
324
324
  /* @__PURE__ */ jsx3("strong", { children: activeElsewhere ? "Active elsewhere" : "Read-only" }),
325
325
  /* @__PURE__ */ jsx3("small", { children: "This session cannot be continued by an available harness." })
@@ -1285,7 +1285,7 @@ function ContinuationBar({ state, adapter, labels = DEFAULT_LABELS }) {
1285
1285
  join: state.canAttach,
1286
1286
  branch: state.canBranch
1287
1287
  };
1288
- const continuation = available.join ? "join" : available.resume ? "resume" : available.branch ? "branch" : state.supportsAttach ? "join" : state.supportsResume ? "resume" : state.supportsBranch ? "branch" : null;
1288
+ const continuation = state.supportsAttach ? "join" : state.supportsResume ? "resume" : state.supportsBranch ? "branch" : available.join ? "join" : available.resume ? "resume" : available.branch ? "branch" : null;
1289
1289
  if (!continuation) return /* @__PURE__ */ jsx3("div", { className: "scui-continuation", children: /* @__PURE__ */ jsxs3("span", { children: [
1290
1290
  /* @__PURE__ */ jsx3("strong", { children: activeElsewhere ? "Active elsewhere" : "Read-only" }),
1291
1291
  /* @__PURE__ */ jsx3("small", { children: "This session cannot be continued by an available harness." })
@@ -2554,7 +2554,7 @@ function Receipt({ state, adapter }) {
2554
2554
  ] });
2555
2555
  return null;
2556
2556
  }
2557
- function ConversationActions({ state, adapter, actionPending, onSettings }) {
2557
+ function ConversationActions({ state, adapter, actionPending, onNew, onSettings }) {
2558
2558
  const [open, setOpen] = useState6(false);
2559
2559
  const root = useRef7(null);
2560
2560
  const panel = useRef7(null);
@@ -2565,6 +2565,7 @@ function ConversationActions({ state, adapter, actionPending, onSettings }) {
2565
2565
  {
2566
2566
  label: "Session",
2567
2567
  items: [
2568
+ { key: "new", label: "New chat", onSelect: onNew },
2568
2569
  state.canDetach ? { key: "detach", label: "Detach to read-only", intent: { action: "detach" } } : null,
2569
2570
  state.canOpenTerminal ? { key: "terminal", label: "Prepare terminal handoff", intent: { action: "terminal" } } : null,
2570
2571
  state.canExport && state.exportBackTarget ? { key: "export", label: `Export back to ${harnessDisplayName(state.exportBackTarget)}`, intent: { action: "export", targetHarness: state.exportBackTarget } } : null,
@@ -2635,7 +2636,6 @@ function ChatHeader({ state, adapter, pendingStatus, actionPending, onBack, onNe
2635
2636
  const harness = state.attached?.harness ?? state.harness;
2636
2637
  const title = state.attached ? sessionDisplayName(state.attached) : harnessDisplayName(harness) || "Agent chat";
2637
2638
  const status = state.needsInput ? "Needs input" : pendingStatus === "failed" ? "Send failed" : state.busy ? "Working" : pendingStatus === "sending" ? "Sending" : pendingStatus === "editing" ? "Editing message" : state.messaging === "live_peer" ? "Live" : state.mode === "mirror" ? "Read-only" : "Ready";
2638
- const menu = state.canDetach || state.canOpenTerminal || state.canBranch || state.canAttach || state.canExport || state.canReduce || state.interopSettings || state.interopSettingsError;
2639
2639
  useEffect8(() => {
2640
2640
  if (state.mode === "mirror" && !state.canSend) back.current?.focus({ preventScroll: true });
2641
2641
  }, []);
@@ -2651,8 +2651,7 @@ function ChatHeader({ state, adapter, pendingStatus, actionPending, onBack, onNe
2651
2651
  ] })
2652
2652
  ] }),
2653
2653
  HeaderActions ? /* @__PURE__ */ jsx9(HeaderActions, { state, adapter, value: "chat" }) : null,
2654
- menu ? /* @__PURE__ */ jsx9(ConversationActions, { state, adapter, actionPending, onSettings }) : null,
2655
- /* @__PURE__ */ jsx9("button", { type: "button", "aria-label": "New chat", onClick: onNew, children: /* @__PURE__ */ jsx9(UiIcon, { name: "plus", size: 18 }) }),
2654
+ /* @__PURE__ */ jsx9(ConversationActions, { state, adapter, actionPending, onNew, onSettings }),
2656
2655
  onClose ? /* @__PURE__ */ jsx9("button", { type: "button", "aria-label": "Close", onClick: onClose, children: /* @__PURE__ */ jsx9(UiIcon, { name: "close", size: 18 }) }) : null
2657
2656
  ] });
2658
2657
  }