mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 10:38:59 +01:00
chat: add support for agent plugin sources (#299081)
* chat: add support for agent plugin sources - Adds support for agent plugins to reference sources as specified in PLUGIN_SOURCES.md, enabling installation from GitHub, npm, pip, and other package registries - Integrates source parsing and validation into the plugin installation service and repository service - Adds comprehensive test coverage for plugin source handling and installation from various sources - Creates PLUGIN_SOURCES.md documentation describing how to specify plugin source configurations (Commit message generated by Copilot) * comments * windows fixes and fault handling * fix tests
This commit is contained in:
@@ -1040,19 +1040,29 @@ export class CommandCenter {
|
||||
}
|
||||
|
||||
@command('_git.cloneRepository')
|
||||
async cloneRepository(url: string, parentPath: string): Promise<void> {
|
||||
async cloneRepository(url: string, localPath: string, ref?: string): Promise<void> {
|
||||
const opts = {
|
||||
location: ProgressLocation.Notification,
|
||||
title: l10n.t('Cloning git repository "{0}"...', url),
|
||||
cancellable: true
|
||||
};
|
||||
|
||||
const parentPath = path.dirname(localPath);
|
||||
const targetName = path.basename(localPath);
|
||||
|
||||
await window.withProgress(
|
||||
opts,
|
||||
(progress, token) => this.model.git.clone(url, { parentPath, progress }, token)
|
||||
(progress, token) => this.model.git.clone(url, { parentPath, targetName, progress, ref }, token)
|
||||
);
|
||||
}
|
||||
|
||||
@command('_git.checkout')
|
||||
async checkoutRepository(repositoryPath: string, treeish: string, detached?: boolean): Promise<void> {
|
||||
const dotGit = await this.git.getRepositoryDotGit(repositoryPath);
|
||||
const repo = new GitRepository(this.git, repositoryPath, undefined, dotGit, this.logger);
|
||||
await repo.checkout(treeish, [], detached ? { detached: true } : {});
|
||||
}
|
||||
|
||||
@command('_git.pull')
|
||||
async pullRepository(repositoryPath: string): Promise<void> {
|
||||
const dotGit = await this.git.getRepositoryDotGit(repositoryPath);
|
||||
|
||||
Reference in New Issue
Block a user