feat: add multi-run fusion and session change walkthroughs

Fuse two to five completed multi-run entries into one synthesized session,
and explain a session's diff as ordered walkthrough stops cached by diff hash.

- Multi-run fusion service, persistence, routes and FuseRunDialog
- Change walkthrough service, persistence, routes and ChangesWalkthroughDialog
- Shared unified-diff parser plus bounded text generation, json-extract,
  text-truncate and service-error helpers
This commit is contained in:
Chris Scott committed 2026-10-06 15:27:14 -04:00
1 parent 90c6ccf236
commit b36d412ca2
66 files changed
+6228 -468

No files matched your search

+13 -1
View File
@@ -1,6 +1,6 @@
import { fetchWrapper } from './fetchWrapper'
import { API_BASE_URL } from '@/config'
import type { LaunchMultiRunRequest, MultiRun } from '@opencode-manager/shared/schemas'
import type { FuseMultiRunRequest, 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`, {
@@ -18,6 +18,18 @@ export async function launchMultiRun(request: LaunchMultiRunRequest): Promise<Mu
return res.run
}
export async function fuseMultiRun(runId: number, request: FuseMultiRunRequest): Promise<MultiRun> {
const res = await fetchWrapper<{ run: MultiRun }>(
`${API_BASE_URL}/api/multi-runs/${encodeURIComponent(runId)}/fusions`,
{
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`,