Documentation
¶
Overview ¶
Package enrichment provides task handlers for enrichment operations.
Index ¶
- Constants
- func TruncateDiff(diff string, maxLength int) string
- type APIDocExtractor
- type APIDocs
- type ArchitectureDiscoverer
- type ArchitectureDiscovery
- type CommitDescription
- type Cookbook
- type CookbookContextGatherer
- type CreateSummary
- type DatabaseSchema
- type ExampleDiscoverer
- type ExampleSummary
- type ExtractExamples
- type SchemaDiscoverer
- type Wiki
- type WikiContextGatherer
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 CreateSummary ¶
type CreateSummary struct {
// contains filtered or unexported fields
}
CreateSummary handles the CREATE_SUMMARY_ENRICHMENT_FOR_COMMIT operation.
func NewCreateSummary ¶
func NewCreateSummary( enrichCtx handler.EnrichmentContext, ) (*CreateSummary, error)
NewCreateSummary creates a new CreateSummary handler.
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 ExampleDiscoverer ¶
type ExampleDiscoverer interface {
IsExampleCandidate(path string) bool
IsDocumentationFile(path string) bool
}
ExampleDiscoverer determines if files are example candidates.
type ExampleSummary ¶
type ExampleSummary struct {
// contains filtered or unexported fields
}
ExampleSummary handles the CREATE_EXAMPLE_SUMMARY_FOR_COMMIT operation.
func NewExampleSummary ¶
func NewExampleSummary( enrichCtx handler.EnrichmentContext, ) (*ExampleSummary, error)
NewExampleSummary creates a new ExampleSummary handler.
type ExtractExamples ¶
type ExtractExamples struct {
// contains filtered or unexported fields
}
ExtractExamples handles the EXTRACT_EXAMPLES_FOR_COMMIT operation.
func NewExtractExamples ¶
func NewExtractExamples( repoStore repository.RepositoryStore, commitStore repository.CommitStore, adapter infraGit.Adapter, enrichCtx handler.EnrichmentContext, discoverer ExampleDiscoverer, ) *ExtractExamples
NewExtractExamples creates a new ExtractExamples 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, commitStore repository.CommitStore, 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.