@volter-ai-dev/supercode-ui 0.1.50 → 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.
Files changed (2) hide show
  1. package/controller.mjs +18 -3
  2. package/package.json +1 -1
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: eligibility.resume === true,
483
- continuationModes: options.continuationModes ?? (eligibility.resume === true ? ['headless'] : []),
497
+ supportsResume,
498
+ continuationModes: options.continuationModes ?? (supportsResume ? ['headless'] : []),
484
499
  canBranch: actions.branch === true,
485
- supportsBranch: eligibility.branch === true,
500
+ supportsBranch,
486
501
  canAttach: actions.attach === true,
487
502
  supportsAttach: eligibility.attach === true,
488
503
  canDetach: actions.detach === true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter-ai-dev/supercode-ui",
3
- "version": "0.1.50",
3
+ "version": "0.1.51",
4
4
  "type": "module",
5
5
  "description": "Composable default UI kit for Supercode-powered coding-agent experiences",
6
6
  "exports": {