mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 21:04:23 +01:00
* ralph: ralph-repo-level-skills-dialog-skillseditor-fix completed after 4 iterations * Remove parent session notification and child session tracking from Ralph loops Sending promptAsync to parent sessions on loop completion could resume work in previously inactive sessions. Removed parentSessionId from RalphState, child session tracking maps, and all related event handling. Watchdog stall detection still works via the session status API. * Migrate global skills to workspace path * Add skill injection to scheduled job prompts * Refactor schedules UI with MultiSelect and tab menu * Update skills UI components for managed skills
44 lines
1.8 KiB
TypeScript
44 lines
1.8 KiB
TypeScript
import type { ScheduleJob } from '@opencode-manager/shared/types'
|
|
import { Badge } from '@/components/ui/badge'
|
|
import { formatScheduleShortLabel, getJobStatusTone } from '@/components/schedules/schedule-utils'
|
|
import { Bot, Clock3 } from 'lucide-react'
|
|
import { cn } from '@/lib/utils'
|
|
|
|
interface JobsTabProps {
|
|
jobs: ScheduleJob[]
|
|
selectedJobId: number | null
|
|
onSelectJob: (id: number) => void
|
|
}
|
|
|
|
export function JobsTab({ jobs, selectedJobId, onSelectJob }: JobsTabProps) {
|
|
return (
|
|
<div className="h-full overflow-y-auto space-y-2 pt-2">
|
|
{jobs.map((job) => (
|
|
<button
|
|
key={job.id}
|
|
type="button"
|
|
onClick={() => onSelectJob(job.id)}
|
|
className={cn(
|
|
'w-full rounded-xl border-2 px-4 py-3 text-left transition-all',
|
|
selectedJobId === job.id
|
|
? 'border-primary bg-primary/10 ring-2 ring-primary/30'
|
|
: 'border-border/70 bg-background/60 hover:bg-accent/40'
|
|
)}
|
|
>
|
|
<div className="flex items-start justify-between gap-2">
|
|
<div className="min-w-0">
|
|
<p className="font-medium truncate">{job.name}</p>
|
|
<p className="mt-1 truncate text-xs text-muted-foreground">{job.description || 'No description yet'}</p>
|
|
</div>
|
|
<Badge className={getJobStatusTone(job)}>{job.enabled ? 'Enabled' : 'Paused'}</Badge>
|
|
</div>
|
|
<div className="mt-2 flex flex-wrap gap-2 text-xs text-muted-foreground">
|
|
<span className="inline-flex items-center gap-1"><Clock3 className="h-3.5 w-3.5" /> {formatScheduleShortLabel(job)}</span>
|
|
<span className="inline-flex items-center gap-1"><Bot className="h-3.5 w-3.5" /> {job.agentSlug ?? 'default agent'}</span>
|
|
</div>
|
|
</button>
|
|
))}
|
|
</div>
|
|
)
|
|
}
|