From 264ac0d14f55ae949aa3b066cc01164a5e04c192 Mon Sep 17 00:00:00 2001 From: Dima Abramovich <60742964+dimacodota@users.noreply.github.com> Date: Sun, 10 Dec 2023 22:52:16 +0200 Subject: [PATCH] check if intellicode is running to avoid colision (#1404) --- src/binary/runBinary.ts | 1 + src/globals/tabnineExtensionProperties.ts | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/binary/runBinary.ts b/src/binary/runBinary.ts index d36abf4041..e605d2cc50 100644 --- a/src/binary/runBinary.ts +++ b/src/binary/runBinary.ts @@ -71,6 +71,7 @@ export default async function runBinary( `vscode-code-lens-enabled=${ tabnineExtensionProperties.codeLensEnabled ?? "unknown" }`, + `vscode-found-intellicode=${tabnineExtensionProperties.foundIntellicode}`, ...metadata, ].filter((i): i is string => i !== null); diff --git a/src/globals/tabnineExtensionProperties.ts b/src/globals/tabnineExtensionProperties.ts index 82ef194116..d628693553 100644 --- a/src/globals/tabnineExtensionProperties.ts +++ b/src/globals/tabnineExtensionProperties.ts @@ -42,6 +42,7 @@ interface TabNineExtensionProperties { caCerts: string | undefined; ignoreCertificateErrors: boolean; codeLensEnabled: boolean | undefined; + foundIntellicode: boolean; } function getContext(): TabNineExtensionProperties { @@ -199,6 +200,11 @@ function getContext(): TabNineExtensionProperties { get codeLensEnabled(): boolean | undefined { return configuration.get("tabnine.codeLensEnabled"); }, + get foundIntellicode(): boolean { + return vscode.extensions.all.some( + (e) => e.id.includes("vscodeintellicode") && e.isActive + ); + }, }; }