@spunto/design-system 0.37.0 → 0.38.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spunto/design-system",
3
- "version": "0.37.0",
3
+ "version": "0.38.0",
4
4
  "description": "Spunto's shared design system — warm/flame tokens, color constants, and UI primitives.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -14,6 +14,7 @@ import {
14
14
  ListChecksIcon,
15
15
  Loader2Icon,
16
16
  PlayIcon,
17
+ RotateCcwIcon,
17
18
  SparklesIcon,
18
19
  UserIcon,
19
20
  WrenchIcon,
@@ -327,6 +328,34 @@ function BoundaryEntry({ event, hideSummary = false }: { event: TaskEvent; hideS
327
328
  )
328
329
  }
329
330
 
331
+ /**
332
+ * Where a finished conversation was picked back up (`session.reopened`, written by the platform):
333
+ * everything above it was done — or had failed — and closed, everything below came after. On a
334
+ * worker shared with another task, it says which one, since both agents now work in one checkout.
335
+ */
336
+ function ReopenedEntry({ event }: { event: TaskEvent }) {
337
+ const from = str(event.payload.from)
338
+ const shared = Array.isArray(event.payload.sharedWith)
339
+ ? (event.payload.sharedWith as Record<string, unknown>[]).map((t) => str(t?.title)).filter(Boolean)
340
+ : []
341
+ const when = new Date(event.ts)
342
+ return (
343
+ <Entry>
344
+ <Marker icon={<RotateCcwIcon className="h-3 w-3" />} tone="muted" />
345
+ <p className="text-xs font-medium">Picked back up</p>
346
+ <p className="mt-0.5 text-[11px] text-muted-foreground">
347
+ {from === "failed" ? "The task had failed" : from === "done" ? "The task was done" : "The task was finished"}
348
+ {Number.isNaN(when.getTime()) ? "" : ` · ${when.toLocaleString()}`}
349
+ </p>
350
+ {shared.length > 0 && (
351
+ <p className="mt-1 text-[11px] leading-snug text-orange-600 dark:text-orange-400">
352
+ Its worker is shared with {shared.map((t) => `“${t}”`).join(", ")} — both work in the same checkout.
353
+ </p>
354
+ )}
355
+ </Entry>
356
+ )
357
+ }
358
+
330
359
  function PendingEntry({ text, previews = [] }: { text: string; previews?: string[] }) {
331
360
  return (
332
361
  <Entry>
@@ -520,6 +549,7 @@ function Row({
520
549
  if (row.event.type === "thinking") return <ThinkingEntry event={row.event} />
521
550
  if (row.event.type === "plan") return <PlanEntry event={row.event} />
522
551
  if (row.event.type === "message") return <MessageEntry event={row.event} attachmentUrl={attachmentUrl} />
552
+ if (row.event.type === "session.reopened") return <ReopenedEntry event={row.event} />
523
553
  return <BoundaryEntry event={row.event} hideSummary={row.hideSummary} />
524
554
  }
525
555
 
@@ -56,7 +56,7 @@ export interface TaskConversation extends TaskItem {
56
56
  export interface TaskEvent {
57
57
  seq: number
58
58
  ts: string
59
- /** `message` | `thinking` | `plan` | `tool.call` | `tool.result` | `session.started` | `session.ended` | `usage` | `session.title` | `session.background` | `raw` … */
59
+ /** `message` | `thinking` | `plan` | `tool.call` | `tool.result` | `session.started` | `session.ended` | `usage` | `session.title` | `session.background` | `session.reopened` | `raw` … */
60
60
  type: string
61
61
  payload: Record<string, unknown>
62
62
  }