ranking

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package ranking implements token-budget-aware file selection.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterByFile added in v1.2.0

func FilterByFile(rm *model.RepoMap, substr string) *model.RepoMap

FilterByFile returns a new RepoMap containing only files whose path contains substr (case-insensitive), with all dependency edges touching those files and call edges from functions defined in those files.

func FilterBySymbol added in v1.2.0

func FilterBySymbol(rm *model.RepoMap, substr string, withMembers bool) *model.RepoMap

FilterBySymbol returns a new RepoMap containing only symbols whose name contains substr (case-insensitive), the files that define those symbols, files that define their direct callers and callees, and the edges that connect them.

When withMembers is true and a matched symbol is a class/struct, the members table of the returned RepoMap is populated with that class's field tags. If no top-level definitions match, withMembers triggers a fallback search over member names (the unqualified part after ".").

func SelectFiles

func SelectFiles(rm *model.RepoMap, maxFiles int) *model.RepoMap

SelectFiles returns a new RepoMap with only the top-ranked files. If maxFiles is <= 0 or >= len(files), all files are returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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