( command: string, )
| 931 | } |
| 932 | |
| 933 | async 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 | |
| 953 | function getVSCodeIDECommandByParentProcess(): string | null { |
| 954 | try { |
no test coverage detected