Skip to content

Handle Ctrl+C quit when idle#1402

Merged
gpeal merged 3 commits into
mainfrom
gpeal/update-ctrl+c-behavior-in-codex-rs
Jun 27, 2025
Merged

Handle Ctrl+C quit when idle#1402
gpeal merged 3 commits into
mainfrom
gpeal/update-ctrl+c-behavior-in-codex-rs

Conversation

@gpeal

@gpeal gpeal commented Jun 27, 2025

Copy link
Copy Markdown
Collaborator

Summary

  • show Ctrl+C to quit hint when pressing Ctrl+C with no active task
  • exiting with Ctrl+C if the hint is already visible
  • clear the hint when tasks begin or other keys are pressed
CleanShot.2025-06-27.at.02.44.59.mp4

https://chatgpt.com/s/cd_685ec8875a308191beaa95886dc1379e

Fixes #1245

@gpeal gpeal added the codex Label used by connector to tag PRs that have been reviewed by Codex label Jun 27, 2025 — with ChatGPT Codex Connector
@gpeal gpeal requested a review from bolinfest June 27, 2025 07:10

@bolinfest bolinfest left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice job, Codex!

self.request_redraw();
}

pub(crate) fn on_ctrl_c(&mut self) -> bool {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe a docstring to explain what the return value represents?

@gpeal gpeal merged commit 2e293ce into main Jun 27, 2025
11 checks passed
@gpeal gpeal deleted the gpeal/update-ctrl+c-behavior-in-codex-rs branch June 27, 2025 17:37
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

codex Label used by connector to tag PRs that have been reviewed by Codex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hitting Ctrl+C twice should exit the TUI

2 participants