MCPcopy Index your code
hub / github.com/coder/coder / open

Function open

site/src/utils/portForward.ts:102–115  ·  view source on GitHub ↗
(uri: string)

Source from the content-addressed store, hash-verified

100 username?: string,
101) => {
102 const open = (uri: string) => {
103 // Copied from: https://github.com/xtermjs/xterm.js/blob/master/addons/xterm-addon-web-links/src/WebLinksAddon.ts#L23
104 const newWindow = window.open();
105 if (newWindow) {
106 try {
107 newWindow.opener = null;
108 } catch {
109 // no-op, Electron can throw
110 }
111 newWindow.location.href = uri;
112 } else {
113 console.warn("Opening link blocked as opener could not be cleared");
114 }
115 };
116
117 if (!agentName || !workspaceName || !username || !proxyHost) {
118 open(uri);

Callers 1

Calls 1

openMethod · 0.80

Tested by

no test coverage detected