fix(tui): release the adapter-registration listener on channel detach

Review follow-up: the llm/adapters-updated listener's disposer was
discarded, leaving it firing (harmlessly, behind isDisposed()) between
TUI shutdown and fiber disposal, asymmetric with the sibling channel
listeners. The controller now exposes detach(), and the channel's
detachListeners() calls it on both the dispose() and startup-failure
paths.
This commit is contained in:
Turtle
2026-07-31 15:11:24 +08:00
parent 899d25dfb3
commit 732c9e6d95
6 changed files with 38 additions and 6 deletions

View File

@@ -1563,6 +1563,7 @@ export function createTuiChat(
disposeAgent()
disposeSchemeListener()
disposeTargetListeners()
modelController.detach()
}
// Sweep reveal of the whole banner: the header wipes in left-to-right over