@@ -13,7 +13,6 @@ import (
1313	"fmt" 
1414	"go/ast" 
1515	"go/token" 
16- 	"path/filepath" 
1716	"slices" 
1817	"strings" 
1918
@@ -58,7 +57,7 @@ func contextHandler(ctx context.Context, session *cache.Session, params *mcp.Cal
5857	fmt .Fprintf (& result , "Current package %q (package %s) declares the following symbols:\n \n " , pkg .Metadata ().PkgPath , pkg .Metadata ().Name )
5958	// Write context of the current file. 
6059	{
61- 		fmt .Fprintf (& result , "%s (current file):\n " , filepath . Base ( pgf .URI .Path () ))
60+ 		fmt .Fprintf (& result , "%s (current file):\n " , pgf .URI .Base ( ))
6261		result .WriteString ("--->\n " )
6362		if  err  :=  writeFileSummary (ctx , snapshot , pgf .URI , & result , false ); err  !=  nil  {
6463			return  nil , err 
@@ -73,7 +72,7 @@ func contextHandler(ctx context.Context, session *cache.Session, params *mcp.Cal
7372				continue 
7473			}
7574
76- 			fmt .Fprintf (& result , "%s:\n " , filepath . Base ( file .URI .Path () ))
75+ 			fmt .Fprintf (& result , "%s:\n " , file .URI .Base ( ))
7776			result .WriteString ("--->\n " )
7877			if  err  :=  writeFileSummary (ctx , snapshot , file .URI , & result , false ); err  !=  nil  {
7978				return  nil , err 
@@ -86,7 +85,7 @@ func contextHandler(ctx context.Context, session *cache.Session, params *mcp.Cal
8685	if  len (pgf .File .Imports ) >  0  {
8786		// Write import decls of the current file. 
8887		{
89- 			fmt .Fprintf (& result , "Current file %q contains this import declaration:\n " , filepath . Base ( pgf .URI .Path () ))
88+ 			fmt .Fprintf (& result , "Current file %q contains this import declaration:\n " , pgf .URI .Base ( ))
9089			result .WriteString ("--->\n " )
9190			// Add all import decl to output including all floating comment by 
9291			// using GenDecl's start and end position. 
@@ -127,7 +126,7 @@ func contextHandler(ctx context.Context, session *cache.Session, params *mcp.Cal
127126
128127				fmt .Fprintf (& result , "%q (package %s)\n " , importPath , impMetadata .Name )
129128				for  _ , f  :=  range  impMetadata .CompiledGoFiles  {
130- 					fmt .Fprintf (& result , "%s:\n " , filepath .Base (f . Path () ))
129+ 					fmt .Fprintf (& result , "%s:\n " , f .Base ())
131130					result .WriteString ("--->\n " )
132131					if  err  :=  writeFileSummary (ctx , snapshot , f , & result , true ); err  !=  nil  {
133132						return  nil , err 
0 commit comments