feat: initial conversational flow #37

Merged
talksik merged 39 commits from 33-conversational-flow-for-streams---story-mode into master 2026-03-19 23:29:41 +00:00
Showing only changes of commit 20fb9a4c6e - Show all commits
@@ -79,6 +79,10 @@ function playbackReducer(
if (action.particleCount === 0) {
return { currentIndex: 0, status: "idle", paused: state.paused };
}
if (state.status === "ended" && state.currentIndex < action.particleCount - 1) {
// New particle appended — resume and advance to it
return { ...state, currentIndex: state.currentIndex + 1, status: "playing", paused: false };
}
if (state.currentIndex >= action.particleCount) {
return { ...state, currentIndex: action.particleCount - 1 };
}