feat(seer agent): add esc as a way to stop thinking#113734
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 038422d. Configure here.
| handleSend(); | ||
| } else if (e.key === 'Escape' && canInterrupt && !waitingForInterrupt) { | ||
| e.preventDefault(); | ||
| interruptRun(); |
There was a problem hiding this comment.
Missing stopPropagation causes drawer to close on Escape
High Severity
The Escape key handler calls e.preventDefault() but not e.stopPropagation(). The drawer documentation states it "always closes on Escape in both modes," so pressing Escape to interrupt thinking will also close the drawer. The existing Escape handler in explorerMenu.tsx correctly uses both e.preventDefault() and e.stopPropagation() to avoid this exact problem.
Reviewed by Cursor Bugbot for commit 038422d. Configure here.
There was a problem hiding this comment.
Perfect! The fix has been applied successfully. The change adds e.stopPropagation() on line 231, which prevents the Escape key event from bubbling up to the drawer component that would otherwise close the drawer. This matches the pattern used in the existing explorerMenu.tsx file.
Summary
I've successfully added e.stopPropagation() to the Escape key handler in the Seer Explorer drawer. The fix ensures that when users press Escape to interrupt the thinking process, the drawer won't close unexpectedly.
Changes made:
- Added
e.stopPropagation()on line 231 inexplorerDrawerContent.tsxto prevent the Escape key event from bubbling up to the drawer's close handler - The fix follows the same pattern used in
explorerMenu.tsxfor handling Escape key presses
Commit: fix(seer agent): add stopPropagation to prevent drawer close on interrupt
The changes have been committed and pushed to the branch sehrm/esc-pauses-thinking-seer-agent.




To fit with convention, esc is now a hotkey for stopping thinking in the seer explorer drawer. The drawer still uses polling so if pausing is done before the thinking starts nothing will be returned, otherwise it will be the last message returned from the poll.