Documentation
¶
Overview ¶
Package sourcecontext indexes bounded source files as retrieval context.
Index ¶
- func ExtractSymbols(body string) []string
- func ExtractTestNames(body string) []string
- func LanguageForPath(rel string) string
- type Adapter
- func (a *Adapter) AcceptsFile(rel string, size int64, cfg *config.RepoConfig) bool
- func (a *Adapter) Discover(ctx context.Context, repoRoot string, cfg *config.RepoConfig) ([]adapters.Candidate, error)
- func (a *Adapter) DiscoverFile(ctx context.Context, file adapters.FileCandidate, cfg *config.RepoConfig) ([]adapters.Candidate, error)
- func (a *Adapter) Name() string
- func (a *Adapter) Parse(ctx context.Context, c adapters.Candidate) (adapters.Artifact, []adapters.Source, todoparse.ParseResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractSymbols ¶ added in v1.0.0
ExtractSymbols returns bounded symbol anchors from source text.
func ExtractTestNames ¶ added in v1.0.0
ExtractTestNames returns bounded test-name anchors from source text.
func LanguageForPath ¶ added in v1.0.0
LanguageForPath returns the source-context language label for a path.
Types ¶
type Adapter ¶
type Adapter struct{}
Adapter discovers source files that are useful as query-focused AI context.
func (*Adapter) AcceptsFile ¶
func (*Adapter) DiscoverFile ¶
func (a *Adapter) DiscoverFile(ctx context.Context, file adapters.FileCandidate, cfg *config.RepoConfig) ([]adapters.Candidate, error)
Click to show internal directories.
Click to hide internal directories.