This commit is contained in:
team3
2026-06-30 00:36:41 +02:00
parent c794fcaccf
commit 3669fd8d0a
6 changed files with 52 additions and 26 deletions

View File

@@ -224,12 +224,12 @@ async function handleResetFromStep(step) {
await loadBlocks()
}
async function handleBlocksClick({ instructions, abPhase = null, abStep = null }) {
async function handleBlocksClick({ instructions, abPhase = null, abStep = null, toStep = null }) {
if (!selectedTopic.value) return
uiError.value = null
try {
// Source is already fixed here; abPhase/abStep control the re-run scope.
await apiCreateBausteine(selectedTopic.value, instructions, provider.value, undefined, undefined, abPhase, abStep)
// Source is already fixed here; abPhase/abStep set the start, toStep an optional end limit.
await apiCreateBausteine(selectedTopic.value, instructions, provider.value, undefined, undefined, abPhase, abStep, toStep)
} catch (e) {
uiError.value = e.message
return
@@ -422,7 +422,7 @@ onMounted(async () => {
:ready="blocks.ready"
:partial="blocks.partial"
@close="mainView = 'detail'"
@restartFrom="(i) => handleBlocksClick({ instructions: '', abStep: i })"
@restartFrom="(r) => handleBlocksClick({ instructions: '', abStep: r.from, toStep: r.to })"
@resetFrom="handleResetFromStep"
@restartAll="() => handleBlocksClick({ abPhase: blocks.ready ? 1 : null })"
@removeAll="handleResetBlocks"