fix: reset cancel button state to prevent it from remaining inactive #9304
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.
This PR attempts to address Issue #9303. Feedback and guidance are welcome.
Problem
The cancel button in the chat UI was remaining inactive/disabled after clicking it during streaming operations, requiring users to restart VSCode to regain functionality.
Solution
The issue occurred because the
didClickCancelflag was set totruewhen clicking the cancel button but was only reset in very specific scenarios (resume_taskandresume_completed_taskasks). This fix ensures the flag is properly reset in all necessary scenarios:didClickCancelwhen transitioning from streaming to non-streaming statehandleChatResetfunction for consistent state managementTesting
Related Issue
Fixes #9303
Important
Fixes cancel button inactivity in
ChatView.tsxby resettingdidClickCancelflag in various scenarios.didClickCancelflag inChatView.tsxwhen:ChatViewtests pass.This description was created by
for 87044dd. You can customize this summary. It will automatically update as commits are pushed.