Skip to content

Commit 0d0e776

Browse files
committed
Remove workspace chat context
1 parent 44310d9 commit 0d0e776

1 file changed

Lines changed: 0 additions & 27 deletions

File tree

src/lm/pullRequestContextProvider.ts

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -56,33 +56,6 @@ export class PullRequestContextProvider extends Disposable implements vscode.Cha
5656
this._onDidChangeWorkspaceChatContext.fire();
5757
}
5858

59-
async provideWorkspaceChatContext(_token: vscode.CancellationToken): Promise<vscode.ChatContextItem[]> {
60-
const modelDescription = this._reposManager.folderManagers.length > 1 ? 'Information about one of the current repositories. You can use this information when you need to calculate diffs or compare changes with the default branch' : 'Information about the current repository. You can use this information when you need to calculate diffs or compare changes with the default branch';
61-
const contexts: vscode.ChatContextItem[] = [];
62-
for (const folderManager of this._reposManager.folderManagers) {
63-
if (folderManager.gitHubRepositories.length === 0) {
64-
continue;
65-
}
66-
const defaults = await folderManager.getPullRequestDefaults();
67-
68-
let value = `Repository name: ${defaults.repo}
69-
Owner: ${defaults.owner}
70-
Current branch: ${folderManager.repository.state.HEAD?.name ?? 'unknown'}
71-
Default branch: ${defaults.base}`;
72-
if (folderManager.activePullRequest) {
73-
value = `${value}
74-
Active pull request (may not be the same as open pull request): #${folderManager.activePullRequest.number} ${folderManager.activePullRequest.html_url}`;
75-
}
76-
contexts.push({
77-
icon: new vscode.ThemeIcon('github-alt'),
78-
label: `${defaults.owner}/${defaults.repo}`,
79-
modelDescription,
80-
value
81-
});
82-
}
83-
return contexts;
84-
}
85-
8659
async provideChatContextForResource(_options: { resource: vscode.Uri }, _token: vscode.CancellationToken): Promise<PRChatContextItem | undefined> {
8760
const item = PullRequestOverviewPanel.currentPanel?.getCurrentItem();
8861
if (item) {

0 commit comments

Comments
 (0)