We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a8b2ee3 commit 41cd2f1Copy full SHA for 41cd2f1
examples/map-server/src/mcp-app.ts
@@ -93,14 +93,11 @@ interface PersistedCameraState {
93
}
94
95
/**
96
- * Get localStorage key for persisting view state
97
- * Uses toolInfo.id (tool invocation ID) if available, otherwise falls back to "default".
98
- * localStorage is scoped per origin, so each tool call can remember its view state.
+ * Get localStorage key for persisting view state.
+ * Uses a fixed key so view persists across all tool calls for this server.
99
*/
100
function getViewStorageKey(): string {
101
- const context = app.getHostContext();
102
- const toolId = context?.toolInfo?.id ?? "default";
103
- return `map:${toolId}`;
+ return "map:viewState";
104
105
106
0 commit comments