mirror of
https://github.com/instructkr/claude-code.git
synced 2026-04-03 17:18:49 +03:00
feat: git slash commands (/branch, /commit, /commit-push-pr, /worktree)
This commit is contained in:
@@ -162,6 +162,10 @@ impl CliApp {
|
||||
writeln!(out, "Unknown slash command: /{name}")?;
|
||||
Ok(CommandResult::Continue)
|
||||
}
|
||||
_ => {
|
||||
writeln!(out, "Slash command unavailable in this mode")?;
|
||||
Ok(CommandResult::Continue)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,7 +176,7 @@ impl CliApp {
|
||||
SlashCommand::Help => "/help",
|
||||
SlashCommand::Status => "/status",
|
||||
SlashCommand::Compact => "/compact",
|
||||
SlashCommand::Unknown(_) => continue,
|
||||
_ => continue,
|
||||
};
|
||||
writeln!(out, " {name:<9} {}", handler.summary)?;
|
||||
}
|
||||
|
||||
@@ -939,6 +939,9 @@ fn run_resume_command(
|
||||
})
|
||||
}
|
||||
SlashCommand::Bughunter { .. }
|
||||
| SlashCommand::Branch { .. }
|
||||
| SlashCommand::Worktree { .. }
|
||||
| SlashCommand::CommitPushPr { .. }
|
||||
| SlashCommand::Commit
|
||||
| SlashCommand::Pr { .. }
|
||||
| SlashCommand::Issue { .. }
|
||||
@@ -1242,6 +1245,18 @@ impl LiveCli {
|
||||
Self::print_skills(args.as_deref())?;
|
||||
false
|
||||
}
|
||||
SlashCommand::Branch { .. } => {
|
||||
eprintln!("git branch commands not yet wired to REPL");
|
||||
false
|
||||
}
|
||||
SlashCommand::Worktree { .. } => {
|
||||
eprintln!("git worktree commands not yet wired to REPL");
|
||||
false
|
||||
}
|
||||
SlashCommand::CommitPushPr { .. } => {
|
||||
eprintln!("commit-push-pr not yet wired to REPL");
|
||||
false
|
||||
}
|
||||
SlashCommand::Unknown(name) => {
|
||||
eprintln!("unknown slash command: /{name}");
|
||||
false
|
||||
|
||||
Reference in New Issue
Block a user