Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/copilot/src/extension/chatSessions/common/claudeWorkspaceFolderService.ts
13399 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 * as vscode from 'vscode';
7
import { createServiceIdentifier } from '../../../util/common/services';
8
9
export const IClaudeWorkspaceFolderService = createServiceIdentifier<IClaudeWorkspaceFolderService>('IClaudeWorkspaceFolderService');
10
11
/**
12
* Service for computing and caching workspace file changes for Claude chat sessions.
13
*/
14
export interface IClaudeWorkspaceFolderService {
15
readonly _serviceBrand: undefined;
16
/**
17
* Computes file changes for a workspace directory by diffing the current branch against a base branch.
18
* Results are cached per unique (cwd, gitBranch, gitBaseBranch) combination.
19
*
20
* @param cwd The working directory of the session.
21
* @param gitBranch The current git branch name, or `undefined` if unknown.
22
* @param gitBaseBranch The base branch to diff against, or `undefined` to diff against HEAD.
23
* @param forceRefresh When `true`, bypasses the cache and recomputes changes.
24
*/
25
getWorkspaceChanges(cwd: string, gitBranch: string | undefined, gitBaseBranch: string | undefined, forceRefresh?: boolean): Promise<vscode.ChatSessionChangedFile[]>;
26
}
27
28