Documentation
¶
Overview ¶
Package enrichment provides task handlers for enrichment operations.
Index ¶
Constants ¶
const MaxDiffLength = 100_000
MaxDiffLength is the maximum characters for a commit diff (~25k tokens).
Variables ¶
This section is empty.
Functions ¶
func TruncateDiff ¶
TruncateDiff truncates a diff to a reasonable length for LLM processing.
Types ¶
type APIDocExtractor ¶
type APIDocExtractor interface {
Extract(ctx context.Context, files []repository.File, language string, includePrivate bool) ([]enrichment.Enrichment, error)
}
APIDocExtractor extracts API documentation from files.
type APIDocs ¶
type APIDocs struct {
// contains filtered or unexported fields
}
APIDocs handles the CREATE_PUBLIC_API_DOCS_FOR_COMMIT operation.
func NewAPIDocs ¶
func NewAPIDocs( fileStore repository.FileStore, enrichCtx handler.EnrichmentContext, extractor APIDocExtractor, ) *APIDocs
NewAPIDocs creates a new APIDocs handler.
type ArchitectureDiscoverer ¶
type ArchitectureDiscoverer interface {
Discover(ctx context.Context, repoPath string) (string, error)
}
ArchitectureDiscoverer discovers physical architecture from a repository.
type ArchitectureDiscovery ¶
type ArchitectureDiscovery struct {
// contains filtered or unexported fields
}
ArchitectureDiscovery handles the CREATE_ARCHITECTURE_ENRICHMENT_FOR_COMMIT operation.
func NewArchitectureDiscovery ¶
func NewArchitectureDiscovery( repoStore repository.RepositoryStore, enrichCtx handler.EnrichmentContext, discoverer ArchitectureDiscoverer, ) (*ArchitectureDiscovery, error)
NewArchitectureDiscovery creates a new ArchitectureDiscovery handler.
type CommitDescription ¶
type CommitDescription struct {
// contains filtered or unexported fields
}
CommitDescription handles the CREATE_COMMIT_DESCRIPTION_FOR_COMMIT operation.
func NewCommitDescription ¶
func NewCommitDescription( repoStore repository.RepositoryStore, enrichCtx handler.EnrichmentContext, adapter infraGit.Adapter, ) (*CommitDescription, error)
NewCommitDescription creates a new CommitDescription handler.
type Cookbook ¶
type Cookbook struct {
// contains filtered or unexported fields
}
Cookbook handles the CREATE_COOKBOOK_FOR_COMMIT operation.
func NewCookbook ¶
func NewCookbook( repoStore repository.RepositoryStore, fileStore repository.FileStore, enrichCtx handler.EnrichmentContext, contextGatherer CookbookContextGatherer, ) (*Cookbook, error)
NewCookbook creates a new Cookbook handler.
type CookbookContextGatherer ¶
type CookbookContextGatherer interface {
Gather(ctx context.Context, repoPath, language string) (string, error)
}
CookbookContextGatherer gathers context for cookbook generation.
type DatabaseSchema ¶
type DatabaseSchema struct {
// contains filtered or unexported fields
}
DatabaseSchema handles the CREATE_DATABASE_SCHEMA_FOR_COMMIT operation.
func NewDatabaseSchema ¶
func NewDatabaseSchema( repoStore repository.RepositoryStore, enrichCtx handler.EnrichmentContext, discoverer SchemaDiscoverer, ) (*DatabaseSchema, error)
NewDatabaseSchema creates a new DatabaseSchema handler.
type SchemaDiscoverer ¶
SchemaDiscoverer detects database schemas from a repository.
type Wiki ¶
type Wiki struct {
// contains filtered or unexported fields
}
Wiki handles the GENERATE_WIKI_FOR_COMMIT operation.
func NewWiki ¶
func NewWiki( repoStore repository.RepositoryStore, fileStore repository.FileStore, enrichCtx handler.EnrichmentContext, contextGatherer WikiContextGatherer, ) (*Wiki, error)
NewWiki creates a new Wiki handler.
type WikiContextGatherer ¶
type WikiContextGatherer interface {
Gather(ctx context.Context, repoPath string, files []repository.File, existingEnrichments []enrichment.Enrichment) (readme, fileTree, enrichments string, err error)
FileContent(repoPath, filePath string, maxLen int) string
}
WikiContextGatherer gathers context for wiki generation.