Skip to content

Commit 2c7b820

Browse files
committed
🤖 Add init event handlers to processStreamEvent
Init events are buffered like stream events but were missing handlers in processStreamEvent(), causing them to be silently dropped. Generated with `cmux`
1 parent 1e65716 commit 2c7b820

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/stores/WorkspaceStore.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,13 @@ export class WorkspaceStore {
991991
return;
992992
}
993993

994+
// Handle init events (buffered like stream events during replay)
995+
if (isInitStart(data) || isInitOutput(data) || isInitEnd(data)) {
996+
aggregator.handleMessage(data);
997+
this.states.bump(workspaceId);
998+
return;
999+
}
1000+
9941001
// Regular messages (CmuxMessage without type field)
9951002
const isCaughtUp = this.caughtUp.get(workspaceId) ?? false;
9961003
if (!isCaughtUp && "role" in data && !("type" in data)) {

0 commit comments

Comments
 (0)