Documentation
¶
Overview ¶
Package git provides HTTP handlers and utilities for git operations and AI-assisted workflows.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrPathNotInRef = errors.New("path not found at ref")
ErrPathNotInRef indicates the requested path does not exist at the given ref (new file, deleted file, or invalid object name). Callers should surface this as empty content rather than a hard error.
Functions ¶
This section is empty.
Types ¶
type AIHandler ¶
type AIHandler struct {
// contains filtered or unexported fields
}
AIHandler registers the AI-backed git endpoints (commit-message, pr-description). Separated from Handler because these have a fundamentally different dependency profile: they need an AI bridge but no git subprocess execution beyond basic diff/log.
func NewAIHandler ¶
func NewAIHandler(workDir string, prompter api.UtilityPrompter) *AIHandler
NewAIHandler returns an AIHandler. The prompter must be non-nil.
func (*AIHandler) RegisterRoutes ¶
RegisterRoutes registers the AI-backed git endpoints.
type ErrorKind ¶
type ErrorKind string
ErrorKind is a machine-readable discriminator for git handler errors. Clients switch on the "error" field; the "detail" field carries variable context (e.g. branch name).
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler implements git HTTP endpoints (non-AI operations).
func NewHandler ¶
NewHandler returns a Handler scoped to workDir.
func (*Handler) RegisterRoutes ¶
RegisterRoutes installs the /api/git/* mux entries.