Skip to content

Feat cancel during process#43

Merged
madebyaris merged 3 commits into
devfrom
feat-cancel-during-process
Mar 29, 2026
Merged

Feat cancel during process#43
madebyaris merged 3 commits into
devfrom
feat-cancel-during-process

Conversation

@madebyaris

@madebyaris madebyaris commented Mar 29, 2026

Copy link
Copy Markdown
Owner

Summary by cubic

Adds in-TUI cancellation for an active run. Press Esc to cancel while the agent is Thinking, Streaming, or running tools; exit is now on Ctrl+Q.

  • New Features

    • Esc cancels the current turn during Thinking/Streaming/ToolRunning; Ctrl+C also cancels.
    • Status bar shows “Esc cancel” when a run can be cancelled.
    • REPL passes a cancel handle to the TUI; agent streaming checks it and stops promptly.
    • On cancel, the UI logs “Cancelling current run…” and returns to Idle.
  • Migration

    • Esc no longer exits; use Ctrl+Q to quit.
    • Update any docs or shortcuts that referenced Esc to exit.

Written for commit 97d0e59. Summary will update on new commits.

- Removed the Esc key functionality that allowed users to exit the application.
- Updated the input hints to streamline user instructions by removing the Esc exit option.
- Revised input hints to include the new Ctrl+Q exit command for improved user guidance.
- Implemented Ctrl+Q key binding to allow users to exit the application, enhancing usability.
…y state handling

- Added cancel functionality to allow users to cancel ongoing operations using the Esc key when in specific busy states (Thinking, Streaming, ToolRunning).
- Updated the TuiSessionState to handle the transition to Idle state when a run is cancelled.
- Enhanced the run_blocking function to display a cancel hint in the UI, improving user experience during long-running tasks.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 5 files

@madebyaris

Copy link
Copy Markdown
Owner Author

tested, work great #40

Sometime it take like 1-3 second delay, but still "okaish"

@madebyaris madebyaris merged commit 51fe9ca into dev Mar 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant