Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnalyzeResult ¶
type AnalyzeResult struct {
Query string `json:"query"`
RepoName string `json:"repo_name"`
Total int `json:"total_results"`
Results []SearchHit `json:"results"`
}
AnalyzeResult holds the result of a direct hybrid search (no LLM).
func (*AnalyzeResult) ToTOON ¶
func (ar *AnalyzeResult) ToTOON(includeCode bool) string
ToTOON converts AnalyzeResult to TOON (Token-Oriented Object Notation) format. TOON uses tabular headers for homogeneous arrays, saving ~40% tokens vs JSON.
type Config ¶
type Config struct {
CacheDir string
EmbeddingModel string
BatchSize int
NoEmbeddings bool // If true, skip embedding generation (BM25 only)
}
Config holds engine configuration.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns the default engine configuration.
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine is the top-level orchestrator connecting all FastCode modules.
func (*Engine) Analyze ¶
Analyze performs a direct hybrid search without LLM, returning scored results. This is the script-callable entry point for agent coding tools.
type IndexResult ¶
type IndexResult struct {
RepoName string `json:"repo_name"`
TotalFiles int `json:"total_files"`
TotalElements int `json:"total_elements"`
GraphStats map[string]any `json:"graph_stats"`
Cached bool `json:"cached"`
}
IndexResult holds the result of an indexing operation.
type QueryResult ¶
type QueryResult struct {
Answer string `json:"answer"`
Confidence int `json:"confidence"`
Rounds int `json:"rounds"`
StopReason string `json:"stop_reason"`
Elements int `json:"elements_used"`
}
QueryResult holds the result of a query operation.
type SearchHit ¶
type SearchHit struct {
Name string `json:"name"`
Type string `json:"type"`
FilePath string `json:"file_path"`
StartLine int `json:"start_line"`
EndLine int `json:"end_line"`
Score float64 `json:"relevance_score"`
Signature string `json:"signature,omitempty"`
Docstring string `json:"docstring,omitempty"`
Code string `json:"code,omitempty"`
}
SearchHit represents a single search result with relevance score.