Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): stop background work through session teardown #11159

Closedsatyalyadav(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/11159/headopened View on GitHub

Showing 1 changed file with 22 additions and 19 deletions.

x
0 of 1 viewed, 1 left
22 additions and 19 deletionsapps/web/src/components/ChatView.tsxModified
View file
@@ -381,7 +381,6 @@
buildLocalDraftThread,
buildLoadingThreadFromShell,
buildRunningThreadTurnInterruptInput,
- buildThreadTurnInterruptInput,
collectUserMessageBlobPreviewUrls,
createLocalDispatchSnapshot,
deriveComposerSendState,
@@ -1445,6 +1444,9 @@
const interruptThreadTurn = useAtomCommand(threadEnvironment.interruptTurn, {
reportFailure: false,
+ const stopThreadSession = useAtomCommand(threadEnvironment.stopSession, {
+ reportFailure: false,
+ });
const respondToThreadApproval = useAtomCommand(threadEnvironment.respondToApproval, {
reportFailure: false,
@@ -5719,45 +5721,46 @@
// Background work (subagent fleets, workflow runs, watch loops) can outlive
// the turn; once it settles, the composer stop button is gone, so this
- // banner is the only visible stop affordance. Stop routes through the
- // stop-everything interrupt: it kills every live background task before
- // interrupting, and works by session, so no active turn is needed.
+ // banner is the only visible stop affordance. Stop ends the provider session,
+ // which tears down its background work and emits the liveness update.
const activeBackgroundLiveness =