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