Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractSymbols ¶
ExtractSymbols returns symbol names found in the first maxLines of content.
Types ¶
type File ¶
type File struct {
Path string `json:"path"`
Size int64 `json:"-"`
Refs int `json:"refs"`
Symbols []string `json:"symbols,omitempty"`
Score float64 `json:"score"`
Tokens int `json:"tokens"`
}
File is one mapped file.
type Gitignore ¶
type Gitignore struct {
// contains filtered or unexported fields
}
Gitignore matches paths against .gitignore-style patterns. Stdlib-only: no go-gitignore dep. Implements the 90% case — glob (*, **), negation (!), leading slash anchoring, dir suffix (/). ponytail: gitignore subset, full gitignore (git::check-ignore semantics) if real-world repos expose misses.
func BaselineIgnore ¶
func BaselineIgnore() *Gitignore
BaselineIgnore returns always-ignored paths (VCS, node_modules, caches).
func LoadGitignore ¶
type Result ¶
type Result struct {
Files []File `json:"files"`
TotalTokens int `json:"total_tokens"`
Truncated int `json:"truncated"`
}
Result is the full map.
func (*Result) Budget ¶
Budget truncates a ranked result to fit within a token budget. Files arrive pre-sorted by score (Build). Keeps top-N by score until budget exhausted, then marks the rest truncated.
func (*Result) RenderIndex ¶
RenderIndex emits a self-contained HTML page with the map embedded as JSON plus SEO/meta/robots — indexable, searchable, no server needed.
func (*Result) RenderJSON ¶
RenderJSON marshals the result.
func (*Result) RenderTree ¶
RenderTree returns a token-budgeted tree. Files already ranked by Build.