MCPcopy Index your code
hub / github.com/codeaashu/claude-code / isIDEExtensionInstalled

Function isIDEExtensionInstalled

src/utils/ide.ts:852–877  ·  view source on GitHub ↗
(
  ideType: IdeType,
)

Source from the content-addressed store, hash-verified

850 : 'anthropic.claude-code'
851
852export async function isIDEExtensionInstalled(
853 ideType: IdeType,
854): Promise<boolean> {
855 if (isVSCodeIde(ideType)) {
856 const command = await getVSCodeIDECommand(ideType)
857 if (command) {
858 try {
859 const result = await execFileNoThrowWithCwd(
860 command,
861 ['--list-extensions'],
862 {
863 env: getInstallationEnv(),
864 },
865 )
866 if (result.stdout?.includes(EXTENSION_ID)) {
867 return true
868 }
869 } catch {
870 // eat the error
871 }
872 }
873 } else if (isJetBrainsIde(ideType)) {
874 return await isJetBrainsPluginInstalledCached(ideType)
875 }
876 return false
877}
878
879async function installIDEExtension(ideType: IdeType): Promise<string | null> {
880 if (isVSCodeIde(ideType)) {

Callers 1

initializeIdeIntegrationFunction · 0.85

Calls 6

isVSCodeIdeFunction · 0.85
getVSCodeIDECommandFunction · 0.85
execFileNoThrowWithCwdFunction · 0.85
getInstallationEnvFunction · 0.85
isJetBrainsIdeFunction · 0.85

Tested by

no test coverage detected