Documentation
¶
Index ¶
- type App
- type BloomFilterConfig
- type ChunkingConfig
- type ChurnWeights
- type CodeGraphConfig
- type Config
- type GitAnalysisConfig
- type GitAnalysisMode
- type GitChurnConfig
- type IndexBuildingConfig
- type LanguageServersConfig
- type MySQLConfig
- type Neo4jConfig
- type OllamaConfig
- type QdrantConfig
- type Repository
- type SourceConfig
- type SummaryConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
Port int `yaml:"port"`
CodeGraph bool `yaml:"codegraph"`
WorkDir string `yaml:"workdir,omitempty"`
GCThreshold int64 `yaml:"gc_threshold,omitempty"`
NumFileThreads int `yaml:"num_file_threads,omitempty"`
MaxConcurrentFileProcessing int `yaml:"max_concurrent_file_processing,omitempty"`
DebugHTTP bool `yaml:"debug_http,omitempty"` // Log full request/response bodies
LogLevel string `yaml:"log_level,omitempty"` // debug, info, warn, error (default: info)
}
type BloomFilterConfig ¶
type ChunkingConfig ¶
type ChurnWeights ¶
type ChurnWeights struct {
LinesChanged float64 `yaml:"lines_changed"` // Default: 0.5
CommitCount float64 `yaml:"commit_count"` // Default: 0.3
AuthorCount float64 `yaml:"author_count"` // Default: 0.2
}
ChurnWeights holds the weights for churn score calculation
type CodeGraphConfig ¶
type Config ¶
type Config struct {
Source SourceConfig `yaml:"source"`
Neo4j Neo4jConfig `yaml:"neo4j"`
Qdrant QdrantConfig `yaml:"qdrant"`
Chunking ChunkingConfig `yaml:"chunking"`
Ollama OllamaConfig `yaml:"ollama"`
BloomFilter BloomFilterConfig `yaml:"bloom_filter"`
IndexBuilding IndexBuildingConfig `yaml:"index_building"`
MySQL MySQLConfig `yaml:"mysql"`
CodeGraph CodeGraphConfig `yaml:"code_graph"`
GitAnalysis GitAnalysisConfig `yaml:"git_analysis"`
GitChurn GitChurnConfig `yaml:"git_churn"`
Summary SummaryConfig `yaml:"summary"`
LanguageServers LanguageServersConfig `yaml:"language_servers"`
App App `yaml:"app"`
}
func (*Config) GetRepository ¶
func (c *Config) GetRepository(name string) (*Repository, error)
type GitAnalysisConfig ¶
type GitAnalysisConfig struct {
Enabled bool `yaml:"enabled"`
Mode GitAnalysisMode `yaml:"mode"` // "ondemand" or "precompute"
LookbackCommits int `yaml:"lookback_commits"` // How many commits to analyze (default: 1000)
}
type GitAnalysisMode ¶
type GitAnalysisMode string
GitAnalysisMode defines how git analysis is performed
const ( GitAnalysisModeOnDemand GitAnalysisMode = "ondemand" GitAnalysisModePrecompute GitAnalysisMode = "precompute" )
type GitChurnConfig ¶
type GitChurnConfig struct {
// Enabled enables git churn analysis
Enabled bool `yaml:"enabled"`
// TimeWindowDays is the lookback period in days (default: 180)
TimeWindowDays int `yaml:"time_window_days"`
// EnableFileLevel enables file-level churn metrics (default: true)
EnableFileLevel bool `yaml:"enable_file_level"`
// EnableFunctionLevel enables function-level churn metrics (default: true)
EnableFunctionLevel bool `yaml:"enable_function_level"`
// Weights for churn score calculation
Weights ChurnWeights `yaml:"weights"`
// ExcludePatterns are glob patterns for files to exclude (e.g., "vendor/**", "**/*_test.go")
ExcludePatterns []string `yaml:"exclude_patterns"`
// ExcludeAuthors are author names to exclude (e.g., "dependabot[bot]")
ExcludeAuthors []string `yaml:"exclude_authors"`
// ExcludeMerges excludes merge commits from analysis (default: true)
ExcludeMerges bool `yaml:"exclude_merges"`
// MaxConcurrency is the maximum number of concurrent file processors (default: 4)
MaxConcurrency int `yaml:"max_concurrency"`
// FunctionChurnThreshold is the percentile threshold for function-level analysis
// Only files in the top N% by churn will get function-level analysis (default: 10)
FunctionChurnThreshold float64 `yaml:"function_churn_threshold"`
}
GitChurnConfig holds configuration for git churn analysis
func (*GitChurnConfig) GetDefaults ¶
func (c *GitChurnConfig) GetDefaults() GitChurnConfig
GetDefaults returns GitChurnConfig with default values applied Note: TimeWindowDays = 0 means "all history" (no time limit)
type IndexBuildingConfig ¶
type LanguageServersConfig ¶
LanguageServersConfig holds paths to language server executables Keys are language names (e.g., "go", "python", "csharp"), values are paths to LSP executables
func (LanguageServersConfig) GetLSPPath ¶
func (lsc LanguageServersConfig) GetLSPPath(language string) string
GetLSPPath returns the path to the language server for the given language Returns empty string if no LSP is configured for the language
type MySQLConfig ¶
type Neo4jConfig ¶
type OllamaConfig ¶
type QdrantConfig ¶
type Repository ¶
type SourceConfig ¶
type SourceConfig struct {
Repositories []Repository `yaml:"repositories"`
}
type SummaryConfig ¶
type SummaryConfig struct {
LLMProvider string `yaml:"llm_provider"` // ollama, claude, openai
LLMModel string `yaml:"llm_model"` // Model name (e.g., llama3.2, claude-3-5-haiku-20241022)
PromptsFile string `yaml:"prompts_file"` // Path to prompts YAML config
WorkerCount int `yaml:"worker_count"` // Parallel workers for summarization
BatchSize int `yaml:"batch_size"` // Batch size for DB writes
SkipIfExists bool `yaml:"skip_if_exists"` // Skip if summary exists and context unchanged
// Provider-specific
OllamaURL string `yaml:"ollama_url"` // Ollama API URL
ClaudeAPIKey string `yaml:"claude_api_key"` // Or use ANTHROPIC_API_KEY env var
OpenAIAPIKey string `yaml:"openai_api_key"` // Or use OPENAI_API_KEY env var
OpenAIBaseURL string `yaml:"openai_base_url"` // For API-compatible services
}
SummaryConfig holds configuration for hierarchical code summarization