Path: blob/main/src/vs/workbench/contrib/chat/browser/pluginGitCommandService.ts
13401 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { CancellationToken } from '../../../../base/common/cancellation.js';6import { URI } from '../../../../base/common/uri.js';7import { localize } from '../../../../nls.js';8import { IPluginGitService } from '../common/plugins/pluginGitService.js';910function notSupported(): never {11throw new Error(localize('pluginsNotSupported', 'Agent plugins are not available in this environment'));12}1314/**15* Stub implementation of {@link IPluginGitService} that throws on16* every call. On desktop the native implementation is registered instead;17* this exists only so the browser layer has a default registration.18*/19export class BrowserPluginGitCommandService implements IPluginGitService {20declare readonly _serviceBrand: undefined;2122async cloneRepository(_cloneUrl: string, _targetDir: URI, _ref?: string, _token?: CancellationToken): Promise<void> { notSupported(); }23async pull(_repoDir: URI, _token?: CancellationToken): Promise<boolean> { notSupported(); }24async checkout(_repoDir: URI, _treeish: string, _detached?: boolean, _token?: CancellationToken): Promise<void> { notSupported(); }25async revParse(_repoDir: URI, _ref: string): Promise<string> { notSupported(); }26async fetch(_repoDir: URI, _token?: CancellationToken): Promise<void> { notSupported(); }27async fetchRepository(_repoDir: URI, _token?: CancellationToken): Promise<void> { notSupported(); }28async revListCount(_repoDir: URI, _fromRef: string, _toRef: string): Promise<number> { notSupported(); }29}303132