feat(map): add start (🟢) and finish (🏁) route markers
This commit is contained in:
@@ -8,7 +8,7 @@ sys.path.append(os.path.join(os.path.dirname(__file__), "..", "src"))
|
||||
|
||||
from strava_mcp_server.strava_client import StravaClient
|
||||
from mcp.server.fastmcp import Context
|
||||
from mcp.types import TextContent
|
||||
from mcp.types import TextContent, EmbeddedResource
|
||||
|
||||
|
||||
class MockContext(Context):
|
||||
@@ -117,6 +117,12 @@ async def generate():
|
||||
if isinstance(item, TextContent) and "<!DOCTYPE html>" in item.text:
|
||||
html_text = item.text
|
||||
break
|
||||
elif (
|
||||
isinstance(item, EmbeddedResource)
|
||||
and item.resource.mimeType == "text/html"
|
||||
):
|
||||
html_text = item.resource.text
|
||||
break
|
||||
|
||||
if html_text:
|
||||
output_path = os.path.join(os.path.dirname(__file__), "..", "test.html")
|
||||
@@ -178,6 +184,12 @@ async def generate():
|
||||
if isinstance(item, TextContent) and "<!DOCTYPE html>" in item.text:
|
||||
html_text = item.text
|
||||
break
|
||||
elif (
|
||||
isinstance(item, EmbeddedResource)
|
||||
and item.resource.mimeType == "text/html"
|
||||
):
|
||||
html_text = item.resource.text
|
||||
break
|
||||
|
||||
if html_text:
|
||||
output_path = os.path.join(os.path.dirname(__file__), "..", "test.html")
|
||||
|
||||
Reference in New Issue
Block a user