[PR #759] [MERGED] Add debounce before exit when using non-leader exit command #9699

Closed
opened 2026-02-16 18:14:01 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/759
Author: @yihuikhuu
Created: 7/8/2025
Status: Merged
Merged: 7/8/2025
Merged by: @adamdotdevin

Base: devHead: debounce-exit


📝 Commits (1)

  • f04948c feat(tui): add debounce before exit when using non-leader exit command

📊 Changes

2 files changed (+53 additions, -3 deletions)

View changed files

📝 packages/tui/internal/components/chat/editor.go (+14 -1)
📝 packages/tui/internal/tui/tui.go (+39 -2)

📄 Description

Currently pressing Ctrl-C immediately exits. This updates opencode so that a second Ctrl-C must be pressed within one second to actually exit. This is similar to existing interrupt behaviour.

Rationale - There have been a few instances where I have accidentally exited the app when trying to do some other action - e.g. triggering the default leader (Ctrl-X). This is intended to help avoid those cases.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/759 **Author:** [@yihuikhuu](https://github.com/yihuikhuu) **Created:** 7/8/2025 **Status:** ✅ Merged **Merged:** 7/8/2025 **Merged by:** [@adamdotdevin](https://github.com/adamdotdevin) **Base:** `dev` ← **Head:** `debounce-exit` --- ### 📝 Commits (1) - [`f04948c`](https://github.com/anomalyco/opencode/commit/f04948ce843e255243604c06179b0c89435bab88) feat(tui): add debounce before exit when using non-leader exit command ### 📊 Changes **2 files changed** (+53 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/tui/internal/components/chat/editor.go` (+14 -1) 📝 `packages/tui/internal/tui/tui.go` (+39 -2) </details> ### 📄 Description Currently pressing Ctrl-C immediately exits. This updates opencode so that a second Ctrl-C must be pressed within one second to actually exit. This is similar to existing interrupt behaviour. Rationale - There have been a few instances where I have accidentally exited the app when trying to do some other action - e.g. triggering the default leader (Ctrl-X). This is intended to help avoid those cases. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:14:01 -05:00
yindo closed this issue 2026-02-16 18:14:01 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9699