(state: State)
| 97 | } |
| 98 | |
| 99 | emitState(state: State) { |
| 100 | this.state = state; |
| 101 | for (const s of this.subscribers) { |
| 102 | s.onStateChanged?.({ |
| 103 | messages: this.messages, |
| 104 | state: this.state, |
| 105 | agent: this, |
| 106 | }); |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | emitRunInitialized() { |
| 111 | for (const s of this.subscribers) { |