Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV2-4455 - check if intellicode is running to avoid collision #1404

Merged
merged 1 commit into from
Dec 10, 2023
Merged
Show file tree
Hide file tree
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
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
Loading