feat(walkthrough): stop an in-flight change walkthrough generation

Add DELETE /api/change-walkthroughs/:sessionId to cancel the generation for a session and source. The service removes the in-flight entry, persists the partial walkthrough, and aborts a per-generation signal threaded through model resolution and every model call. Cancellation is not recorded as a failure and leaves the remaining stops pending. A Stop button in the walkthrough chrome calls the new endpoint.
This commit is contained in:
Chris Scott committed 2026-10-10 17:48:14 +00:00
1 parent 2d134d9de7
commit 0752ebf360
12 files changed
+334 -21

No files matched your search

+11 -1
View File
@@ -1,4 +1,4 @@
import { fetchWrapper } from './fetchWrapper'
import { fetchWrapper, fetchWrapperVoid } from './fetchWrapper'
import { API_BASE_URL } from '@/config'
import { walkthroughSourceKey } from '@opencode-manager/shared/schemas'
import type {
@@ -35,3 +35,13 @@ export async function generateChangeWalkthrough(
body: JSON.stringify(request),
})
}
export async function cancelChangeWalkthrough(
sessionId: string,
source: WalkthroughSource,
): Promise<void> {
await fetchWrapperVoid(walkthroughUrl(sessionId), {
method: 'DELETE',
params: { source: walkthroughSourceKey(source) },
})
}