Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions site/src/modules/apps/useAppLink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,19 @@ export const useAppLink = (
const openAppExternallyFailedTimeout = 500;
const openAppExternallyFailed = setTimeout(() => {
// Check if this is a JetBrains IDE app
const isJetBrainsApp =
app.url &&
(app.url.startsWith("jetbrains-gateway:") ||
app.url.startsWith("jetbrains:"));
// starts with "jetbrains-gateway://connect#type=coder" (from https://registry.coder.com/modules/coder/jetbrains-gateway)
const isJetBrainsGateway = app.url?.startsWith("jetbrains-gateway:");
// starts with "jetbrains://gateway/coder" (from https://registry.coder.com/modules/coder/jetbrains)
const isJetBrainsToolbox = app.url?.startsWith("jetbrains:");

// Check if this is a coder:// URL
const isCoderApp = app.url?.startsWith("coder:");

if (isJetBrainsApp) {
if (isJetBrainsGateway) {
displayError(
`To use ${label}, you need to have JetBrains Gateway installed.`,
);
} else if (isJetBrainsToolbox) {
displayError(
`To use ${label}, you need to have JetBrains Toolbox installed.`,
);
Expand Down
Loading