File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -294,13 +294,22 @@ impl ProjectIndexer {
294294 // Store nodes into graph and compute stats
295295 let main_pb = self . create_progress_bar ( nodes. len ( ) as u64 , "Storing nodes" ) ;
296296 let mut stats = IndexStats :: default ( ) ;
297+ let mut seen_files = std:: collections:: HashSet :: new ( ) ;
297298 for n in nodes. into_iter ( ) {
298299 match n. node_type {
299300 Some ( NodeType :: Function ) => stats. functions += 1 ,
300301 Some ( NodeType :: Class ) => stats. classes += 1 ,
301302 _ => { }
302303 }
303304 if let Some ( ref c) = n. content { stats. lines += c. lines ( ) . count ( ) ; }
305+ if let Some ( ref path) = n. location . file_path . as_str ( ) . into ( ) {
306+ if seen_files. insert ( n. location . file_path . clone ( ) ) {
307+ stats. files += 1 ;
308+ }
309+ }
310+ if n. embedding . is_some ( ) {
311+ stats. embeddings += 1 ;
312+ }
304313 self . graph . add_node ( n) . await ?;
305314 main_pb. inc ( 1 ) ;
306315 }
You can’t perform that action at this time.
0 commit comments