[ide-mode] Update installation logic and nudge (#6068)

This commit is contained in:
christine betts
2025-08-12 20:08:47 +00:00
committed by GitHub
parent 8524cce7b9
commit 74fd0841d0
8 changed files with 78 additions and 113 deletions

View File

@@ -147,31 +147,11 @@ class VsCodeInstaller implements IdeInstaller {
}
}
class OpenVSXInstaller implements IdeInstaller {
async install(): Promise<InstallResult> {
// TODO: Use the correct extension path.
const command = `npx ovsx get google.gemini-cli-vscode-ide-companion`;
try {
child_process.execSync(command, { stdio: 'pipe' });
return {
success: true,
message:
'VS Code companion extension was installed successfully from OpenVSX. Please restart your terminal to complete the setup.',
};
} catch (_error) {
return {
success: false,
message: `Failed to install VS Code companion extension from OpenVSX. Please try installing it manually.`,
};
}
}
}
export function getIdeInstaller(ide: DetectedIde): IdeInstaller | null {
switch (ide) {
case DetectedIde.VSCode:
return new VsCodeInstaller();
default:
return new OpenVSXInstaller();
return null;
}
}