@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/sessions.d.ts CHANGED
@@ -6,4 +6,4 @@ export type {
6
6
  SupercodeUiState,
7
7
  UiAdapter,
8
8
  } from './index.js';
9
- export { LoadingStatus, SessionList, SessionRow } from './index.js';
9
+ export { LoadingStatus, SessionList, SessionRow, SubagentInspector } from './index.js';
package/sessions.mjs CHANGED
@@ -65,6 +65,7 @@ var EMPTY_UI_STATE = Object.freeze({
65
65
  savedDraft: "",
66
66
  attention: Object.freeze([]),
67
67
  sessions: Object.freeze([]),
68
+ subagentInspector: null,
68
69
  attached: null,
69
70
  owned: null,
70
71
  attachError: null
@@ -86,6 +87,7 @@ function sessionDisplayName(session) {
86
87
  return title && title !== session.name ? title : session.name || "Untitled chat";
87
88
  }
88
89
  function sessionActivity(state, row) {
90
+ if (row.activity && ACTIVITY_PRIORITY[row.activity] !== void 0) return row.activity;
89
91
  if (state.needsInput && row.active) return "needs-input";
90
92
  if (state.busy && row.active) return "working";
91
93
  if (row.runtimeStatus === "busy") return "working";
@@ -176,6 +178,12 @@ function boundedSet(map, key, value) {
176
178
  // src/icon.jsx
177
179
  import { Fragment, jsx as jsx2, jsxs } from "preact/jsx-runtime";
178
180
  var ICONS = {
181
+ agents: () => /* @__PURE__ */ jsxs(Fragment, { children: [
182
+ /* @__PURE__ */ jsx2("circle", { cx: "6", cy: "6.5", r: "2" }),
183
+ /* @__PURE__ */ jsx2("path", { d: "M2.75 13c.45-2 1.55-3 3.25-3s2.8 1 3.25 3" }),
184
+ /* @__PURE__ */ jsx2("circle", { cx: "12.25", cy: "7", r: "1.5" }),
185
+ /* @__PURE__ */ jsx2("path", { d: "M10.5 10.75c1.95-.65 3.45.1 4 2.25" })
186
+ ] }),
179
187
  attach: () => /* @__PURE__ */ jsx2("path", { d: "M6.25 9.75 10.6 5.4a2.1 2.1 0 0 1 2.97 2.97l-5.4 5.4a3.3 3.3 0 0 1-4.67-4.66l5.52-5.52" }),
180
188
  back: () => /* @__PURE__ */ jsx2("path", { d: "m11.5 4.5-4.5 4.5 4.5 4.5" }),
181
189
  check: () => /* @__PURE__ */ jsx2("path", { d: "m4 9 3.25 3.25L14 5.5" }),
@@ -329,7 +337,7 @@ function sessionPathParts(value) {
329
337
  trailing: complete.slice(boundary + 1)
330
338
  };
331
339
  }
332
- function SessionRow({ row, state, onOpen, now = Date.now() }) {
340
+ function SessionRow({ row, state, onOpen, onOpenSubagents, now = Date.now() }) {
333
341
  const activity = sessionActivity(state, row);
334
342
  const working = activity === "working";
335
343
  const attention = state.attention.find((item) => item.key === row.key);
@@ -339,32 +347,40 @@ function SessionRow({ row, state, onOpen, now = Date.now() }) {
339
347
  const unreadCount = attention?.unreadCount ?? 0;
340
348
  const unreadLabel = unreadCount > 99 ? "99+" : String(unreadCount);
341
349
  const age = relativeAge(row.previewUpdatedAt ?? row.updatedAt, now) || row.age;
342
- return /* @__PURE__ */ jsxs5("button", { className: "scui-session", "data-active": row.active, "data-activity": activity, "data-writable": row.writable, "data-session-key": row.key, type: "button", "aria-label": `${title} \xB7 ${harnessDisplayName(row.harness)}${row.writable ? "" : " \xB7 Read-only"}${working ? " \xB7 Working" : ""}${path.complete ? ` \xB7 ${path.complete}` : ""}${preview ? ` \xB7 ${preview}` : ""}${unreadCount ? ` \xB7 ${unreadCount} unread` : ""}${age ? ` \xB7 ${age}` : ""}`, "aria-current": row.active ? "true" : void 0, onClick: () => onOpen(row), children: [
343
- /* @__PURE__ */ jsx6(HarnessLogo, { id: row.harness, activity, size: 34 }),
344
- /* @__PURE__ */ jsxs5("span", { className: "scui-session-copy", children: [
345
- /* @__PURE__ */ jsxs5("span", { className: "scui-session-title", children: [
346
- /* @__PURE__ */ jsx6("strong", { children: title }),
347
- /* @__PURE__ */ jsx6("span", { className: "scui-session-meta", children: age ? /* @__PURE__ */ jsx6("time", { children: age }) : null })
348
- ] }),
349
- path.complete ? /* @__PURE__ */ jsxs5("small", { className: "scui-session-path", title: row.cwd, children: [
350
- /* @__PURE__ */ jsx6("span", { className: "scui-session-path-leading", children: path.leading }),
351
- path.separator ? /* @__PURE__ */ jsx6("span", { className: "scui-session-path-separator", children: path.separator }) : null,
352
- path.trailing ? /* @__PURE__ */ jsx6("span", { className: "scui-session-path-trailing", children: path.trailing }) : null
353
- ] }) : null,
354
- working || preview || unreadCount ? /* @__PURE__ */ jsxs5("span", { className: "scui-session-preview", children: [
355
- working ? /* @__PURE__ */ jsxs5("span", { className: "scui-session-working", "aria-hidden": "true", children: [
356
- /* @__PURE__ */ jsx6("i", {}),
357
- /* @__PURE__ */ jsx6("i", {}),
358
- /* @__PURE__ */ jsx6("i", {})
350
+ return /* @__PURE__ */ jsxs5("article", { className: "scui-session", "data-active": row.active, "data-activity": activity, "data-writable": row.writable, children: [
351
+ /* @__PURE__ */ jsxs5("button", { className: "scui-session-main", "data-session-key": row.key, type: "button", "aria-label": `${title} \xB7 ${harnessDisplayName(row.harness)}${row.writable ? "" : " \xB7 Read-only"}${working ? " \xB7 Working" : ""}${path.complete ? ` \xB7 ${path.complete}` : ""}${preview ? ` \xB7 ${preview}` : ""}${unreadCount ? ` \xB7 ${unreadCount} unread` : ""}${age ? ` \xB7 ${age}` : ""}`, "aria-current": row.active ? "true" : void 0, onClick: () => onOpen(row), children: [
352
+ /* @__PURE__ */ jsx6(HarnessLogo, { id: row.harness, activity, size: 34 }),
353
+ /* @__PURE__ */ jsxs5("span", { className: "scui-session-copy", children: [
354
+ /* @__PURE__ */ jsxs5("span", { className: "scui-session-title", children: [
355
+ /* @__PURE__ */ jsx6("strong", { children: title }),
356
+ /* @__PURE__ */ jsx6("span", { className: "scui-session-meta", children: age ? /* @__PURE__ */ jsx6("time", { children: age }) : null })
357
+ ] }),
358
+ path.complete ? /* @__PURE__ */ jsxs5("small", { className: "scui-session-path", title: row.cwd, children: [
359
+ /* @__PURE__ */ jsx6("span", { className: "scui-session-path-leading", children: path.leading }),
360
+ path.separator ? /* @__PURE__ */ jsx6("span", { className: "scui-session-path-separator", children: path.separator }) : null,
361
+ path.trailing ? /* @__PURE__ */ jsx6("span", { className: "scui-session-path-trailing", children: path.trailing }) : null
359
362
  ] }) : null,
360
- preview || working ? /* @__PURE__ */ jsx6("small", { children: preview || "Working\u2026" }) : null,
361
- unreadCount ? /* @__PURE__ */ jsx6("b", { "aria-label": `${unreadCount} unread messages`, children: unreadLabel }) : null
362
- ] }) : null,
363
- state.attachError?.key === row.key ? /* @__PURE__ */ jsx6("em", { children: state.attachError.message }) : null
364
- ] })
363
+ working || preview || unreadCount ? /* @__PURE__ */ jsxs5("span", { className: "scui-session-preview", children: [
364
+ working ? /* @__PURE__ */ jsxs5("span", { className: "scui-session-working", "aria-hidden": "true", children: [
365
+ /* @__PURE__ */ jsx6("i", {}),
366
+ /* @__PURE__ */ jsx6("i", {}),
367
+ /* @__PURE__ */ jsx6("i", {})
368
+ ] }) : null,
369
+ preview || working ? /* @__PURE__ */ jsx6("small", { children: preview || "Working\u2026" }) : null,
370
+ unreadCount ? /* @__PURE__ */ jsx6("b", { "aria-label": `${unreadCount} unread messages`, children: unreadLabel }) : null
371
+ ] }) : null,
372
+ state.attachError?.key === row.key ? /* @__PURE__ */ jsx6("em", { children: state.attachError.message }) : null
373
+ ] })
374
+ ] }),
375
+ row.subagentCount ? /* @__PURE__ */ jsxs5("button", { className: "scui-session-agents", type: "button", "aria-label": `Inspect ${row.subagentCount} subagents in ${title}`, onClick: () => onOpenSubagents?.(row), children: [
376
+ /* @__PURE__ */ jsx6(UiIcon, { name: "agents", size: 14 }),
377
+ row.subagentCount,
378
+ " ",
379
+ row.subagentCount === 1 ? "agent" : "agents"
380
+ ] }) : null
365
381
  ] });
366
382
  }
367
- function SessionList({ state, adapter, onOpen, onNew, onClose, components = {}, slots = {}, labels = DEFAULT_LABELS, focusKey = null, memoryKey = state.workspace || "@default", headerActions: HeaderActions }) {
383
+ function SessionList({ state, adapter, onOpen, onOpenSubagents, onNew, onClose, components = {}, slots = {}, labels = DEFAULT_LABELS, focusKey = null, memoryKey = state.workspace || "@default", headerActions: HeaderActions }) {
368
384
  const remembered = sessionListMemory.get(memoryKey) ?? { query: "", top: 0 };
369
385
  const [query, setQuery] = useState3(remembered.query);
370
386
  const [loadingMore, setLoadingMore] = useState3(false);
@@ -430,7 +446,7 @@ function SessionList({ state, adapter, onOpen, onNew, onClose, components = {},
430
446
  /* @__PURE__ */ jsxs5("div", { className: "scui-session-rows", ref: rowScroller, onScroll: (event) => boundedSet(sessionListMemory, memoryKey, { query, top: event.currentTarget.scrollTop }), children: [
431
447
  BeforeSessions ? /* @__PURE__ */ jsx6(BeforeSessions, { state, adapter, value: { query, rows } }) : null,
432
448
  !rows.length && state.startup === "ready" ? /* @__PURE__ */ jsx6("div", { className: "scui-empty", children: query ? "No chats match your search." : state.error ?? "No coding chats found." }) : null,
433
- rows.map((row) => /* @__PURE__ */ jsx6(Row, { value: row, row, state, adapter, onOpen, now }, row.key)),
449
+ rows.map((row) => /* @__PURE__ */ jsx6(Row, { value: row, row, state, adapter, onOpen, onOpenSubagents, now }, row.key)),
434
450
  state.history.hasMoreSessions ? /* @__PURE__ */ jsx6("button", { className: "scui-load", type: "button", disabled: loadingMore, onClick: loadMore, children: loadingMore ? "Loading older chats\u2026" : "Load older chats" }) : null,
435
451
  AfterSessions ? /* @__PURE__ */ jsx6(AfterSessions, { state, adapter, value: { query, rows } }) : null
436
452
  ] })
package/settings.mjs CHANGED
@@ -65,6 +65,7 @@ var EMPTY_UI_STATE = Object.freeze({
65
65
  savedDraft: "",
66
66
  attention: Object.freeze([]),
67
67
  sessions: Object.freeze([]),
68
+ subagentInspector: null,
68
69
  attached: null,
69
70
  owned: null,
70
71
  attachError: null
@@ -150,6 +151,12 @@ function HarnessLogo({ id, activity, size = 28, onMissingLogo }) {
150
151
  // src/icon.jsx
151
152
  import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "preact/jsx-runtime";
152
153
  var ICONS = {
154
+ agents: () => /* @__PURE__ */ jsxs2(Fragment, { children: [
155
+ /* @__PURE__ */ jsx2("circle", { cx: "6", cy: "6.5", r: "2" }),
156
+ /* @__PURE__ */ jsx2("path", { d: "M2.75 13c.45-2 1.55-3 3.25-3s2.8 1 3.25 3" }),
157
+ /* @__PURE__ */ jsx2("circle", { cx: "12.25", cy: "7", r: "1.5" }),
158
+ /* @__PURE__ */ jsx2("path", { d: "M10.5 10.75c1.95-.65 3.45.1 4 2.25" })
159
+ ] }),
153
160
  attach: () => /* @__PURE__ */ jsx2("path", { d: "M6.25 9.75 10.6 5.4a2.1 2.1 0 0 1 2.97 2.97l-5.4 5.4a3.3 3.3 0 0 1-4.67-4.66l5.52-5.52" }),
154
161
  back: () => /* @__PURE__ */ jsx2("path", { d: "m11.5 4.5-4.5 4.5 4.5 4.5" }),
155
162
  check: () => /* @__PURE__ */ jsx2("path", { d: "m4 9 3.25 3.25L14 5.5" }),
package/styles.css CHANGED
@@ -102,8 +102,10 @@
102
102
  .scui-search { display:flex; flex:1; min-width:0; align-items:center; gap:7px; padding:6px 8px; border:1px solid var(--scui-border); border-radius:8px; background:var(--scui-bg-raised); color:var(--scui-muted) }
103
103
  .scui-search input { flex:1; min-width:0; border:0; outline:0; background:transparent; color:var(--scui-fg) }
104
104
  .scui-session-rows { flex:1; min-height:0; overflow:auto; padding:0 6px 8px }
105
- .scui-session { display:flex; align-items:flex-start; gap:9px; width:100%; padding:8px; border:0; border-radius:7px; background:transparent; text-align:left; cursor:pointer }
105
+ .scui-session { display:flex; width:100%; align-items:center; border-radius:7px; background:transparent }
106
106
  .scui-session:hover,.scui-session[data-active="true"] { background:var(--scui-fill) }
107
+ .scui-session-main { display:flex; min-width:0; flex:1; align-items:flex-start; gap:9px; padding:8px; border:0; background:transparent; text-align:left; cursor:pointer }
108
+ .scui-session-agents { display:flex; flex:none; align-items:center; gap:4px; margin-right:6px; padding:4px 6px; border:0; border-radius:6px; background:transparent; color:var(--scui-muted); cursor:pointer; font-size:9px; white-space:nowrap }.scui-session-agents:hover { background:var(--scui-bg-raised); color:var(--scui-fg) }
107
109
  .scui-session-copy { display:grid; flex:1; min-width:0; gap:1px }
108
110
  .scui-session-copy > span { display:flex; align-items:baseline; gap:7px; min-width:0 }
109
111
  .scui-session-copy strong,.scui-session-copy span > small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
@@ -211,6 +213,9 @@
211
213
  .scui-readiness { margin:0 0 7px; border:1px solid var(--scui-border); border-radius:7px; background:var(--scui-bg) }.scui-readiness > summary { padding:6px 8px; color:var(--scui-muted); cursor:pointer; font-size:10px }.scui-readiness > div { display:grid; border-top:1px solid var(--scui-border) }.scui-readiness section { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:7px; padding:7px 8px }.scui-readiness section + section { border-top:1px solid var(--scui-border) }.scui-readiness section > span { display:grid; min-width:0 }.scui-readiness section strong,.scui-readiness section small,.scui-readiness section em { overflow:hidden; text-overflow:ellipsis; white-space:nowrap }.scui-readiness section small { color:var(--scui-muted); font-size:9px }.scui-readiness section em { color:var(--scui-muted); font-size:8px; font-style:normal }.scui-readiness section button { padding:4px 6px; border:1px solid var(--scui-border); border-radius:6px; background:transparent; cursor:pointer; font-size:9px }
212
214
  .scui-new { display:grid; justify-items:center; gap:5px; margin:auto; padding:20px; color:var(--scui-muted); text-align:center }.scui-new > span { color:var(--scui-accent); font-size:28px }.scui-new strong { color:var(--scui-fg) }
213
215
  .scui-opening { position:absolute; z-index:30; inset:var(--scui-head-height) 0 0; display:flex; align-items:center; justify-content:center; gap:10px; padding:20px; background:var(--scui-bg) }.scui-opening > span { display:grid }.scui-opening small { color:var(--scui-muted) }.scui-opening > i { width:16px; height:16px; border:2px solid var(--scui-border); border-top-color:var(--scui-accent); border-radius:50%; animation:scui-spin .8s linear infinite }
216
+ .scui-subagents { position:absolute; z-index:32; inset:0; display:flex; min-height:0; flex-direction:column; background:var(--scui-bg); color:var(--scui-fg) }.scui-subagents > .scui-head > .scui-icon { flex:none; color:var(--scui-muted) }
217
+ .scui-subagents-loading { display:flex; flex:1; align-items:center; justify-content:center; gap:10px; padding:20px; color:var(--scui-muted) }.scui-subagents-loading > i { width:16px; height:16px; border:2px solid var(--scui-border); border-top-color:var(--scui-accent); border-radius:50%; animation:scui-spin .8s linear infinite }.scui-subagents-loading > span { display:grid }.scui-subagents-loading strong { color:var(--scui-fg); font-size:11px }.scui-subagents-loading small { font-size:9.5px }
218
+ .scui-subagent-rows { flex:1; min-height:0; overflow:auto; padding:6px }.scui-subagent-rows > button { display:grid; grid-template-columns:auto minmax(0,1fr) auto; width:100%; align-items:center; gap:8px; padding:8px; border:0; border-radius:7px; background:transparent; color:var(--scui-fg); text-align:left; cursor:pointer }.scui-subagent-rows > button:hover { background:var(--scui-fill) }.scui-subagent-rows > button > span { display:grid; min-width:0 }.scui-subagent-rows > button > span:nth-child(3) { grid-auto-flow:column; align-items:center; gap:4px; color:var(--scui-muted) }.scui-subagent-rows strong,.scui-subagent-rows small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap }.scui-subagent-rows strong { font-size:11.5px }.scui-subagent-rows small { color:var(--scui-muted); font-size:9.5px }.scui-subagent-rows > button[data-activity="needs-input"] > span:nth-child(3) small { color:var(--scui-warning) }.scui-subagents > .scui-conversation-wrap { flex:1; min-height:0 }
214
219
 
215
220
  @keyframes scui-spin { to { transform:rotate(360deg) } }
216
221
  @keyframes scui-breathe { 50% { transform:scale(.72); opacity:.5 } }
package/subagents.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export type { SessionRowModel, SubagentInspectorModel, SupercodeUiState, UiAdapter } from './index.js';
2
+ export { Conversation, SubagentInspector } from './index.js';