@volter-ai-dev/supercode-ui 0.1.59 → 0.1.60

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/controller.d.ts CHANGED
@@ -121,6 +121,9 @@ export interface ControllerBindingOptions {
121
121
  onAcknowledge?: (key: string) => void | Promise<void>;
122
122
  onLoadSessions?: () => void | Promise<void>;
123
123
  onLoadEarlier?: () => void | Promise<void>;
124
+ onOpenSubagents?: (key: string) => void | Promise<void>;
125
+ onOpenSubagent?: (parentKey: string, key: string) => void | Promise<void>;
126
+ onCloseSubagents?: () => void | Promise<void>;
124
127
  onStartTerminal?: (intent: Extract<SupercodeUiIntent, { action: 'new' }>) => void | Promise<void>;
125
128
  onResumeTerminal?: (intent: Extract<SupercodeUiIntent, { action: 'resume' }>) => void | Promise<void>;
126
129
  copyText?: UiAdapter['copyText'];
package/controller.mjs CHANGED
@@ -519,6 +519,9 @@ function projectClientSnapshotInternal(snapshot, options, imageRegistry) {
519
519
  writable: session.key === snapshot.activeSessionKey && actions.send === true,
520
520
  live: typeof session.updatedAt === 'number' && now - session.updatedAt <= liveWindowMs,
521
521
  runtimeStatus: session.liveStatus ?? null,
522
+ ...(Number.isSafeInteger(session.childSessionCount) && session.childSessionCount > 0
523
+ ? { subagentCount: session.childSessionCount }
524
+ : {}),
522
525
  }));
523
526
  const sessions = options.sessions ?? snapshotSessions;
524
527
  const active = options.attached === undefined ? attached(snapshot) : options.attached;
@@ -684,6 +687,11 @@ export async function dispatchControllerIntent(controller, intent, options = {})
684
687
  ? options.onLoadEarlier()
685
688
  : controller.dispatch({ type: 'loadEarlier' });
686
689
  }
690
+ if (intent.action === 'openSubagents') return options.onOpenSubagents?.(intent.key);
691
+ if (intent.action === 'openSubagent') {
692
+ return options.onOpenSubagent?.(intent.parentKey, intent.key);
693
+ }
694
+ if (intent.action === 'closeSubagents') return options.onCloseSubagents?.();
687
695
  return options.onUnsupported?.(intent);
688
696
  }
689
697
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter-ai-dev/supercode-ui",
3
- "version": "0.1.59",
3
+ "version": "0.1.60",
4
4
  "type": "module",
5
5
  "description": "Composable default UI kit for Supercode-powered coding-agent experiences",
6
6
  "exports": {