Documentation
¶
Overview ¶
Package query provides a tool for embedding-based code search.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Inputs ¶
type Inputs struct {
// Query is the search query for semantic similarity.
Query string `json:"query" jsonschema:"required,description=Search query for semantic similarity" validate:"required"`
// K is the number of results to return (default: from config).
K int `json:"k,omitempty" jsonschema:"description=Number of results to return (default from config)"`
// FullContent returns chunk content in results when true.
FullContent bool `json:"full_content,omitempty" jsonschema:"description=Return chunk content in results (default false)"`
// Reranking enables the reranking pass. Nil/omitted = true (default on).
Reranking *bool `json:"reranking,omitempty" jsonschema:"description=Include reranking pass (default true)"`
}
Inputs defines the parameters for the Query tool.
type Result ¶
type Result struct {
Path string `json:"path"`
StartLine int `json:"start_line"`
EndLine int `json:"end_line"`
Content string `json:"content,omitempty"`
}
Result represents a single search result for JSON output.
type Tool ¶
type Tool struct {
tool.Base
// Cfg is the full config — needed because this tool creates sub-agents
// via agent.New(), which requires access to agents, providers, modes,
// and the full BuildAgent pipeline. Also uses Home (embedding cache path)
// and Features.Estimation (token estimator).
Cfg config.Config
Paths config.Paths
Rt *config.Runtime
Events chan<- ui.Event
}
Tool implements embedding-based code search.
func (*Tool) Sandboxable ¶
Sandboxable returns false because the tool accesses the filesystem and network.
Click to show internal directories.
Click to hide internal directories.