MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / getInstalledVSCodeExtensionVersion

Function getInstalledVSCodeExtensionVersion

source code/utils/ide.ts:933–951  ·  view source on GitHub ↗
(
  command: string,
)

Source from the content-addressed store, hash-verified

931}
932
933async function getInstalledVSCodeExtensionVersion(
934 command: string,
935): Promise<string | null> {
936 const { stdout } = await execFileNoThrow(
937 command,
938 ['--list-extensions', '--show-versions'],
939 {
940 env: getInstallationEnv(),
941 },
942 )
943 const lines = stdout?.split('\n') || []
944 for (const line of lines) {
945 const [extensionId, version] = line.split('@')
946 if (extensionId === 'anthropic.claude-code' && version) {
947 return version
948 }
949 }
950 return null
951}
952
953function getVSCodeIDECommandByParentProcess(): string | null {
954 try {

Callers 1

installIDEExtensionFunction · 0.85

Calls 2

execFileNoThrowFunction · 0.85
getInstallationEnvFunction · 0.85

Tested by

no test coverage detected