fix: improve JetBrains error message to mention Toolbox requirement (#18294)

Co-authored-by: blink-so[bot] <211532188+blink-so[bot]@users.noreply.github.com>
Co-authored-by: kylecarbs <7122116+kylecarbs@users.noreply.github.com>
This commit is contained in:
blink-so[bot]
2025-06-18 19:34:39 +05:00
committed by GitHub
co-authored by kylecarbs
parent 98a9aa19ce
commit 2f59cd0c73
+13 -1
View File
@@ -50,7 +50,19 @@ export const useAppLink = (
// an error message will be displayed.
const openAppExternallyFailedTimeout = 500;
const openAppExternallyFailed = setTimeout(() => {
displayError(`${label} must be installed first.`);
// Check if this is a JetBrains IDE app
const isJetBrainsApp =
app.url &&
(app.url.startsWith("jetbrains-gateway:") ||
app.url.startsWith("jetbrains:"));
if (isJetBrainsApp) {
displayError(
`To use ${label}, you need to have JetBrains Toolbox installed.`,
);
} else {
displayError(`${label} must be installed first.`);
}
}, openAppExternallyFailedTimeout);
window.addEventListener("blur", () => {
clearTimeout(openAppExternallyFailed);