mux-sesh 1.9.4 → 1.9.6

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 (48) hide show
  1. package/README.md +27 -9
  2. package/package.json +12 -10
  3. package/src/agents/session-name.ts +11 -2
  4. package/src/app/commands.ts +8 -8
  5. package/src/app/controller.ts +16 -4
  6. package/src/app/controls.ts +11 -9
  7. package/src/app/core-state.ts +5 -1
  8. package/src/app/data.ts +40 -5
  9. package/src/app/derived.ts +3 -3
  10. package/src/app/effects.ts +132 -15
  11. package/src/app/handlers.ts +42 -18
  12. package/src/app/keyboard.ts +3 -3
  13. package/src/app/modals.ts +8 -8
  14. package/src/app/runtime.ts +4 -1
  15. package/src/app/screen.tsx +11 -3
  16. package/src/app/state.ts +24 -4
  17. package/src/app/view.ts +17 -6
  18. package/src/config/index.ts +10 -0
  19. package/src/handlers/action-helpers.ts +22 -7
  20. package/src/handlers/actions.ts +51 -42
  21. package/src/handlers/keyboard/agents.ts +36 -14
  22. package/src/handlers/keyboard/new-session.ts +1 -1
  23. package/src/handlers/keyboard/normal.ts +8 -8
  24. package/src/handlers/keyboard/search.ts +6 -6
  25. package/src/handlers/keyboard/shared.ts +3 -3
  26. package/src/herdr/backend.ts +357 -0
  27. package/src/herdr/protocol.ts +268 -0
  28. package/src/items/order.ts +3 -7
  29. package/src/multiplexer/backend.ts +43 -0
  30. package/src/multiplexer/command.ts +48 -0
  31. package/src/multiplexer/index.ts +21 -0
  32. package/src/multiplexer/items.ts +66 -0
  33. package/src/multiplexer/resolve.ts +106 -0
  34. package/src/multiplexer/tmux-backend.ts +87 -0
  35. package/src/multiplexer/types.ts +93 -0
  36. package/src/opencode/session-name.ts +4 -2
  37. package/src/preview/project.ts +13 -11
  38. package/src/projects/session-links.ts +22 -4
  39. package/src/settings.ts +19 -0
  40. package/src/tmux/workflows.ts +5 -1
  41. package/src/types/index.ts +13 -1
  42. package/src/ui/AgentSessionGroup.tsx +25 -10
  43. package/src/ui/CommandsModal.tsx +15 -7
  44. package/src/ui/ItemList.tsx +3 -2
  45. package/src/ui/SessionDetailsPanel.tsx +68 -34
  46. package/src/ui/SessionList.tsx +23 -7
  47. package/src/ui/item-icon.ts +20 -7
  48. package/src/ui/session-meta.ts +10 -0
@@ -1,13 +1,16 @@
1
1
  import { useTheme } from '../styles/theme'
2
- import { formatSessionAge } from '../util/time'
3
2
  import type { IconConfig, Item, AppMode } from '../types'
4
3
  import { AppMode as AppModeEnum } from '../types'
5
4
  import { formatSectionHeader } from './item-icon'
5
+ import { getItemKey } from '../multiplexer/items'
6
+ import { getSessionMeta } from './session-meta'
7
+ import { getVisibleWindow } from './list-window'
6
8
 
7
9
  interface Props {
8
10
  sessions: Item[]
9
11
  appMode: AppMode
10
12
  cursor: number
13
+ maxItems?: number
11
14
  icons?: IconConfig
12
15
  pendingKillSessionName?: string | null
13
16
  }
@@ -16,6 +19,7 @@ export default function AgentSessionGroup({
16
19
  sessions,
17
20
  appMode,
18
21
  cursor,
22
+ maxItems = 20,
19
23
  icons,
20
24
  pendingKillSessionName,
21
25
  }: Props) {
@@ -23,19 +27,22 @@ export default function AgentSessionGroup({
23
27
  if (sessions.length === 0) return null
24
28
 
25
29
  const header = formatSectionHeader(theme, 'agents', icons)
30
+ const visibleWindow = getVisibleWindow(sessions, cursor, maxItems)
26
31
 
27
32
  return (
28
33
  <>
29
34
  <text style={{ fg: theme.textSubtle, marginTop: 2, marginBottom: 1 }}>
30
35
  <span style={{ fg: header.color }}>{header.text}</span>
31
36
  </text>
32
- {sessions.map((item, i) => {
33
- const pendingKill = item.title === pendingKillSessionName
34
- const selected = appMode === AppModeEnum.AgentsManage && i === cursor
37
+ {visibleWindow.items.map((item, i) => {
38
+ const absoluteIndex = visibleWindow.startIndex + i
39
+ const pendingKill = getItemKey(item) === pendingKillSessionName
40
+ const selected = appMode === AppModeEnum.AgentsManage && absoluteIndex === cursor
41
+ const itemMeta = getSessionMeta(item)
35
42
 
36
43
  return (
37
44
  <box
38
- key={`agent-${i}`}
45
+ key={getItemKey(item)}
39
46
  style={{
40
47
  flexDirection: 'row',
41
48
  justifyContent: 'space-between',
@@ -62,12 +69,20 @@ export default function AgentSessionGroup({
62
69
  <span style={{ fg: theme.text }}>{item.title}</span>
63
70
  </text>
64
71
 
65
- <text style={{ fg: pendingKill ? theme.danger : theme.textSubtle }}>
72
+ <text
73
+ style={{
74
+ fg: pendingKill
75
+ ? theme.danger
76
+ : item.agentStatus === 'blocked'
77
+ ? theme.danger
78
+ : item.agentStatus === 'working'
79
+ ? theme.active
80
+ : theme.textSubtle,
81
+ }}
82
+ >
66
83
  {pendingKill
67
- ? 'press d again to kill'
68
- : item.createdAt
69
- ? formatSessionAge(item.createdAt)
70
- : ''}
84
+ ? `press d again to ${item.itemKind === 'herdr' ? 'close' : 'kill'}`
85
+ : itemMeta}
71
86
  </text>
72
87
  </box>
73
88
  )
@@ -1,4 +1,5 @@
1
1
  import type { TextareaRenderable } from '@opentui/core'
2
+ import { isHerdrAgentItem } from '../multiplexer/items'
2
3
  import { useTheme } from '../styles/theme'
3
4
  import { useTextareaFocus } from './use-textarea-focus'
4
5
  import { AppMode, type Item, type KeybindMode } from '../types'
@@ -52,16 +53,23 @@ export function getCommandEntries(
52
53
  const prefixCategory = prefixKey ? `Prefix ${prefixKey}` : 'Prefix'
53
54
 
54
55
  if (appMode === AppMode.AgentsManage) {
56
+ const canManageSession = !isHerdrAgentItem(selectedItem)
55
57
  return [
56
58
  { id: 'back', category: 'Direct', title: 'Back', keybind: 'esc' },
57
- { id: 'kill-session', category: 'Direct', title: 'Kill session', keybind: 'd' },
59
+ ...(canManageSession
60
+ ? [{ id: 'kill-session' as const, category: 'Direct', title: 'Kill session', keybind: 'd' }]
61
+ : []),
58
62
  { id: 'open-settings', category: 'Direct', title: 'Open settings', keybind: 'ctrl+p' },
59
- {
60
- id: 'rename-session',
61
- category: prefixCategory,
62
- title: 'Rename session',
63
- keybind: commandKey('r', 'r'),
64
- },
63
+ ...(canManageSession
64
+ ? [
65
+ {
66
+ id: 'rename-session' as const,
67
+ category: prefixCategory,
68
+ title: 'Rename session',
69
+ keybind: commandKey('r', 'r'),
70
+ },
71
+ ]
72
+ : []),
65
73
  ]
66
74
  }
67
75
 
@@ -4,6 +4,7 @@ import HighlightedText from './HighlightedText'
4
4
  import { getItemIconPresentation } from './item-icon'
5
5
  import { getVisibleWindow } from './list-window'
6
6
  import type { Item } from '../types'
7
+ import { getItemKey } from '../multiplexer/items'
7
8
 
8
9
  interface Props {
9
10
  items: Item[]
@@ -43,12 +44,12 @@ export default function ItemList({
43
44
  ? 'open'
44
45
  : 'create'
45
46
  const linkedSessionLabel = item.linkedSessionName ? ` -> ${item.linkedSessionName}` : ''
46
- const pendingKill = item.isSession && item.title === pendingKillSessionName
47
+ const pendingKill = item.isSession && getItemKey(item) === pendingKillSessionName
47
48
  const selected = absoluteIndex === cursor
48
49
 
49
50
  return (
50
51
  <box
51
- key={i}
52
+ key={`${getItemKey(item)}:${item.path}`}
52
53
  style={{
53
54
  flexDirection: 'row',
54
55
  justifyContent: 'space-between',
@@ -1,19 +1,21 @@
1
1
  import { useEffect, useState } from 'react'
2
2
  import { getFilePreview, getProjectPreview, type ProjectPreview } from '../preview/project'
3
3
  import { isFileItem } from '../files/target'
4
- import { getSessionDetails } from '../tmux'
5
4
  import { getDetailPanelStyle, useTheme } from '../styles/theme'
6
- import type { Config, Item, SessionDetails } from '../types'
5
+ import type { Config, Item } from '../types'
6
+ import type { MultiplexerBackend, WorkspaceDetails, WorkspaceRef } from '../multiplexer'
7
+ import { getWorkspaceRef, isLiveSessionItem } from '../multiplexer/items'
7
8
 
8
9
  interface Props {
9
10
  selectedItem?: Item
10
11
  config: Config | null
12
+ backend: MultiplexerBackend | null
11
13
  }
12
14
 
13
15
  type DetailState =
14
16
  | { status: 'idle' }
15
17
  | { status: 'loading' }
16
- | { status: 'session'; details: SessionDetails }
18
+ | { status: 'session'; details: WorkspaceDetails }
17
19
  | { status: 'project'; details: ProjectPreview }
18
20
  | { status: 'error'; message: string }
19
21
 
@@ -72,10 +74,13 @@ function ProjectPreviewView({ preview }: { preview: ProjectPreview }) {
72
74
  <SectionLabel>Live session</SectionLabel>
73
75
  <MetaRow
74
76
  label="Status"
75
- value={preview.linkedSession.isAttached ? 'attached' : 'detached'}
76
- color={preview.linkedSession.isAttached ? theme.active : theme.textMuted}
77
+ value={preview.linkedSession.isActive ? 'active' : 'inactive'}
78
+ color={preview.linkedSession.isActive ? theme.active : theme.textMuted}
79
+ />
80
+ <MetaRow
81
+ label={preview.linkedSession.unitLabel}
82
+ value={String(preview.linkedSession.units.length)}
77
83
  />
78
- <MetaRow label="Windows" value={String(preview.linkedSession.windowCount)} />
79
84
  </box>
80
85
  )}
81
86
 
@@ -97,50 +102,64 @@ function ProjectPreviewView({ preview }: { preview: ProjectPreview }) {
97
102
  )
98
103
  }
99
104
 
100
- function SessionDetailsView({ details }: { details: SessionDetails }) {
105
+ function SessionDetailsView({ details }: { details: WorkspaceDetails }) {
101
106
  const theme = useTheme()
102
107
 
103
108
  return (
104
109
  <box style={{ flexDirection: 'column' }}>
105
- <text style={{ fg: theme.secondary }}>{details.name}</text>
110
+ <text style={{ fg: theme.secondary }}>{details.workspace.title}</text>
106
111
 
107
112
  <box style={{ flexDirection: 'column', marginTop: 1 }}>
108
113
  <MetaRow
109
114
  label="Status"
110
- value={details.isAttached ? 'active' : 'inactive'}
111
- color={details.isAttached ? theme.active : theme.textMuted}
115
+ value={details.isActive ? 'active' : 'inactive'}
116
+ color={details.isActive ? theme.active : theme.textMuted}
112
117
  />
113
- <MetaRow label="Windows" value={String(details.windowCount)} />
118
+ <MetaRow label={details.unitLabel} value={String(details.units.length)} />
114
119
  </box>
115
120
 
116
- <SectionLabel>Windows</SectionLabel>
121
+ <SectionLabel>{details.unitLabel}</SectionLabel>
117
122
  <box style={{ flexDirection: 'column', marginTop: 1 }}>
118
- {details.windows.length === 0 ? (
119
- <text style={{ fg: theme.textMuted }}>No windows found</text>
123
+ {details.units.length === 0 ? (
124
+ <text style={{ fg: theme.textMuted }}>No {details.unitLabel.toLowerCase()} found</text>
120
125
  ) : (
121
- details.windows.map(win => (
122
- <box
123
- key={`${win.index}:${win.name}`}
124
- style={{ flexDirection: 'column', marginBottom: 1 }}
125
- >
126
- <text style={{ fg: theme.text }}>
127
- {win.index}: {win.name}
128
- </text>
129
- {win.currentPath && <text style={{ fg: theme.fileTree }}>{win.currentPath}</text>}
130
- {win.currentCommand && (
131
- <text style={{ fg: theme.textSubtle }}>{win.currentCommand}</text>
126
+ details.units.map(unit => (
127
+ <box key={unit.id} style={{ flexDirection: 'column', marginBottom: 1 }}>
128
+ <text style={{ fg: theme.text }}>{unit.name}</text>
129
+ {unit.currentPath && <text style={{ fg: theme.fileTree }}>{unit.currentPath}</text>}
130
+ {unit.currentCommand && (
131
+ <text style={{ fg: theme.textSubtle }}>{unit.currentCommand}</text>
132
132
  )}
133
133
  </box>
134
134
  ))
135
135
  )}
136
136
  </box>
137
137
 
138
- {details.panePreviewLines && details.panePreviewLines.length > 0 && (
138
+ {details.agents.length > 0 && (
139
+ <>
140
+ <SectionLabel>Agents</SectionLabel>
141
+ <box style={{ flexDirection: 'column', marginTop: 1 }}>
142
+ {details.agents.map(agent => (
143
+ <box key={agent.paneId} style={{ flexDirection: 'column', marginBottom: 1 }}>
144
+ <text style={{ fg: theme.action }}>
145
+ {agent.name} · {agent.status}
146
+ </text>
147
+ {agent.cwd && <text style={{ fg: theme.fileTree }}>{agent.cwd}</text>}
148
+ </box>
149
+ ))}
150
+ </box>
151
+ </>
152
+ )}
153
+
154
+ {details.previewLines && details.previewLines.length > 0 && (
139
155
  <>
140
156
  <SectionLabel>Preview</SectionLabel>
141
157
  <box style={{ flexDirection: 'column', marginTop: 1 }}>
142
- {details.panePreviewLines.map((line, index) => (
143
- <text key={`${details.name}:preview:${index}`} style={{ fg: theme.textMuted }}>
158
+ {details.previewLines.map((line, index) => (
159
+ <text
160
+ key={`${details.workspace.id}:preview:${index}`}
161
+ style={{ fg: theme.textMuted }}
162
+ >
144
163
  {line}
145
164
  </text>
146
165
  ))}
@@ -151,7 +170,7 @@ function SessionDetailsView({ details }: { details: SessionDetails }) {
151
170
  )
152
171
  }
153
172
 
154
- export default function SessionDetailsPanel({ selectedItem, config }: Props) {
173
+ export default function SessionDetailsPanel({ selectedItem, config, backend }: Props) {
155
174
  const theme = useTheme()
156
175
  const [detailState, setDetailState] = useState<DetailState>({ status: 'idle' })
157
176
 
@@ -167,8 +186,9 @@ export default function SessionDetailsPanel({ selectedItem, config }: Props) {
167
186
  setDetailState({ status: 'loading' })
168
187
 
169
188
  try {
170
- if (selectedItem.isSession) {
171
- const details = await getSessionDetails(selectedItem.title)
189
+ if (isLiveSessionItem(selectedItem)) {
190
+ if (!backend) throw new Error('Multiplexer backend is not loaded yet')
191
+ const details = await backend.details(getWorkspaceRef(selectedItem))
172
192
  if (!cancelled) {
173
193
  setDetailState({ status: 'session', details })
174
194
  }
@@ -182,9 +202,23 @@ export default function SessionDetailsPanel({ selectedItem, config }: Props) {
182
202
  return
183
203
  }
184
204
 
205
+ const linkedWorkspace: WorkspaceRef | undefined =
206
+ selectedItem.linkedSessionId && selectedItem.linkedSessionBackend
207
+ ? {
208
+ backend: selectedItem.linkedSessionBackend,
209
+ id: selectedItem.linkedSessionId,
210
+ title: selectedItem.linkedSessionName ?? selectedItem.linkedSessionId,
211
+ }
212
+ : undefined
185
213
  const details = isFileItem(selectedItem)
186
- ? await getFilePreview(selectedItem.path, config, selectedItem.linkedSessionName)
187
- : await getProjectPreview(selectedItem.path, config, selectedItem.linkedSessionName)
214
+ ? await getFilePreview(selectedItem.path, config, linkedWorkspace, workspace => {
215
+ if (!backend) throw new Error('Multiplexer backend is not loaded yet')
216
+ return backend.details(workspace)
217
+ })
218
+ : await getProjectPreview(selectedItem.path, config, linkedWorkspace, workspace => {
219
+ if (!backend) throw new Error('Multiplexer backend is not loaded yet')
220
+ return backend.details(workspace)
221
+ })
188
222
  if (!cancelled) {
189
223
  setDetailState({ status: 'project', details })
190
224
  }
@@ -201,7 +235,7 @@ export default function SessionDetailsPanel({ selectedItem, config }: Props) {
201
235
  return () => {
202
236
  cancelled = true
203
237
  }
204
- }, [config, selectedItem])
238
+ }, [backend, config, selectedItem])
205
239
 
206
240
  const panelStyle = {
207
241
  ...getDetailPanelStyle(theme),
@@ -1,11 +1,12 @@
1
1
  import { useTheme } from '../styles/theme'
2
- import { formatSessionAge } from '../util/time'
3
2
  import type { IconConfig, Item } from '../types'
4
3
  import { getSessionSection } from '../items/order'
4
+ import { getItemKey } from '../multiplexer/items'
5
5
  import HighlightedText from './HighlightedText'
6
6
  import { formatSectionHeader, getItemIconPresentation } from './item-icon'
7
7
  import { getVisibleWindow } from './list-window'
8
8
  import { getMutedLabelColumnWidth, getMutedLabelSpacer } from './text-columns'
9
+ import { getSessionMeta } from './session-meta'
9
10
 
10
11
  interface Props {
11
12
  items: Item[]
@@ -34,20 +35,23 @@ export default function SessionList({
34
35
  {visibleWindow.items.map((item, i) => {
35
36
  const absoluteIndex = visibleWindow.startIndex + i
36
37
  const matchIndices = item.searchMatch?.titleIndices
37
- const itemMeta = item.isSession && item.createdAt ? formatSessionAge(item.createdAt) : ''
38
+ const itemMeta = getSessionMeta(item)
38
39
  const icon = getItemIconPresentation(theme, item, icons)
39
40
  const currentSection = getSessionSection(item)
40
41
  const previousItem = absoluteIndex > 0 ? items[absoluteIndex - 1] : undefined
41
42
  const previousSection = previousItem ? getSessionSection(previousItem) : undefined
42
43
  const showSectionHeader = i === 0 || currentSection !== previousSection
43
- const sectionHeader = formatSectionHeader(theme, currentSection, icons)
44
- const pendingKill = item.title === pendingKillSessionName
44
+ const sectionHeader = formatSectionHeader(theme, currentSection, icons, item.backend)
45
+ const pendingKill = getItemKey(item) === pendingKillSessionName
45
46
  const selected = absoluteIndex === cursor
46
47
  const mutedLabelSpacer =
47
48
  item.isSession && item.desc ? getMutedLabelSpacer(item.title, mutedLabelColumnWidth) : ''
48
49
 
49
50
  return (
50
- <box key={i} style={{ flexDirection: 'column' }}>
51
+ <box
52
+ key={item.isSession ? getItemKey(item) : `${getItemKey(item)}:${item.path}`}
53
+ style={{ flexDirection: 'column' }}
54
+ >
51
55
  {showSectionHeader && (
52
56
  <text
53
57
  style={{
@@ -91,8 +95,20 @@ export default function SessionList({
91
95
  ) : null}
92
96
  </text>
93
97
 
94
- <text style={{ fg: pendingKill ? theme.danger : theme.textSubtle }}>
95
- {pendingKill ? 'press d again to kill' : itemMeta}
98
+ <text
99
+ style={{
100
+ fg: pendingKill
101
+ ? theme.danger
102
+ : item.agentStatus === 'blocked'
103
+ ? theme.danger
104
+ : item.agentStatus === 'working'
105
+ ? theme.active
106
+ : theme.textSubtle,
107
+ }}
108
+ >
109
+ {pendingKill
110
+ ? `press d again to ${item.itemKind === 'herdr' ? 'close' : 'kill'}`
111
+ : itemMeta}
96
112
  </text>
97
113
  </box>
98
114
  </box>
@@ -1,6 +1,6 @@
1
1
  import { isAgentSessionItem } from '../agents/session-name'
2
2
  import type { SessionSection } from '../items/order'
3
- import type { IconConfig, Item, ThemeColors } from '../types'
3
+ import type { BackendKind, IconConfig, Item, ThemeColors } from '../types'
4
4
 
5
5
  export interface ItemIconPresentation {
6
6
  glyph: string
@@ -12,6 +12,7 @@ const FILE_ITEM_GLYPH = '  '
12
12
  function getIconConfig(icons?: IconConfig): IconConfig {
13
13
  return {
14
14
  tmux: icons?.tmux ?? '',
15
+ herdr: icons?.herdr ?? 'H',
15
16
  configured: icons?.configured ?? '',
16
17
  project: icons?.project ?? '',
17
18
  opencode: icons?.opencode ?? '',
@@ -45,14 +46,20 @@ export function getItemIconPresentation(
45
46
 
46
47
  if (item.isSession) {
47
48
  return {
48
- glyph: item.icon ?? (isAgentSessionItem(item) ? resolvedIcons.opencode : resolvedIcons.tmux),
49
+ glyph:
50
+ item.icon ??
51
+ (isAgentSessionItem(item)
52
+ ? resolvedIcons.opencode
53
+ : item.itemKind === 'herdr'
54
+ ? resolvedIcons.herdr
55
+ : resolvedIcons.tmux),
49
56
  color: item.isAttached ? theme.active : theme.inactive,
50
57
  }
51
58
  }
52
59
 
53
60
  if (item.linkedSessionName) {
54
61
  return {
55
- glyph: resolvedIcons.tmux,
62
+ glyph: item.linkedSessionBackend === 'herdr' ? resolvedIcons.herdr : resolvedIcons.tmux,
56
63
  color: item.linkedSessionAttached ? theme.active : theme.inactive,
57
64
  }
58
65
  }
@@ -66,7 +73,8 @@ export function getItemIconPresentation(
66
73
  export function getSessionSectionPresentation(
67
74
  theme: ThemeColors,
68
75
  section: SessionSection | 'agents',
69
- icons?: IconConfig
76
+ icons?: IconConfig,
77
+ backend?: BackendKind
70
78
  ): ItemIconPresentation & { label: string } {
71
79
  const resolvedIcons = getIconConfig(icons)
72
80
 
@@ -78,16 +86,21 @@ export function getSessionSectionPresentation(
78
86
  case 'agents':
79
87
  return { glyph: resolvedIcons.opencode, color: theme.action, label: 'Agents' }
80
88
  case 'live':
81
- return { glyph: resolvedIcons.tmux, color: theme.action, label: 'Live' }
89
+ return {
90
+ glyph: backend === 'herdr' ? resolvedIcons.herdr : resolvedIcons.tmux,
91
+ color: theme.action,
92
+ label: 'Live',
93
+ }
82
94
  }
83
95
  }
84
96
 
85
97
  export function formatSectionHeader(
86
98
  theme: ThemeColors,
87
99
  section: SessionSection | 'agents',
88
- icons?: IconConfig
100
+ icons?: IconConfig,
101
+ backend?: BackendKind
89
102
  ): ItemIconPresentation & { text: string } {
90
- const presentation = getSessionSectionPresentation(theme, section, icons)
103
+ const presentation = getSessionSectionPresentation(theme, section, icons, backend)
91
104
  const prefix = presentation.glyph.length > 0 ? `${presentation.glyph} ` : ''
92
105
 
93
106
  return {
@@ -0,0 +1,10 @@
1
+ import type { Item } from '../types'
2
+ import { formatSessionAge } from '../util/time'
3
+
4
+ export function getSessionMeta(item: Item): string {
5
+ if (item.itemKind === 'herdr') {
6
+ return item.agentStatus && item.agentStatus !== 'unknown' ? item.agentStatus : ''
7
+ }
8
+
9
+ return item.createdAt ? formatSessionAge(item.createdAt) : ''
10
+ }