You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Triggered when an R script opens an `httpgd` graphics device (a modern SVG/HTML-based plotting device for R).
265
265
266
266
1.**Intercepting the URL**: R tells VS Code the exact local URL/port where the `httpgd` server is streaming the plots.
267
-
2.**Delegation to Manager**: The session handler passes this URL to the `globalHttpgdManager` (an instance of `HttpgdManager` defined in `src/plotViewer/index.ts`).
267
+
2.**Delegation to Manager**: The session handler passes this URL to the `globalPlotManager` (an instance of `CommonPlotManager` defined in `src/plotViewer/index.ts`).
268
268
3.**Viewer Instantiation**: The manager parses the URL, extracting the host and security token. It searches to see if a viewer for that host already exists. If not, it instantiates a new `HttpgdViewer`.
269
269
4.**Webview Rendering**: The `HttpgdViewer` spins up a dedicated `WebviewPanel`. Instead of just embedding the plot as a static image, it loads a full React-based frontend application (bundled in the extension's resources) into the webview. This frontend connects directly to the R `httpgd` server via WebSockets to provide a live, interactive, resizable plot viewer with history tracking and export capabilities.
0 commit comments