Documentation
¶
Overview ¶
Package claudecode implements ai.Drafter with the local Claude Code CLI in headless mode (`claude -p`). We compute all context ourselves and pipe it on stdin; tools are disabled so the model cannot touch the repository.
Index ¶
Constants ¶
const NestedSessionEnv = "CLAUDECODE"
NestedSessionEnv is set by Claude Code inside a session.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter runs claude.
func (*Adapter) DraftCommit ¶
DraftCommit implements ai.Drafter.
type Config ¶
type Config struct {
// Command is the Claude Code binary (git config stack.ai.command).
Command string
// Model is passed to --model (git config stack.ai.model).
Model string
// ExtraPrompt is appended to every instruction.
ExtraPrompt string
// Timeout bounds one call.
Timeout time.Duration
}
Config selects the binary, model and limits.