Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When a user triggers an abort (e.g. using alt-. or the evaluation menu), the asynchronous task would previously keep running, displaying new chat output. However, the code to finalize the chat output had been cancelled, so the cell remained in in an active state even when finished.
This update changes the behavior associated with user aborts that are issued during chat evaluation by immediately evaluating the "StopChat" action. Now a user abort is effectively equivalent to hitting the red "X" button to stop a chat in progress.
This also introduces a new handler function "ChatAbort", which will run during the stop chat cleanup step.
Before
After