[feat] add /status slash command (#1873)

- Added a `/status` command, which will be useful when we update the
home screen to print less status.
- Moved `create_config_summary_entries` to common since it's used in a
few places.
- Noticed we inconsistently had periods in slash command descriptions
and just removed them everywhere.
- Noticed the diff description was overflowing so made it shorter.
This commit is contained in:
ae
2025-08-05 23:57:52 -07:00
committed by GitHub
parent 7b3ab968a0
commit d642b07fcc
9 changed files with 105 additions and 56 deletions

View File

@@ -15,6 +15,7 @@ pub enum SlashCommand {
New,
Compact,
Diff,
Status,
Quit,
#[cfg(debug_assertions)]
TestApproval,
@@ -24,12 +25,11 @@ impl SlashCommand {
/// User-visible description shown in the popup.
pub fn description(self) -> &'static str {
match self {
SlashCommand::New => "Start a new chat.",
SlashCommand::Compact => "Compact the chat history.",
SlashCommand::Quit => "Exit the application.",
SlashCommand::Diff => {
"Show git diff of the working directory (including untracked files)"
}
SlashCommand::New => "Start a new chat",
SlashCommand::Compact => "Compact the chat history",
SlashCommand::Quit => "Exit the application",
SlashCommand::Diff => "Show git diff (including untracked files)",
SlashCommand::Status => "Show current session configuration and token usage",
#[cfg(debug_assertions)]
SlashCommand::TestApproval => "Test approval request",
}