@volter-ai-dev/supercode-ui 0.1.49 → 0.1.51
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 +3 -4
- package/controller.mjs +18 -3
- package/embed.mjs +3 -4
- package/messenger.mjs +3 -4
- package/package.json +1 -1
- package/react/components.mjs +3 -4
- package/react/messenger.mjs +3 -4
package/components.mjs
CHANGED
|
@@ -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
|
-
|
|
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/controller.mjs
CHANGED
|
@@ -440,6 +440,21 @@ function projectClientSnapshotInternal(snapshot, options, imageRegistry) {
|
|
|
440
440
|
// back preserves compatibility; current clients keep stable UI capability
|
|
441
441
|
// copy while an action temporarily makes every executable action false.
|
|
442
442
|
const eligibility = snapshot.actionEligibility ?? actions;
|
|
443
|
+
const activeHarnessActions = (snapshot.harnesses ?? []).find(
|
|
444
|
+
(harness) => harness.id === snapshot.activeHarness,
|
|
445
|
+
)?.availableActions;
|
|
446
|
+
const hasActiveHarnessActions = activeHarnessActions && typeof activeHarnessActions === 'object';
|
|
447
|
+
const hasActiveSession = snapshot.activeSessionKey !== null && snapshot.activeSessionKey !== undefined;
|
|
448
|
+
const mirrorsActiveSession = snapshot.connection?.mode === 'mirror' && hasActiveSession;
|
|
449
|
+
// Continuation support belongs to the selected harness/session pair. Live
|
|
450
|
+
// presence and controller operations affect executable-now actions, but
|
|
451
|
+
// must not make the primary UI alternate between resume and branch.
|
|
452
|
+
const supportsResume = hasActiveHarnessActions
|
|
453
|
+
? mirrorsActiveSession && activeHarnessActions.resume === true
|
|
454
|
+
: eligibility.resume === true;
|
|
455
|
+
const supportsBranch = hasActiveHarnessActions
|
|
456
|
+
? hasActiveSession && activeHarnessActions.start === true
|
|
457
|
+
: eligibility.branch === true;
|
|
443
458
|
const maxSessions = positiveInteger(options.maxSessions, DEFAULT_MAX_SESSIONS);
|
|
444
459
|
const liveWindowMs = positiveInteger(options.liveWindowMs, DEFAULT_LIVE_WINDOW_MS);
|
|
445
460
|
const snapshotSessions = (snapshot.sessions ?? []).slice(0, maxSessions).map((session) => ({
|
|
@@ -479,10 +494,10 @@ function projectClientSnapshotInternal(snapshot, options, imageRegistry) {
|
|
|
479
494
|
canSend: actions.send === true,
|
|
480
495
|
canSteer: actions.steer === true,
|
|
481
496
|
canResume: actions.resume === true,
|
|
482
|
-
supportsResume
|
|
483
|
-
continuationModes: options.continuationModes ?? (
|
|
497
|
+
supportsResume,
|
|
498
|
+
continuationModes: options.continuationModes ?? (supportsResume ? ['headless'] : []),
|
|
484
499
|
canBranch: actions.branch === true,
|
|
485
|
-
supportsBranch
|
|
500
|
+
supportsBranch,
|
|
486
501
|
canAttach: actions.attach === true,
|
|
487
502
|
supportsAttach: eligibility.attach === true,
|
|
488
503
|
canDetach: actions.detach === true,
|
package/embed.mjs
CHANGED
|
@@ -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
|
-
|
|
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
|
@@ -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
|
-
|
|
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
package/react/components.mjs
CHANGED
|
@@ -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
|
-
|
|
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/react/messenger.mjs
CHANGED
|
@@ -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
|
-
|
|
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
|
}
|