[PR #1730] [CLOSED] Add /exit as alias for /quit #10037

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

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/1730
Author: @rmoriz
Created: 8/8/2025
Status: Closed

Base: devHead: add-exit-alias-for-quit


📝 Commits (1)

  • 1a853e1 feat(tui): add slash command support and fix /quit command execution

📊 Changes

4 files changed (+562 additions, -0 deletions)

View changed files

📝 packages/tui/internal/components/chat/editor.go (+16 -0)
📝 packages/tui/internal/components/chat/editor_test.go (+298 -0)
📝 packages/tui/internal/tui/tui.go (+20 -0)
packages/tui/internal/tui/tui_test.go (+228 -0)

📄 Description

Summary

  • Add comprehensive slash command support to TUI editor input
  • Fix critical issue where /quit command wasn't working due to completion dialog interference
  • Implement exact command matching logic to bypass completion dialog for direct commands

Problem Fixed

The /quit command wasn't working because typing / triggered a completion dialog that intercepted the Enter key before the command could be executed directly. Users were unable to quit the application using /quit, which is a critical usability issue.

Solution

  • Enhanced editor: Added slash command parsing and execution logic to handle commands like /quit, /exit, /help
  • Fixed completion dialog: Added exact command matching to bypass completion dialog when user types exact command triggers
  • Maintained compatibility: Partial commands still trigger completion dialog, preserving existing UX for command discovery

Test Coverage

  • Comprehensive tests for slash command parsing and execution
  • Tests for exact vs partial command matching behavior
  • Tests for completion dialog bypass logic
  • Tests for all quit command triggers (quit, exit, q)

🤖 Generated with opencode


🔄 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/1730 **Author:** [@rmoriz](https://github.com/rmoriz) **Created:** 8/8/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `add-exit-alias-for-quit` --- ### 📝 Commits (1) - [`1a853e1`](https://github.com/anomalyco/opencode/commit/1a853e14d84c22565031b109042c7e4f368c03ac) feat(tui): add slash command support and fix /quit command execution ### 📊 Changes **4 files changed** (+562 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/tui/internal/components/chat/editor.go` (+16 -0) 📝 `packages/tui/internal/components/chat/editor_test.go` (+298 -0) 📝 `packages/tui/internal/tui/tui.go` (+20 -0) ➕ `packages/tui/internal/tui/tui_test.go` (+228 -0) </details> ### 📄 Description ## Summary - Add comprehensive slash command support to TUI editor input - Fix critical issue where `/quit` command wasn't working due to completion dialog interference - Implement exact command matching logic to bypass completion dialog for direct commands ## Problem Fixed The `/quit` command wasn't working because typing `/` triggered a completion dialog that intercepted the Enter key before the command could be executed directly. Users were unable to quit the application using `/quit`, which is a critical usability issue. ## Solution - **Enhanced editor**: Added slash command parsing and execution logic to handle commands like `/quit`, `/exit`, `/help` - **Fixed completion dialog**: Added exact command matching to bypass completion dialog when user types exact command triggers - **Maintained compatibility**: Partial commands still trigger completion dialog, preserving existing UX for command discovery ## Test Coverage - Comprehensive tests for slash command parsing and execution - Tests for exact vs partial command matching behavior - Tests for completion dialog bypass logic - Tests for all quit command triggers (`quit`, `exit`, `q`) 🤖 Generated with [opencode](https://opencode.ai) --- <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:35 -05:00
yindo closed this issue 2026-02-16 18:14:35 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10037