section 13: Phase 13: Multi-run launcher and run groups in the repo page

This commit is contained in:
Chris Scott committed 2026-10-03 11:03:06 -04:00
1 parent 891f5427b4
commit 444a43aa1d
6 files changed
+674 -4

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
import { fetchWrapper } from './fetchWrapper'
import { API_BASE_URL } from '@/config'
import type { LaunchMultiRunRequest, MultiRun } from '@opencode-manager/shared/schemas'
export async function listMultiRuns(repoId: number): Promise<MultiRun[]> {
const res = await fetchWrapper<{ runs: MultiRun[] }>(`${API_BASE_URL}/api/multi-runs`, {
params: { repoId },
})
return res.runs
}
export async function launchMultiRun(request: LaunchMultiRunRequest): Promise<MultiRun> {
const res = await fetchWrapper<{ run: MultiRun }>(`${API_BASE_URL}/api/multi-runs`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(request),
})
return res.run
}
export async function discardMultiRunEntry(runId: number, entryId: number): Promise<MultiRun> {
const res = await fetchWrapper<{ run: MultiRun }>(
`${API_BASE_URL}/api/multi-runs/${encodeURIComponent(runId)}/entries/${encodeURIComponent(entryId)}/discard`,
{ method: 'POST' },
)
return res.run
}