extract_context

Function extract_context 

Source
pub fn extract_context(
    command: &str,
    output: Option<&str>,
    cwd: &Path,
) -> GitContextUpdate
Expand description

Extract all context from a Bash tool event.

Combines command parsing and output parsing to extract:

  • GitHub repo, issue, and PR references
  • Worktree path and branch
  • Diff statistics (additions/deletions)

ยงArguments

  • command - The Bash command (from event payload)
  • output - The tool output (from event tool_output), if any
  • cwd - Current working directory for resolving relative paths