SIGN IN SIGN UP

chat: fix crash on disposed widget in scopedTools derived (#309547) (#309588)

fix #309547 - guard scopedTools derived against disposed widget

The derived observable created in getModeRequestOptions() outlives the
ChatWidget. When MCP tool changes trigger a recompute after the widget
is disposed, this.input is undefined (MutableDisposable cleared),
crashing on .currentModeObs. Add a disposal guard to return the last
snapshot instead. (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
R
Rob Lourens committed
8eee54774d789e909071d5ca1d03f05cc45ca54e
Parent: 8a73ca2
Committed by GitHub <noreply@github.com> on 4/13/2026, 8:41:36 PM