Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Log ¶
Log returns a token-budgeted git log for the given path (or the whole repo if path is empty). Output is plain text suitable for agent consumption.
func RegisterInterceptor ¶ added in v0.20.3
RegisterInterceptor adds blame context to read tool results. When the model reads a file, a compact blame summary is appended, showing which commits last touched the code — giving the model "why was this written?" context before it edits.
Types ¶
type BlameEntry ¶
type BlameEntry struct {
SHA string `json:"sha"`
Author string `json:"author"`
Date string `json:"date"`
Summary string `json:"summary"`
Lines string `json:"lines"` // e.g. "42-58" or "42"
}
BlameEntry represents a unique commit that touches a blamed line range.
type ChangeSummary ¶
type ChangeSummary struct {
SHA string `json:"sha"`
Author string `json:"author"`
Subject string `json:"subject"`
Files []FileChange `json:"files"`
}
ChangeSummary represents a single commit with its file-level change stats.
func Changes ¶
func Changes(cwd, since, path string) ([]ChangeSummary, error)
Changes returns commits reachable since the given duration string (e.g. "7d", "24h") optionally filtered to a path. If since is empty it defaults to "7d".
type CoChangeEntry ¶
CoChangeEntry holds a file and the number of commits in which it co-changed with the target file.
type FileChange ¶
type FileChange struct {
File string `json:"file"`
Added int `json:"added"`
Deleted int `json:"deleted"`
}
FileChange holds the per-file add/delete counts for a commit.
type OwnerEntry ¶
type OwnerEntry struct {
Author string `json:"author"`
Commits int `json:"commits"`
Percent float64 `json:"percent"`
}
OwnerEntry holds commit authorship statistics for a single author.