Versions in this module Expand all Collapse all v0 v0.3.0 May 26, 2026 v0.2.1 May 26, 2026 Changes in this version + func ApplyFix(action CodeAction, content string) (string, error) + func DescribeControlFlow(funcBody string) string + func DetectSideEffects(funcBody string) []string + func FormatContext(ctx *CodeContext) string + func FormatExplanation(exp *CodeExplanation) string + func FormatLenses(file string, lenses []CodeLens) string + func FormatSuggestions(actions []CodeAction, maxDisplay int) string + func InferPurpose(name string, params, returns []string) string + type ActionDetector struct + Rules []ActionRule + func NewActionDetector() *ActionDetector + func (ad *ActionDetector) Detect(path, content string) []CodeAction + func (ad *ActionDetector) DetectForDiff(diff string) []CodeAction + type ActionRule struct + Antipattern *regexp.Regexp + Category string + FixTemplate string + ID string + Language string + Message string + Name string + Pattern *regexp.Regexp + Priority int + type CodeAction struct + Category string + Confidence float64 + Description string + File string + Fix string + ID string + Line int + Priority int + Title string + type CodeContext struct + Query string + Snippets []CodeSnippet + TotalTokens int + type CodeExplainer struct + func NewCodeExplainer() *CodeExplainer + func (ce *CodeExplainer) ExplainFile(path, content string) (*CodeExplanation, error) + func (ce *CodeExplainer) ExplainFunction(file, content, funcName string) (*CodeExplanation, error) + func (ce *CodeExplainer) ExplainType(file, content, typeName string) (*CodeExplanation, error) + type CodeExplanation struct + Complexity string + Dependencies []string + File string + Sections []ExplanationSection + Summary string + Symbol string + UsedBy []string + type CodeLens struct + Category string + Command string + File string + Label string + Line int + Tooltip string + func FilterByCategory(lenses []CodeLens, category string) []CodeLens + func GenerateAgeLens(file, content string) []CodeLens + func GenerateComplexityLens(file, content string) []CodeLens + func GenerateCoverageLens(file, content string) []CodeLens + func GenerateReferenceLens(file, content string) []CodeLens + func GenerateTestLens(file, content string) []CodeLens + type CodeLensProvider struct + Providers map[string]LensGenerator + func NewCodeLensProvider() *CodeLensProvider + func (p *CodeLensProvider) Generate(file, content string) []CodeLens + func (p *CodeLensProvider) Register(name string, generator LensGenerator) + type CodeSnippet struct + Content string + EndLine int + File string + Relevance float64 + StartLine int + Symbol string + Type string + type ContextExtractor struct + MaxTokens int + ProjectDir string + func NewContextExtractor(projectDir string, maxTokens int) *ContextExtractor + func (ce *ContextExtractor) ExtractForTask(task string) (*CodeContext, error) + func (ce *ContextExtractor) ExtractFunction(file, funcName string) (*CodeSnippet, error) + func (ce *ContextExtractor) ExtractImports(file string) (*CodeSnippet, error) + func (ce *ContextExtractor) ExtractSurrounding(file string, line, contextLines int) (*CodeSnippet, error) + func (ce *ContextExtractor) ExtractType(file, typeName string) (*CodeSnippet, error) + func (ce *ContextExtractor) FindRelevantSymbols(query string, limit int) []CodeSnippet + func (ce *ContextExtractor) RankSnippets(snippets []CodeSnippet, query string) []CodeSnippet + type ExplanationSection struct + CodeRef string + Content string + Title string + type LensGenerator func(file, content string) []CodeLens