Finds the relevant subgraph for a query without extracting code blocks. Extracts symbols from the query, searches for matching nodes, and expands via BFS traversal to the configured depth.
(
&self,
query: &str,
options: &BuildContextOptions,
)
| 80 | /// Extracts symbols from the query, searches for matching nodes, and expands |
| 81 | /// via BFS traversal to the configured depth. |
| 82 | pub async fn find_relevant_context( |
| 83 | &self, |
| 84 | query: &str, |
| 85 | options: &BuildContextOptions, |
| 86 | ) -> Result<Subgraph> { |
| 87 | let symbols = extract_symbols_from_query(query); |
| 88 | let entry_points = self.find_entry_points(query, &symbols, options).await?; |
| 89 | self.expand_subgraph(&entry_points, options).await |
| 90 | } |
| 91 | |
| 92 | /// Reads the source file and extracts the code for a node. |
| 93 | /// |