Skip to content

feat(tui): configurable interrupt confirmation for Esc key - #3899

Open
pkimtani wants to merge 1 commit into
docker:mainfrom
pkimtani:feat/interrupt-confirmation
Open

feat(tui): configurable interrupt confirmation for Esc key#3899
pkimtani wants to merge 1 commit into
docker:mainfrom
pkimtani:feat/interrupt-confirmation

Conversation

@pkimtani

@pkimtani pkimtani commented Aug 3, 2026

Copy link
Copy Markdown

Disclaimer: This is the first time I am touching a Go codebase with zero prior knowledge of Go. I have relied heavily on the dogfooding agent mentioned in the Contributing guidelines and ran it against my self-hosted Laguna S 2.1 118B. All feedbacks, good or bad, are welcome

Add a configurable interrupt confirmation feature that allows users to choose how Esc interrupts a running stream:

  • "always" (default): Shows a confirmation dialog
  • "double-tap": Requires pressing Esc twice within 1 second
  • "none": Single Esc interrupts immediately

The setting is configurable via YAML config file and the /settings dialog in the Behavior tab.

Changes:

  • Add InterruptConfirmation field to Settings struct and getter method
  • Add InterruptMode type with constants and ParseInterruptMode function
  • Create InterruptConfirmationDialog with Yes/No/Esc key bindings
  • Add interrupt mode handling to chat page with handleInterrupt method
  • Wire up interrupt mode from settings to chat pages
  • Add interrupt confirmation row to Behavior tab in settings dialog
  • Update test mocks for interface compliance

Add a configurable interrupt confirmation feature that allows users to
choose how Esc interrupts a running stream:

- "always" (default): Shows a confirmation dialog
- "double-tap": Requires pressing Esc twice within 1 second
- "none": Single Esc interrupts immediately

The setting is configurable via YAML config file and the /settings dialog
in the Behavior tab.

Changes:
- Add InterruptConfirmation field to Settings struct and getter method
- Add InterruptMode type with constants and ParseInterruptMode function
- Create InterruptConfirmationDialog with Yes/No/Esc key bindings
- Add interrupt mode handling to chat page with handleInterrupt method
- Wire up interrupt mode from settings to chat pages
- Add interrupt confirmation row to Behavior tab in settings dialog
- Update test mocks for interface compliance
@pkimtani
pkimtani marked this pull request as ready for review August 3, 2026 15:33
@pkimtani
pkimtani requested a review from a team as a code owner August 3, 2026 15:33
@aheritier aheritier added area/config For configuration parsing, YAML, environment variables area/tui For features/issues/fixes related to the TUI kind/feat PR adds a new feature (maps to feat:). Use on PRs only. labels Aug 3, 2026

@rumpl rumpl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Love the feature

@pkimtani

pkimtani commented Aug 4, 2026

Copy link
Copy Markdown
Author

Thanks for the review @rumpl !

Could you help me re-trigger the failing job? I do not have the permissions to trigger jobs from here.

cc @Sayt-0

@Sayt-0
Sayt-0 enabled auto-merge August 4, 2026 09:21
@Sayt-0

Sayt-0 commented Aug 4, 2026

Copy link
Copy Markdown
Member

Can you sign your commits @pkimtani ?

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

Labels

area/config For configuration parsing, YAML, environment variables area/tui For features/issues/fixes related to the TUI kind/feat PR adds a new feature (maps to feat:). Use on PRs only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants