Skip to content

Conversation

jbnunn
Copy link

@jbnunn jbnunn commented Sep 25, 2025

Issue #, if available:
None

Description of changes:
Added support for exit and quit commands (without the slash) to terminate the chat session. Keeps feature parity with other agents. Saves expensive call to model when users intends to quit the session but doesn't use the slash.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

skip_printing_tools: false,
})
} else if matches!(input.to_lowercase().as_str(), "exit" | "quit") {
return Ok(ChatState::Exit);
Copy link
Contributor

@kensave kensave Oct 2, 2025

Choose a reason for hiding this comment

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

I have second thoughts about this one as user could legitimately want to use this as a prompt.

Copy link
Author

Choose a reason for hiding this comment

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

That's a possibility. It feels like "exit" though would be a stronger indicator than "quit" that the user wanted to end the session. I can update the PR to only look for "exit" if you agree.

For "quit", could we look at data to verify? For example, what's the percentage of chats that have "quit" followed by "/quit" or "/exit"?

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