Documentation
¶
Overview ¶
Package batch provides batch analysis capabilities for analyzing multiple code snippets
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchAnalyzer ¶
type BatchAnalyzer struct {
// contains filtered or unexported fields
}
BatchAnalyzer performs batch analysis of code snippets
func NewBatchAnalyzer ¶
func NewBatchAnalyzer(codebasePath string) *BatchAnalyzer
NewBatchAnalyzer creates a new batch analyzer
func (*BatchAnalyzer) AnalyzeBatch ¶
func (a *BatchAnalyzer) AnalyzeBatch(input *BatchInput) (*BatchOutput, error)
AnalyzeBatch analyzes all snippets in the batch input
func (*BatchAnalyzer) Initialize ¶
func (a *BatchAnalyzer) Initialize() error
Initialize parses the codebase and builds symbol tables
type BatchInput ¶
type BatchInput struct {
CodebasePath string `json:"codebase_path"`
Snippets []SnippetInput `json:"snippets"`
}
BatchInput represents the input for batch analysis
func ParseBatchInput ¶
func ParseBatchInput(data []byte) (*BatchInput, error)
ParseBatchInput parses JSON input into BatchInput
type BatchOutput ¶
type BatchOutput struct {
CodebasePath string `json:"codebase_path"`
AnalyzedAt string `json:"analyzed_at"`
TotalSnippets int `json:"total_snippets"`
WithUserInput int `json:"with_user_input"`
TotalExprs int `json:"total_expressions"`
TracedExprs int `json:"traced_expressions"`
InputExprs int `json:"input_expressions"`
Results []SnippetResult `json:"results"`
}
BatchOutput represents the output of batch analysis
type ExpressionResult ¶
type ExpressionResult struct {
Expression string `json:"expression"`
HasUserInput bool `json:"has_user_input"`
InputTypes []string `json:"input_types,omitempty"`
TraceSteps []string `json:"trace_steps,omitempty"`
TraceError string `json:"trace_error,omitempty"`
}
ExpressionResult represents the analysis result for a single expression
type SnippetInput ¶
type SnippetInput struct {
ID string `json:"id"`
Filename string `json:"filename"`
Context []string `json:"context"`
}
SnippetInput represents a code snippet to analyze
type SnippetResult ¶
type SnippetResult struct {
ID string `json:"id"`
Filename string `json:"filename"`
Expressions []ExpressionResult `json:"expressions"`
HasAnyInput bool `json:"has_any_input"`
InputSummary []string `json:"input_summary"`
}
SnippetResult represents the analysis result for a single snippet