66import java .util .List ;
77import java .util .Map ;
88
9+ import liquidjava .mcp .utils .PathUtils ;
910import liquidjava .mcp .utils .Utils ;
1011import liquidjava .processor .context .AliasWrapper ;
1112import liquidjava .processor .context .Context ;
@@ -24,7 +25,7 @@ private ContextMapper() {}
2425 static Map <String , Object > locals (ContextRequest request ) {
2526 ContextHistory history = ContextHistory .getInstance ();
2627 List <Range > scopes = history .getFileScopes ().entrySet ().stream ()
27- .filter (entry -> Utils .samePath (entry .getKey (), request .file ()))
28+ .filter (entry -> PathUtils .samePath (entry .getKey (), request .file ()))
2829 .flatMap (entry -> entry .getValue ().stream ())
2930 .map (Range ::parse )
3031 .toList ();
@@ -73,7 +74,7 @@ private static List<Map<String, Object>> aliases(Context context) {
7374 private static List <Map <String , Object >> ghosts (Context context , String file ) {
7475 return context .getGhostStates ().stream ()
7576 .filter (state -> state .getParent () == null )
76- .filter (state -> file == null || state .getFile () != null && Utils .samePath (state .getFile (), file ))
77+ .filter (state -> file == null || state .getFile () != null && PathUtils .samePath (state .getFile (), file ))
7778 .sorted (Comparator .comparing (GhostFunction ::getQualifiedName ))
7879 .map (ContextMapper ::ghost )
7980 .distinct ()
@@ -83,7 +84,7 @@ private static List<Map<String, Object>> ghosts(Context context, String file) {
8384 private static List <Map <String , Object >> states (Context context , String file ) {
8485 return context .getGhostStates ().stream ()
8586 .filter (state -> state .getParent () != null )
86- .filter (state -> file == null || state .getFile () != null && Utils .samePath (state .getFile (), file ))
87+ .filter (state -> file == null || state .getFile () != null && PathUtils .samePath (state .getFile (), file ))
8788 .sorted (Comparator .comparing (GhostState ::getQualifiedName ))
8889 .map (ContextMapper ::ghost )
8990 .toList ();
@@ -93,7 +94,7 @@ private static boolean visible(RefinedVariable variable, String file, Range curs
9394 if (variable .getPlacementInCode () == null ) return false ;
9495 SourcePosition position = variable .getPlacementInCode ().getPosition ();
9596 if (position == null || !position .isValidPosition () || position .getFile () == null ) return false ;
96- if (!Utils .samePath (position .getFile ().toString (), file )) return false ;
97+ if (!PathUtils .samePath (position .getFile ().toString (), file )) return false ;
9798
9899 Range declaration = Range .from (position );
99100 if (!declaration .startsBefore (cursor )) return false ;
0 commit comments