Skip to content

[exit-quit-alias] feat(tui): add "/exit" alias and support plain "exit"/"quit" to quit#200

Closed
just-every-code wants to merge 1 commit into
mainfrom
issue-113
Closed

[exit-quit-alias] feat(tui): add "/exit" alias and support plain "exit"/"quit" to quit#200
just-every-code wants to merge 1 commit into
mainfrom
issue-113

Conversation

@just-every-code

Copy link
Copy Markdown

Summary

  • Add "/exit" as an alias for the existing "/quit" slash command.
  • Treat plain input of "exit" or "quit" (without a leading slash, case-insensitive) as a graceful exit request instead of sending it to the LLM.

Changes

  • codex-rs/tui/src/slash_command.rs: add a strum alias so "/exit" parses to SlashCommand::Quit.
  • codex-rs/tui/src/chatwidget.rs: pre-process submitted text; if the trimmed, non-slash input equals "exit" or "quit", send AppEvent::ExitRequest and return.

Rationale

This matches common terminal muscle memory and expectations (typing "exit" or "quit" to leave) and aligns with other tools that accept both "/quit" and "/exit". It also prevents these terms from being sent to the LLM as regular prompts.

Validation

  • Built locally with ./build-fast.sh – successful, no warnings or errors.
  • Manual reasoning check:
    • Typing "/exit" now quits (parses to Quit).
    • Typing "exit" or "quit" (no slash) quits via AppEvent::ExitRequest.
    • Other messages remain unaffected; unknown non-slash words are still sent to the model.

Notes

  • Kept diffs minimal and constrained to TUI input and slash command parsing code.

Auto-generated for issue #113 by a workflow.
Author: @github-actions[bot]

@github-actions

github-actions Bot commented Sep 18, 2025

Copy link
Copy Markdown

@just-every-code
just-every-code force-pushed the issue-113 branch 2 times, most recently from 89b4941 to ef614b0 Compare September 18, 2025 18:04
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.

2 participants