* Push a `config_option_update` session notification carrying the * full SessionConfigOption[] snapshot computed from the * adapter-side `currentModelId` + `currentModeId` authoritative state. * * Called from setModel and setMode after the SDK * toggle(s) succe
()
| 467 | * that triggered it. |
| 468 | */ |
| 469 | private async emitConfigOptionUpdate(): Promise<void> { |
| 470 | if (!this.harness) return; |
| 471 | try { |
| 472 | const snapshot = await buildSessionConfigOptions( |
| 473 | this.harness, |
| 474 | this.currentModelIdInternal, |
| 475 | this.currentThinkingEnabledInternal, |
| 476 | this.currentModeIdInternal, |
| 477 | ); |
| 478 | await this.conn.sessionUpdate(configOptionUpdateNotification(this.id, snapshot)); |
| 479 | } catch (err) { |
| 480 | log.warn('acp: failed to emit config_option_update', { |
| 481 | sessionId: this.id, |
| 482 | error: err instanceof Error ? err.message : String(err), |
| 483 | }); |
| 484 | } |
| 485 | } |
| 486 | |
| 487 | /** |
| 488 | * Replay the underlying SDK session's persisted history as a stream |
no test coverage detected