mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
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:
1 parent
2d134d9de7
commit
0752ebf360
12 files changed
+334
-21
No files matched your search
@@ -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) },
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user