Update session state when a new client run begins

This commit is contained in:
2026-06-15 15:45:09 +02:00
parent e274c09ae5
commit f0edcbccd5

View File

@@ -1111,6 +1111,18 @@ export default function App() {
startedAt: Date.now(),
events: [],
}
if (event.type === 'client_run_started' && current.runId !== event.run_id) {
return {
...previous,
[sessionId]: {
runId: event.run_id,
workflowName: event.payload?.workflow?.name || 'Workflow',
status: 'running',
startedAt: Date.now(),
events: [event],
},
}
}
let status = current.status
let finishedAt = current.finishedAt
if (event.type === 'client_run_started') {