We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 60dc187 commit a4410f9Copy full SHA for a4410f9
1 file changed
packages/opencode/src/bus/global.ts
@@ -11,6 +11,15 @@ export type GlobalEvent = {
11
class GlobalBusEmitter extends EventEmitter<{
12
event: [GlobalEvent]
13
}> {
14
+ constructor() {
15
+ super()
16
+ // Every attached project/client adds an "event" listener (SSE streams, control plane,
17
+ // TUI worker), so the default cap of 10 triggers MaxListenersExceededWarning under
18
+ // normal multi-project fan-out. Listeners are paired with off() via acquireRelease.
19
+ this.setMaxListeners(0)
20
+ }
21
+
22
23
override emit(eventName: "event", event: GlobalEvent): boolean {
24
if (event.payload && typeof event.payload === "object" && !("id" in event.payload)) {
25
event.payload.id = event.payload.syncEvent?.id ?? Identifier.create("evt", "ascending")
0 commit comments