fix: address P0-4 chat zombie, P0-5 double SessionStarted, P0-6 steering wrong content
This commit is contained in:
+7
@@ -1,5 +1,6 @@
|
||||
package com.correx.core.kernel.orchestration
|
||||
|
||||
import com.correx.core.events.events.ChatSessionStartedEvent
|
||||
import com.correx.core.events.events.OrchestrationPausedEvent
|
||||
import com.correx.core.events.events.OrchestrationResumedEvent
|
||||
import com.correx.core.events.events.RetryAttemptedEvent
|
||||
@@ -16,6 +17,12 @@ class DefaultOrchestrationReducer : OrchestrationReducer {
|
||||
state: OrchestrationState,
|
||||
event: StoredEvent,
|
||||
): OrchestrationState = when (val p = event.payload) {
|
||||
is ChatSessionStartedEvent -> state.copy(
|
||||
workflowId = "chat",
|
||||
status = OrchestrationStatus.CHAT,
|
||||
currentStageId = null,
|
||||
)
|
||||
|
||||
is WorkflowStartedEvent -> state.copy(
|
||||
workflowId = p.workflowId,
|
||||
status = OrchestrationStatus.RUNNING,
|
||||
|
||||
Reference in New Issue
Block a user