(props: {
record: SessionRecord;
onClick: () => void;
})
| 207 | } |
| 208 | |
| 209 | function SessionCard(props: { |
| 210 | record: SessionRecord; |
| 211 | onClick: () => void; |
| 212 | }): ReactElement { |
| 213 | const r = props.record; |
| 214 | const isPaused = r.state === 'paused'; |
| 215 | return ( |
| 216 | <li className="workspace-empty-card"> |
| 217 | <span className="inline-flex items-center justify-center shrink-0 min-w-[18px] h-4 px-1 rounded text-[10px] font-mono text-text-muted bg-bg-tertiary"> |
| 218 | {prefixOf(r.agent)} |
| 219 | </span> |
| 220 | <div className="workspace-empty-card-meta"> |
| 221 | <span className="workspace-empty-card-name">{r.name}</span> |
| 222 | <span className="workspace-empty-card-state"> |
| 223 | {isPaused ? 'paused · ' : 'active · '} |
| 224 | {formatRelativeTime(r.lastActiveAt)} |
| 225 | </span> |
| 226 | </div> |
| 227 | <button |
| 228 | type="button" |
| 229 | className="workspace-empty-card-btn" |
| 230 | onClick={props.onClick} |
| 231 | aria-label={isPaused ? `Resume ${r.name}` : `Open ${r.name}`} |
| 232 | > |
| 233 | <MessageSquare size={13} strokeWidth={2.25} aria-hidden="true" /> |
| 234 | <span>Continue</span> |
| 235 | </button> |
| 236 | </li> |
| 237 | ); |
| 238 | } |
nothing calls this directly
no test coverage detected