mirror of
https://github.com/ultraworkers/claw-code-parity.git
synced 2026-09-28 04:21:57 +02:00
feat(cli): add claw status command
Extend the direct and slash status surfaces with git-aware context so workspace checks include branch freshness against origin/main, active worktrees, and the three most recent commits. Constraint: Keep the implementation scoped to rust/crates/commands/src/lib.rs and rust/crates/rusty-claude-cli/src/main.rs Rejected: A separate dedicated git-status subcommand struct layer | unnecessary complexity for a single report surface Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep claw status read-only; do not fetch or mutate git state when computing freshness Tested: cargo build --workspace; cargo test --workspace; ./target/debug/claw status Not-tested: Repositories without git installed
This commit is contained in:
@@ -60,7 +60,7 @@ const SLASH_COMMAND_SPECS: &[SlashCommandSpec] = &[
|
||||
SlashCommandSpec {
|
||||
name: "status",
|
||||
aliases: &[],
|
||||
summary: "Show current session status",
|
||||
summary: "Show current session status with branch freshness, worktrees, and recent commits",
|
||||
argument_hint: None,
|
||||
resume_supported: true,
|
||||
},
|
||||
@@ -3713,6 +3713,16 @@ mod tests {
|
||||
assert!(help.contains("Resume Supported with --resume SESSION.jsonl"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn renders_status_help_with_repo_snapshot_summary() {
|
||||
let help = render_slash_command_help_detail("status").expect("detail help should exist");
|
||||
assert!(help.contains("/status"));
|
||||
assert!(help.contains(
|
||||
"Summary Show current session status with branch freshness, worktrees, and recent commits"
|
||||
));
|
||||
assert!(help.contains("Resume Supported with --resume SESSION.jsonl"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn validate_slash_command_input_rejects_extra_single_value_arguments() {
|
||||
// given
|
||||
|
||||
Reference in New Issue
Block a user