-
Couldn't load subscription status.
- Fork 2.3k
Fix escape twice interrupt to properly kill operations #3283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
- Add AbortedSessions map to track aborted sessions - Ignore SSE events for aborted sessions to stop UI streaming - Mark last assistant message as completed on abort - Clear aborted flag when starting new operations to allow subsequent requests This fix ensures cancellation works properly.
|
@adolfousier this does change some other things, for example now I don't see:
Is the intention to change a bunch of visuals too? or just to make double esc happen faster? |
|
To clarify, the issue was not about faster or slower, the escape wasn't stopping all operations at all. I commented this issue here two weeks ago: #1418 (comment) No, the intent wasn't visual changes. The main intent was fix the 'esc' to stop all operations instantly, because it wasn't on my mac or my Ubuntu machines, it do works sometimes but most of the times it keeps streaming and won't stop till the end of stream. Which is very frustrating to the user as they are hopeless waiting the stream finish. That fix, do stop anything, any machine, any operation, immediately. If user 'esc' twice(fast or slow) its to stop operations no matter what, it does just that, as expected by the user. I did not noticed the 'The operation was aborted.' wasn't visible, |
I've the fix to restore the aborted message, shall I push it or how do you prefer to move on with this fix? It's a single, minimal fix to restore the abort message display but keeping the consistent cancellation.
Thank you |
|
sure go ahead and push it, there is something to what you are getting at with a delay in esc twice, and yours does seem faster |
Done, hope everything is fine and to keep contributing, thank you @rekram1-node |
|
ill take a look at it tmr for u |
- tui.go: ESC double-press with 1s timeout, consistent debounce behavior - textarea.go: cache reset for memory management during active typing - app.go: AbortedSessions tracking + enhanced Cancel method (already present)

fix: issue that wasn't allowing users to cancel immediately, allowing users to stop request instantly to give further instructions
This fix ensures cancellation works properly.