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

Function getTerminalHref

site/src/modules/apps/apps.ts:70–84  ·  view source on GitHub ↗
({
	username,
	workspace,
	agent,
	container,
}: GetTerminalHrefParams)

Source from the content-addressed store, hash-verified

68};
69
70export 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`

Callers 4

TerminalLinkFunction · 0.90
TaskAppsFunction · 0.90
WorkspaceAppsFunction · 0.90
TerminalMenuItemFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected