Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/copilot/src/platform/git/common/gitDiffService.ts
13401 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import type { CancellationToken, Uri } from 'vscode';
7
import { createServiceIdentifier } from '../../../util/common/services';
8
import { Change, Repository } from '../vscode/git';
9
10
export const IGitDiffService = createServiceIdentifier<IGitDiffService>('IGitDiffService');
11
12
export interface IGitDiffService {
13
readonly _serviceBrand: undefined;
14
15
getChangeDiffs(repository: Repository | Uri, changes: Change[], token?: CancellationToken): Promise<Diff[]>;
16
getWorkingTreeDiffsFromRef(repository: Repository | Uri, changes: Change[], ref: string, token?: CancellationToken): Promise<Diff[]>;
17
}
18
19
export interface Diff extends Change {
20
readonly diff: string;
21
}
22
23