feat: add semantic search tool for code symbol indexing and searching
- Implemented a new tool for semantic code search that indexes Rust code symbols (functions, structs, enums, traits, modules) and allows searching by name, concept, or meaning. - Introduced a symbol index structure with methods for rebuilding the index and searching symbols. - Added regex patterns for extracting various code symbols from Rust source files. - Implemented scoring logic for search results based on exact matches, prefix matches, and context relevance. - Created a web search tool that interacts with a SearXNG instance to fetch documentation and API information based on user queries. - Added a diff preview overlay for rendering git diff output with color-coded additions and deletions in a TUI interface.
This commit is contained in:
@@ -61,6 +61,17 @@ pub fn spawn_agent_turn(state: &mut AppStateRest, text: String) {
|
||||
|
||||
info!("delegating agent turn to infrastructure engine (model: {})", model);
|
||||
|
||||
let edit_count = state
|
||||
.session_runtime
|
||||
.as_ref()
|
||||
.map(|rt| rt.edit_count)
|
||||
.unwrap_or(0);
|
||||
let consecutive_empty_reviews = state
|
||||
.session_runtime
|
||||
.as_ref()
|
||||
.map(|rt| rt.consecutive_empty_reviews)
|
||||
.unwrap_or(0);
|
||||
|
||||
let params = AgentTurnParams {
|
||||
messages,
|
||||
session_dir,
|
||||
@@ -71,6 +82,8 @@ pub fn spawn_agent_turn(state: &mut AppStateRest, text: String) {
|
||||
api_key,
|
||||
model,
|
||||
api_base,
|
||||
edit_count,
|
||||
consecutive_empty_reviews,
|
||||
};
|
||||
|
||||
backend_spawn_agent_turn(params);
|
||||
|
||||
Reference in New Issue
Block a user