({
username,
workspace,
agent,
container,
}: GetTerminalHrefParams)
| 68 | }; |
| 69 | |
| 70 | export const getTerminalHref = ({ |
| 71 | username, |
| 72 | workspace, |
| 73 | agent, |
| 74 | container, |
| 75 | }: GetTerminalHrefParams) => { |
| 76 | const params = new URLSearchParams(); |
| 77 | if (container) { |
| 78 | params.append("container", container); |
| 79 | } |
| 80 | // Always use the primary for the terminal link. This is a relative link. |
| 81 | return `/@${username}/${workspace}${ |
| 82 | agent ? `.${agent}` : "" |
| 83 | }/terminal?${params}`; |
| 84 | }; |
| 85 | |
| 86 | // Open `about:blank` first to detect a popup blocker. If it opens, we |
| 87 | // null out `opener` (durable on the opened window); and navigate `popup` |
no outgoing calls
no test coverage detected