code_analyzer

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCodeAnalyzer

func NewCodeAnalyzer(cwd string) contracts.ICodeAnalyzer

NewCodeAnalyzer initializes a new CodeAnalyzer.

Types

type CodeAnalyzer

type CodeAnalyzer struct {
	Cwd string
}

CodeAnalyzer handles the analysis of project files.

func (*CodeAnalyzer) ApplyChanges

func (analyzer *CodeAnalyzer) ApplyChanges(relativePath, diff string) error

func (*CodeAnalyzer) ExtractCodeChanges added in v1.1.0

func (analyzer *CodeAnalyzer) ExtractCodeChanges(diff string) []models.CodeChange

func (*CodeAnalyzer) GeneratePrompt added in v1.3.5

func (analyzer *CodeAnalyzer) GeneratePrompt(codes []string, history []string, userInput string, requestedContext string) (string, string)

func (*CodeAnalyzer) GetProjectFiles

func (analyzer *CodeAnalyzer) GetProjectFiles(rootDir string) (*models.FullContextData, error)

func (*CodeAnalyzer) ProcessFile

func (analyzer *CodeAnalyzer) ProcessFile(filePath string, sourceCode []byte) []string

ProcessFile processes a single file using Tree-sitter for syntax analysis (for .cs files).

func (*CodeAnalyzer) TryGetInCompletedCodeBlocK added in v1.3.5

func (analyzer *CodeAnalyzer) TryGetInCompletedCodeBlocK(relativePaths string) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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