Skip to content

Allow Escape to interrupt agent thread from conversation focus#46410

Merged
rtfeldman merged 5 commits intomainfrom
escape-interrupts-thread-from-conversation
Jan 9, 2026
Merged

Allow Escape to interrupt agent thread from conversation focus#46410
rtfeldman merged 5 commits intomainfrom
escape-interrupts-thread-from-conversation

Conversation

@rtfeldman
Copy link
Contributor

@rtfeldman rtfeldman commented Jan 9, 2026

When focus is on the conversation part of the agent panel (not the message editor), pressing Escape now interrupts the running thread. Previously, Escape only worked when the message editor had focus.

Release Notes:

  • Pressing Esc when the agent panel is focused now interrupts the running thread even if the text input box is not specifically focused.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 9, 2026
- Add menu::Cancel action handler in AcpThreadView to call cancel_generation
- Add tests for escape interrupting thread from both conversation and editor focus
- Fix test-support feature propagation through rules_library -> title_bar -> recent_projects
@rtfeldman rtfeldman force-pushed the escape-interrupts-thread-from-conversation branch from 2db0613 to 09c2c58 Compare January 9, 2026 01:11
@rtfeldman rtfeldman marked this pull request as ready for review January 9, 2026 02:07
- Add cancel_count tracking to StubAgentConnection to verify server-side cancellation
- Extract setup_generating_thread helper to reduce test code duplication
- Add test_escape_when_idle_is_noop to verify escape doesn't cause issues when not generating
- Both escape tests now verify the cancel was actually sent to the connection
- Renamed tests to be clearer about what they're testing
Simplify the test changes by removing the server-side verification.
The tests now just verify the UI behavior (thread status changing to Idle)
which is sufficient for this feature.
@rtfeldman rtfeldman merged commit b4d69db into main Jan 9, 2026
23 checks passed
@rtfeldman rtfeldman deleted the escape-interrupts-thread-from-conversation branch January 9, 2026 03:39
@rtfeldman rtfeldman added the area:ai Improvement related to Agent Panel, Edit Prediction, Copilot, or other AI features label Jan 9, 2026
@JulienLecoq
Copy link

Is there a way to go back to the previous system via the settings? I find it very annoying in vim mode that pressing escape cancel the agent work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ai Improvement related to Agent Panel, Edit Prediction, Copilot, or other AI features cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants