MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / SessionCard

Function SessionCard

ui/src/components/workspace/WorkspaceView.tsx:209–238  ·  view source on GitHub ↗
(props: {
  record: SessionRecord;
  onClick: () => void;
})

Source from the content-addressed store, hash-verified

207}
208
209function 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}

Callers

nothing calls this directly

Calls 2

prefixOfFunction · 0.90
formatRelativeTimeFunction · 0.90

Tested by

no test coverage detected