sourcecontext

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package sourcecontext indexes bounded source files as retrieval context.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractSymbols added in v1.0.0

func ExtractSymbols(body string) []string

ExtractSymbols returns bounded symbol anchors from source text.

func ExtractTestNames added in v1.0.0

func ExtractTestNames(body string) []string

ExtractTestNames returns bounded test-name anchors from source text.

func LanguageForPath added in v1.0.0

func LanguageForPath(rel string) string

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 (a *Adapter) AcceptsFile(rel string, size int64, cfg *config.RepoConfig) bool

func (*Adapter) Discover

func (a *Adapter) Discover(ctx context.Context, repoRoot string, cfg *config.RepoConfig) ([]adapters.Candidate, error)

func (*Adapter) DiscoverFile

func (a *Adapter) DiscoverFile(ctx context.Context, file adapters.FileCandidate, cfg *config.RepoConfig) ([]adapters.Candidate, error)

func (*Adapter) Name

func (a *Adapter) Name() string

Jump to

Keyboard shortcuts

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