@volter-ai-dev/supercode-ui 0.1.53 → 0.1.55

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/activity.mjs CHANGED
@@ -62,6 +62,7 @@ var EMPTY_UI_STATE = Object.freeze({
62
62
  savedDraft: "",
63
63
  attention: Object.freeze([]),
64
64
  sessions: Object.freeze([]),
65
+ subagentInspector: null,
65
66
  attached: null,
66
67
  owned: null,
67
68
  attachError: null
@@ -559,10 +560,25 @@ function readSessions(value) {
559
560
  active: row.active === true,
560
561
  writable: row.writable === true,
561
562
  live: row.live === true,
562
- runtimeStatus: row.runtimeStatus === "running" || row.runtimeStatus === "busy" || row.runtimeStatus === "idle" ? row.runtimeStatus : null
563
+ runtimeStatus: row.runtimeStatus === "running" || row.runtimeStatus === "busy" || row.runtimeStatus === "idle" ? row.runtimeStatus : null,
564
+ ...Number.isSafeInteger(row.subagentCount) && row.subagentCount > 0 ? { subagentCount: row.subagentCount } : {},
565
+ activity: ACTIVITY_PRIORITY[row.activity] !== void 0 ? row.activity : void 0
563
566
  }];
564
567
  });
565
568
  }
569
+ function readSubagentInspector(value) {
570
+ const inspector = record(value);
571
+ if (!inspector || typeof inspector.parentKey !== "string" || !inspector.parentKey) return null;
572
+ return {
573
+ parentKey: inspector.parentKey,
574
+ parentTitle: boundedString(string(inspector.parentTitle), 500),
575
+ status: ["loading", "ready", "error"].includes(inspector.status) ? inspector.status : "loading",
576
+ items: readSessions(inspector.items).slice(0, 100),
577
+ selectedKey: typeof inspector.selectedKey === "string" && inspector.selectedKey ? inspector.selectedKey : null,
578
+ transcript: readTranscript(inspector.transcript).slice(-120),
579
+ error: typeof inspector.error === "string" ? boundedString(inspector.error) : null
580
+ };
581
+ }
566
582
  function readAttached(value) {
567
583
  const item = record(value);
568
584
  if (!item || typeof item.harness !== "string") return null;
@@ -777,6 +793,7 @@ function normalizeUiState(value) {
777
793
  return item && typeof item.key === "string" && ["unseen", "finished", "failed"].includes(item.kind) ? [{ key: item.key, kind: item.kind, ...typeof item.preview === "string" ? { preview: item.preview } : {}, ...Number.isSafeInteger(item.afterMessages) && item.afterMessages >= 0 ? { afterMessages: item.afterMessages } : {}, ...Number.isSafeInteger(item.unreadCount) && item.unreadCount > 0 ? { unreadCount: item.unreadCount } : {} }] : [];
778
794
  }) : [],
779
795
  sessions: readSessions(raw.sessions),
796
+ subagentInspector: readSubagentInspector(raw.subagentInspector),
780
797
  attached: readAttached(raw.attached),
781
798
  owned: readAttached(raw.owned),
782
799
  attachError: attachError && typeof attachError.key === "string" && typeof attachError.message === "string" ? { key: attachError.key, message: attachError.message } : null
@@ -790,6 +807,7 @@ function sessionDisplayName(session) {
790
807
  return title && title !== session.name ? title : session.name || "Untitled chat";
791
808
  }
792
809
  function sessionActivity(state, row) {
810
+ if (row.activity && ACTIVITY_PRIORITY[row.activity] !== void 0) return row.activity;
793
811
  if (state.needsInput && row.active) return "needs-input";
794
812
  if (state.busy && row.active) return "working";
795
813
  if (row.runtimeStatus === "busy") return "working";
package/components.d.ts CHANGED
@@ -18,6 +18,7 @@ export {
18
18
  SessionDetails,
19
19
  SessionList,
20
20
  SessionRow,
21
+ SubagentInspector,
21
22
  SupercodeMessenger,
22
23
  TaskPlan,
23
24
  ToolRow,