mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
Add support for VSCode-like editors (#5699)
Co-authored-by: Jacob Richman <jacob314@gmail.com>
This commit is contained in:
@@ -147,11 +147,31 @@ 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 null;
|
||||
return new OpenVSXInstaller();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user