Commit 6aa129e
committed
fix: ensure cancel button properly aborts streaming responses
- Set abort flag immediately in ClineProvider.cancelTask() before calling abortTask()
- Add early abort check at the beginning of streaming loop before processing chunks
- Add proper iterator cleanup when aborting stream
- Keep existing abort check after chunk processing for redundancy
This ensures the cancel button works even when chunks are arriving constantly,
addressing the issue where the abort flag appeared to never be set.
Fixes #70141 parent 8e7a2e7 commit 6aa129e
2 files changed
+32
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1663 | 1663 | | |
1664 | 1664 | | |
1665 | 1665 | | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
1666 | 1686 | | |
1667 | 1687 | | |
1668 | 1688 | | |
| |||
1707 | 1727 | | |
1708 | 1728 | | |
1709 | 1729 | | |
| 1730 | + | |
1710 | 1731 | | |
1711 | | - | |
| 1732 | + | |
1712 | 1733 | | |
1713 | 1734 | | |
1714 | 1735 | | |
| |||
1718 | 1739 | | |
1719 | 1740 | | |
1720 | 1741 | | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
1721 | 1747 | | |
1722 | 1748 | | |
1723 | 1749 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1228 | 1228 | | |
1229 | 1229 | | |
1230 | 1230 | | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
1231 | 1235 | | |
1232 | 1236 | | |
1233 | 1237 | | |
| |||
1243 | 1247 | | |
1244 | 1248 | | |
1245 | 1249 | | |
1246 | | - | |
| 1250 | + | |
1247 | 1251 | | |
1248 | 1252 | | |
1249 | 1253 | | |
| |||
0 commit comments