Path: blob/main/extensions/copilot/src/platform/git/common/gitDiffService.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 type { CancellationToken, Uri } from 'vscode';6import { createServiceIdentifier } from '../../../util/common/services';7import { Change, Repository } from '../vscode/git';89export const IGitDiffService = createServiceIdentifier<IGitDiffService>('IGitDiffService');1011export interface IGitDiffService {12readonly _serviceBrand: undefined;1314getChangeDiffs(repository: Repository | Uri, changes: Change[], token?: CancellationToken): Promise<Diff[]>;15getWorkingTreeDiffsFromRef(repository: Repository | Uri, changes: Change[], ref: string, token?: CancellationToken): Promise<Diff[]>;16}1718export interface Diff extends Change {19readonly diff: string;20}212223