Documentation
¶
Overview ¶
Package codex provides helpers for OpenAI Codex hook commands.
Index ¶
Constants ¶
View Source
const ( // DefaultAssistantName is the product name used in generated commit trailers. DefaultAssistantName = "OpenAI Codex" // DefaultUnknownModel is used when Codex hook input omits the active model. DefaultUnknownModel = "unknown-model" )
Variables ¶
This section is empty.
Functions ¶
func GeneratedWithContext ¶
GeneratedWithContext returns developer context that asks Codex to include detailed commit messages and a model-specific Generated-with trailer.
func GeneratedWithTrailer ¶
GeneratedWithTrailer returns the commit trailer for the given model.
Types ¶
type HookInput ¶
type HookInput struct {
HookEventName string `json:"hook_event_name,omitempty"`
Model string `json:"model,omitempty"`
}
HookInput is the subset of Codex hook input used by the generated-with hook.
type HookOutput ¶
type HookOutput struct {
HookSpecificOutput HookSpecificOutput `json:"hookSpecificOutput"`
}
HookOutput is the Codex hook output shape for adding developer context.
func NewGeneratedWithOutput ¶
func NewGeneratedWithOutput(assistantName, model string) HookOutput
NewGeneratedWithOutput builds the SessionStart hook output for the model.
type HookSpecificOutput ¶
type HookSpecificOutput struct {
HookEventName string `json:"hookEventName"`
AdditionalContext string `json:"additionalContext"`
}
HookSpecificOutput is the Codex hook-specific output payload.
Click to show internal directories.
Click to hide internal directories.