mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-12 07:01:09 -07:00
Improve extensions consent flow, command formatting, github-release behavior (#9121)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
@@ -220,11 +220,14 @@ export async function checkForExtensionUpdate(
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
export interface GitHubDownloadResult {
|
||||
tagName: string;
|
||||
type: 'git' | 'github-release';
|
||||
}
|
||||
export async function downloadFromGitHubRelease(
|
||||
installMetadata: ExtensionInstallMetadata,
|
||||
destination: string,
|
||||
): Promise<string> {
|
||||
): Promise<GitHubDownloadResult> {
|
||||
const { source, ref } = installMetadata;
|
||||
const { owner, repo } = parseGitHubRepoForReleases(source);
|
||||
|
||||
@@ -289,7 +292,10 @@ export async function downloadFromGitHubRelease(
|
||||
}
|
||||
|
||||
await fs.promises.unlink(downloadedAssetPath);
|
||||
return releaseData.tag_name;
|
||||
return {
|
||||
tagName: releaseData.tag_name,
|
||||
type: 'github-release',
|
||||
};
|
||||
} catch (error) {
|
||||
throw new Error(
|
||||
`Failed to download release from ${installMetadata.source}: ${getErrorMessage(error)}`,
|
||||
|
||||
Reference in New Issue
Block a user