( command: string, )
| 929 | } |
| 930 | |
| 931 | async 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 | |
| 951 | function getVSCodeIDECommandByParentProcess(): string | null { |
| 952 | try { |
no test coverage detected