generation

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const CollectContextStep = "Collecting information about current changes..."

Variables

View Source
var Instructions string

Functions

func BuildPrompt

func BuildPrompt(params Request) string

func ResponseSchema

func ResponseSchema(params Request) map[string]any

Types

type Generator

type Generator interface {
	Steps() []string
	Generate(context.Context, Request, Reporter) (Result, error)
}

type Message

type Message struct {
	Subject string `json:"subject"`
	Body    string `json:"body"`
}

func (Message) Format

func (m Message) Format() string

type Reporter

type Reporter func(Update)

func (Reporter) Emit

func (r Reporter) Emit(update Update)

type Request

type Request struct {
	SubjectMin  int
	SubjectMax  int
	Body        bool
	ContextJSON string
}

type Result

type Result struct {
	Messages []Message
	Warnings []error
}

type StepStatus

type StepStatus string
const (
	StepPending     StepStatus = "pending"
	StepRunning     StepStatus = "running"
	StepDone        StepStatus = "done"
	StepFailed      StepStatus = "failed"
	StepWarning     StepStatus = "warning"
	StepSkipped     StepStatus = "skipped"
	StepInterrupted StepStatus = "interrupted"
)

type Update

type Update struct {
	Index  int
	Status StepStatus
	Detail string
	Err    error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL