Documentation
¶
Index ¶
- type ChangeKind
- type Config
- type Context
- type ContextFile
- type ContextRequest
- type Edge
- type Embedder
- type File
- type FileChange
- type Index
- func (i *Index) Build(ctx context.Context) error
- func (i *Index) BuildContext(ctx context.Context, req ContextRequest) (Context, error)
- func (i *Index) BuildEmbeddings(ctx context.Context) error
- func (i *Index) Dependencies(path string) []string
- func (i *Index) Dependents(path string) []string
- func (i *Index) File(path string) (File, bool)
- func (i *Index) Files() []File
- func (i *Index) Imports(path string) []string
- func (i *Index) Module() string
- func (i *Index) SearchSemantic(ctx context.Context, query string, limit int) ([]SemanticResult, error)
- func (i *Index) SearchSymbols(_ context.Context, query string, limit int) []SearchResult
- func (i *Index) SetEmbedder(e Embedder)
- func (i *Index) Symbols() []Symbol
- func (i *Index) Update(ctx context.Context, changes []FileChange) error
- type SearchResult
- type SemanticResult
- type Symbol
- type SymbolKind
- type Watcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangeKind ¶
type ChangeKind string
const ( ChangeModified ChangeKind = "modified" ChangeDeleted ChangeKind = "deleted" )
type Context ¶
type Context struct {
Query string
Files []ContextFile
Results []SearchResult
SemanticResults []SemanticResult
}
type ContextFile ¶
type ContextRequest ¶
type Embedder ¶
Embedder turns source text into a vector. Implementations may use any local or remote embedding provider; the workspace package stays provider-agnostic.
type FileChange ¶
type FileChange struct {
Path string
Kind ChangeKind
}
FileChange describes a filesystem change observed since the last index update.
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index is an in-memory representation of a source tree. It combines a deterministic structural index with an optional semantic/vector index.
func (*Index) BuildContext ¶
BuildContext resolves a task to relevant source files using hybrid structural/semantic retrieval and a deterministic byte budget.
func (*Index) BuildEmbeddings ¶
BuildEmbeddings computes one vector per indexed file. It is intentionally explicit so callers control when embedding work and its cost occur.
func (*Index) Dependencies ¶
Dependencies returns source files imported by path when their import path belongs to the indexed Go module. External dependencies are omitted because they are not represented by source files in this index.
func (*Index) Dependents ¶
Dependents returns indexed files that import the package containing path.
func (*Index) SearchSemantic ¶
func (*Index) SearchSymbols ¶
SearchSymbols performs lightweight lexical ranking over indexed symbols.
func (*Index) SetEmbedder ¶
SetEmbedder configures the semantic retrieval provider. Embeddings are optional; structural search remains available without an embedder.
type SearchResult ¶
type SemanticResult ¶
type SymbolKind ¶
type SymbolKind string
const ( SymbolPackage SymbolKind = "package" SymbolType SymbolKind = "type" SymbolFunc SymbolKind = "function" SymbolMethod SymbolKind = "method" SymbolVar SymbolKind = "var" SymbolConst SymbolKind = "const" )