Skip to content

Commit

Permalink
check if intellicode is running to avoid colision (#1404)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimacodota authored Dec 10, 2023
1 parent 46c08b9 commit 264ac0d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/binary/runBinary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
6 changes: 6 additions & 0 deletions src/globals/tabnineExtensionProperties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ interface TabNineExtensionProperties {
caCerts: string | undefined;
ignoreCertificateErrors: boolean;
codeLensEnabled: boolean | undefined;
foundIntellicode: boolean;
}

function getContext(): TabNineExtensionProperties {
Expand Down Expand Up @@ -199,6 +200,11 @@ function getContext(): TabNineExtensionProperties {
get codeLensEnabled(): boolean | undefined {
return configuration.get<boolean>("tabnine.codeLensEnabled");
},
get foundIntellicode(): boolean {
return vscode.extensions.all.some(
(e) => e.id.includes("vscodeintellicode") && e.isActive
);
},
};
}

Expand Down

0 comments on commit 264ac0d

Please sign in to comment.