From 83a2cd1ac24ca0feda34ae877aaf31f41b58b86c Mon Sep 17 00:00:00 2001 From: aichat-agent Date: Thu, 1 Oct 2026 14:58:06 +0000 Subject: feat: add built-in subquery tool with hierarchical query ids * Add config options subquery and subquery_max_depth. * Register an internal subquery function that spawns a fresh LLM query with the current model configuration but without the full context. The model selects context numerically (message_indexes) or by text excerpt (excerpts). * Subqueries can use tools, including further nested subqueries up to subquery_max_depth. * Queries and subqueries get hierarchical ids ([0], [0/1], [0/1/2]) that prefix tool-call prints and spinner messages. --- src/repl/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/repl/mod.rs') diff --git a/src/repl/mod.rs b/src/repl/mod.rs index f8a51d1..85f4f9c 100644 --- a/src/repl/mod.rs +++ b/src/repl/mod.rs @@ -723,6 +723,10 @@ async fn ask( mut input: Input, with_embeddings: bool, ) -> Result<()> { + if input.query_path().is_empty() { + let root_id = crate::utils::next_query_id(&[]); + input.set_query_path(vec![root_id]); + } if input.is_empty() { return Ok(()); } -- cgit v1.2.3