MCPcopy
hub / github.com/codeaashu/claude-code / getInstalledVSCodeExtensionVersion

Function getInstalledVSCodeExtensionVersion

src/utils/ide.ts:931–949  ·  view source on GitHub ↗
(
  command: string,
)

Source from the content-addressed store, hash-verified

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

Callers 1

installIDEExtensionFunction · 0.85

Calls 2

execFileNoThrowFunction · 0.85
getInstallationEnvFunction · 0.85

Tested by

no test coverage detected