Repository navigation
Conversation
map_explorer_tool registers a thread entrypoint. While open, the map shares its view (background context) and the selected place (a titled, removable item) through ui/update-model-context.
The map app registers read_map, search_map, add_places and move_map on document.modelContext, so a follow-up request updates the map the user has open instead of opening another one. The explorer's view now goes to the model as structuredContent.
zmofei
force-pushed
the
feat/chatgpt-sidebar-app
branch
from
November 11, 2026 10:58
e963e07 to
9c9b9d5
Compare
…n next to the chat
render_map_tool is now the thread entrypoint: called with {} it opens the
explorer, and map_explorer_tool is gone. In ChatGPT a map the model draws
opens as a tab beside the chat, shares its view, and tells the model to
use its own WebMCP tools for follow-ups instead of opening another map.
The map app registers redraw_map, which takes render_map_tool's arguments, has the server render them and draws the result in place, so routes, isochrones and layers reach the open map too. Every data tool's render hint now points at it when a map is open.
Pins from add_places or a hand-composed marker have no card, so nothing marked them selected and the model was told no place was selected.
In ChatGPT the model kept calling render_map_tool for follow-ups, opening a new map tab each time, until it had called one of the map's WebMCP tools once. The result of a render_map_tool call that opens a map now asks it to call read_map on the open map first, if that tool is offered. Tested in ChatGPT Desktop (Codex): after the first map, the hotels and the isochrone follow-ups were drawn through redraw_map on the same map.
A click on a point of interest of the Standard base map (the poi featureset) selects it like a pin: it is shared with the model as a titled place, with its name, category and coordinates, and marked with the base map's select state. The base map gives no mapbox_id for it. Checked in a browser with the map page and a stub host: clicking the Aleksis Kivi statue sent "Aleksis Kiven muistopatsas, monument" with its coordinates as the selected place.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #316. Adds the thread entrypoint from the OpenAI MCP Extensions spec, so the map can stay open next to a conversation.
map_explorer_toolregisters{ type: "thread" }. Users open Mapbox Maps as a tab in a chat from "+" → "More tools".ui/update-model-context, and the selected place as a titled item in the composer. A place the user removes isn't attached again until they select another.read_map,search_map,add_placesandmove_mapondocument.modelContext, so "show coffee bars on it" draws on the open map instead of opening a second one. This also works for arender_map_toolmap expanded into a tab.render_map_tooldescription point the model at these tools when a map is already open.Verified in ChatGPT Desktop 26.1106.51428 with a local dev server:
read_map, and "show some coffee bars on it", "mark Helsinki Cathedral on it" and "move the map to Tampere" all change the open map.Not verified: the selected-place item in the composer, and whether the routing text is needed for the model to pick the WebMCP tools.
Known limit: in an Instant chat the model is not offered the WebMCP tools, so a follow-up still opens a new inline map there. Routes and isochrones can't be drawn on an open map yet.