40
}
41
42
>
export async function projectFromCopilotContext(context: ICopilotSessionContext | undefined, gitService: IAgentHostGitService): Promise<IAgentSessionProjectInfo | undefined> {
copilotGitProject.ts
43
>
const workingDirectory = typeof context?.cwd === 'string'
44
? URI.file(context.cwd)
45
: typeof context?.gitRoot === 'string'
46
? URI.file(context.gitRoot)
47
: undefined;
49
>
if (gitProject) {
50
return gitProject;
51
}
53
>
if (context?.repository) {
54
return projectFromRepository(context.repository);
55
}