Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
449 changes: 40 additions & 409 deletions package.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@
"welcome.github.activePullRequest.contents": "Loading...",
"languageModelTools.github-pull-request_issue_fetch.displayName": "Get a GitHub Issue or pull request",
"languageModelTools.github-pull-request_issue_summarize.displayName": "Summarize a GitHub Issue or pull request",
"languageModelTools.github-pull-request_labels_fetch.displayName": "Fetch labels from a GitHub repository",
"languageModelTools.github-pull-request_notification_fetch.displayName": "Get a GitHub Notification",
"languageModelTools.github-pull-request_notification_summarize.displayName": "Summarize a GitHub Notification",
"languageModelTools.github-pull-request_suggest-fix.displayName": "Suggest a Fix for a GitHub Issue",
Expand Down
1 change: 1 addition & 0 deletions src/common/executeCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export namespace contexts {
export namespace commands {
export const OPEN_CHAT = 'workbench.action.chat.open';
export const NEW_CHAT = 'workbench.action.chat.newChat';
export const SHOW_CHAT = 'workbench.panel.chat';
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commands.SHOW_CHAT is set to 'workbench.panel.chat', which is a view/container id rather than a command id in VS Code. Executing it via vscode.commands.executeCommand is likely to fail at runtime. Prefer using the existing commands.OPEN_CHAT (workbench.action.chat.open) or a dedicated focus command (e.g. commands.focusView('workbench.panel.chat') if that's the intent) instead of introducing SHOW_CHAT as an executable command.

Suggested change
export const SHOW_CHAT = 'workbench.panel.chat';
export const SHOW_CHAT = 'workbench.action.chat.open';

Copilot uses AI. Check for mistakes.
export const CHAT_SETUP_ACTION_ID = 'workbench.action.chat.triggerSetup';

export const QUICK_CHAT_OPEN = 'workbench.action.quickchat.toggle';
Expand Down
11 changes: 2 additions & 9 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import { GitLensIntegration } from './integrations/gitlens/gitlensImpl';
import { IssueFeatureRegistrar } from './issues/issueFeatureRegistrar';
import { StateManager } from './issues/stateManager';
import { IssueContextProvider } from './lm/issueContextProvider';
import { ChatParticipant, ChatParticipantState } from './lm/participants';
import { PullRequestContextProvider } from './lm/pullRequestContextProvider';
import { registerTools } from './lm/tools/tools';
import { migrate } from './migrations';
Expand Down Expand Up @@ -300,17 +299,11 @@ async function init(
}

function initChat(context: vscode.ExtensionContext, credentialStore: CredentialStore, reposManager: RepositoriesManager) {
const createParticipant = () => {
const chatParticipantState = new ChatParticipantState();
context.subscriptions.push(new ChatParticipant(context, chatParticipantState));
registerTools(context, credentialStore, reposManager, chatParticipantState);
};

const chatEnabled = () => vscode.workspace.getConfiguration(PR_SETTINGS_NAMESPACE).get<boolean>(EXPERIMENTAL_CHAT, false);
if (chatEnabled()) {
createParticipant();
registerTools(context, credentialStore, reposManager);
} else {
initBasedOnSettingChange(PR_SETTINGS_NAMESPACE, EXPERIMENTAL_CHAT, chatEnabled, createParticipant, context.subscriptions);
initBasedOnSettingChange(PR_SETTINGS_NAMESPACE, EXPERIMENTAL_CHAT, chatEnabled, () => registerTools(context, credentialStore, reposManager), context.subscriptions);
}
}

Expand Down
9 changes: 6 additions & 3 deletions src/issues/issueFeatureRegistrar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -565,11 +565,13 @@ export class IssueFeatureRegistrar extends Disposable {
*/
this.telemetry.sendTelemetryEvent('issue.chatSummarizeIssue');
if (issue instanceof IssueModel) {
commands.executeCommand(commands.NEW_CHAT, { inputValue: vscode.l10n.t('@githubpr Summarize issue {0}/{1}#{2}', issue.remote.owner, issue.remote.repositoryName, issue.number) });
commands.executeCommand(commands.NEW_CHAT, { inputValue: vscode.l10n.t('Summarize issue {0}/{1}#{2}', issue.remote.owner, issue.remote.repositoryName, issue.number) });
commands.executeCommand(commands.SHOW_CHAT);
} else {
const pullRequestModel = issue.pullRequestModel;
const remote = pullRequestModel.githubRepository.remote;
commands.executeCommand(commands.NEW_CHAT, { inputValue: vscode.l10n.t('@githubpr Summarize pull request {0}/{1}#{2}', remote.owner, remote.repositoryName, pullRequestModel.number) });
commands.executeCommand(commands.NEW_CHAT, { inputValue: vscode.l10n.t('Summarize pull request {0}/{1}#{2}', remote.owner, remote.repositoryName, pullRequestModel.number) });
commands.executeCommand(commands.SHOW_CHAT);
Comment on lines +568 to +574
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This calls commands.SHOW_CHAT after commands.NEW_CHAT, but SHOW_CHAT is defined as 'workbench.panel.chat' (a view id) and is not an executable command. To reliably reveal the chat UI, use commands.OPEN_CHAT (as done elsewhere, e.g. pr.applySuggestionWithCopilot) or focus the view via the .focus command instead.

This issue also appears on line 587 of the same file.

Copilot uses AI. Check for mistakes.
}
}),
);
Expand All @@ -582,7 +584,8 @@ export class IssueFeatureRegistrar extends Disposable {
"issue.chatSuggestFix" : {}
*/
this.telemetry.sendTelemetryEvent('issue.chatSuggestFix');
commands.executeCommand(commands.NEW_CHAT, { inputValue: vscode.l10n.t('@githubpr Find a fix for issue {0}/{1}#{2}', issue.remote.owner, issue.remote.repositoryName, issue.number) });
commands.executeCommand(commands.NEW_CHAT, { inputValue: vscode.l10n.t('Find a fix for issue {0}/{1}#{2}', issue.remote.owner, issue.remote.repositoryName, issue.number) });
commands.executeCommand(commands.SHOW_CHAT);
}),
);
this._register(vscode.commands.registerCommand('issues.configureIssuesViewlet', async () => {
Expand Down
210 changes: 0 additions & 210 deletions src/lm/participants.ts

This file was deleted.

43 changes: 0 additions & 43 deletions src/lm/participantsPrompt.ts

This file was deleted.

Loading
Loading