Skip to content

The open-source agent harness - the runtime layer that turns an LLM into a working agent.

703 B
Raw Blame
'use client';

import type { ScheduleRun } from '../../server/types.js';
import { ScheduleRunChip } from './ScheduleRunChip.js';
import { lastHistoricalRuns } from './scheduleRuns.js';

export function ScheduleLastRunsCell({
  runs,
  onOpenSession,
}: {
  runs: readonly ScheduleRun[];
  onOpenSession?: (run: ScheduleRun) => void;
}) {
  const history = lastHistoricalRuns(runs);
  if (history.length === 0) {
    return <span className="text-text-secondary text-sm">—</span>;
  }
  return (
    <div className="flex items-center gap-1">
      {history.map(run => (
        <ScheduleRunChip key={run.id} run={run} {...(onOpenSession == null ? {} : { onOpenSession })} />
      ))}
    </div>
  );
}