feat: git slash commands (/branch, /commit, /commit-push-pr, /worktree)

This commit is contained in:
Sisyphus
2026-04-01 21:39:42 +09:00
parent 9113c87594
commit e173c4ec74
4 changed files with 729 additions and 5 deletions

View File

@@ -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)?;
}

View File

@@ -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