File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 66 mcpGist ,
77} from "../utils.js" ;
88
9- const RESOURCE_PREFIX = "gist:/// " ;
9+ const RESOURCE_PREFIX = "gist://" ;
1010
1111export const resourceHandlers : ResourceHandlers = {
1212 listResourceTemplates : ( ) => ( {
@@ -53,11 +53,10 @@ export const resourceHandlers: ResourceHandlers = {
5353
5454 readResource : async ( uri , context ) => {
5555 const url = new URL ( uri ) ;
56- const path = url . pathname . replace ( / ^ \/ / , "" ) ;
56+ const path = url . host + ( url . pathname ? '/' + url . pathname : '' ) ;
5757
5858 if ( path . endsWith ( "/comments" ) ) {
59- const gistId = path . replace ( "/comments" , "" ) ;
60- const response = await context . axiosInstance . get ( `/${ gistId } /comments` ) ;
59+ const response = await context . axiosInstance . get ( `/${ url . host } /comments` ) ;
6160 return {
6261 contents : [
6362 {
You can’t perform that action at this time.
0 commit comments