enrichment

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: Apache-2.0 Imports: 13 Imported by: 1 module, 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

Overview

Package enrichment provides task handlers for enrichment operations.

Index

Constants

View Source
const MaxDiffLength = 100_000

MaxDiffLength is the maximum characters for a commit diff (~25k tokens).

Variables

This section is empty.

Functions

func TruncateDiff

func TruncateDiff(diff string, maxLength int) string

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.

func (*APIDocs) Execute

func (h *APIDocs) Execute(ctx context.Context, payload map[string]any) error

Execute processes the CREATE_PUBLIC_API_DOCS_FOR_COMMIT task.

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.

func (*ArchitectureDiscovery) Execute

func (h *ArchitectureDiscovery) Execute(ctx context.Context, payload map[string]any) error

Execute processes the CREATE_ARCHITECTURE_ENRICHMENT_FOR_COMMIT task.

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.

func (*CommitDescription) Execute

func (h *CommitDescription) Execute(ctx context.Context, payload map[string]any) error

Execute processes the CREATE_COMMIT_DESCRIPTION_FOR_COMMIT task.

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.

func (*Cookbook) Execute

func (h *Cookbook) Execute(ctx context.Context, payload map[string]any) error

Execute processes the CREATE_COOKBOOK_FOR_COMMIT task.

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.

func (*DatabaseSchema) Execute

func (h *DatabaseSchema) Execute(ctx context.Context, payload map[string]any) error

Execute processes the CREATE_DATABASE_SCHEMA_FOR_COMMIT task.

type SchemaDiscoverer

type SchemaDiscoverer interface {
	Discover(ctx context.Context, repoPath string) (string, error)
}

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.

func (*Wiki) Execute

func (h *Wiki) Execute(ctx context.Context, payload map[string]any) error

Execute processes the GENERATE_WIKI_FOR_COMMIT task.

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.

Jump to

Keyboard shortcuts

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