Skip to content

Commit 02e2df7

Browse files
Copilotalexr00
andauthored
Use NEW_CHAT command to create fresh chat sessions for each issue action (#8266)
* Initial plan * Initial plan for using new quick chat for each request Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> * Use NEW_CHAT command to create new chat sessions for issue commands - Updated issue.chatSuggestFix to use commands.NEW_CHAT instead of chatCommand() - Updated issue.chatSummarizeIssue to use commands.NEW_CHAT instead of chatCommand() - Removed unused chatCommand import from lm/utils - Each invocation now creates a new chat session instead of reusing existing one Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
1 parent b2fc320 commit 02e2df7

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/issues/issueFeatureRegistrar.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ import { IssueModel } from '../github/issueModel';
6969
import { IssueOverviewPanel } from '../github/issueOverview';
7070
import { RepositoriesManager } from '../github/repositoriesManager';
7171
import { ISSUE_OR_URL_EXPRESSION, parseIssueExpressionOutput } from '../github/utils';
72-
import { chatCommand } from '../lm/utils';
7372
import { ReviewManager } from '../view/reviewManager';
7473
import { ReviewsManager } from '../view/reviewsManager';
7574
import { PRNode } from '../view/treeNodes/pullRequestNode';
@@ -572,7 +571,6 @@ export class IssueFeatureRegistrar extends Disposable {
572571
return openCodeLink(issueModel, this.manager);
573572
}),
574573
);
575-
const chatCommandID = chatCommand();
576574
this._register(
577575
vscode.commands.registerCommand('issue.chatSummarizeIssue', (issue: any) => {
578576
if (!(issue instanceof IssueModel || issue instanceof PRNode)) {
@@ -583,11 +581,11 @@ export class IssueFeatureRegistrar extends Disposable {
583581
*/
584582
this.telemetry.sendTelemetryEvent('issue.chatSummarizeIssue');
585583
if (issue instanceof IssueModel) {
586-
commands.executeCommand(chatCommandID, vscode.l10n.t('@githubpr Summarize issue {0}/{1}#{2}', issue.remote.owner, issue.remote.repositoryName, issue.number));
584+
commands.executeCommand(commands.NEW_CHAT, { inputValue: vscode.l10n.t('@githubpr Summarize issue {0}/{1}#{2}', issue.remote.owner, issue.remote.repositoryName, issue.number) });
587585
} else {
588586
const pullRequestModel = issue.pullRequestModel;
589587
const remote = pullRequestModel.githubRepository.remote;
590-
commands.executeCommand(chatCommandID, vscode.l10n.t('@githubpr Summarize pull request {0}/{1}#{2}', remote.owner, remote.repositoryName, pullRequestModel.number));
588+
commands.executeCommand(commands.NEW_CHAT, { inputValue: vscode.l10n.t('@githubpr Summarize pull request {0}/{1}#{2}', remote.owner, remote.repositoryName, pullRequestModel.number) });
591589
}
592590
}),
593591
);
@@ -600,7 +598,7 @@ export class IssueFeatureRegistrar extends Disposable {
600598
"issue.chatSuggestFix" : {}
601599
*/
602600
this.telemetry.sendTelemetryEvent('issue.chatSuggestFix');
603-
commands.executeCommand(chatCommandID, vscode.l10n.t('@githubpr Find a fix for issue {0}/{1}#{2}', issue.remote.owner, issue.remote.repositoryName, issue.number));
601+
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) });
604602
}),
605603
);
606604
this._register(vscode.commands.registerCommand('issues.configureIssuesViewlet', async () => {

0 commit comments

Comments
 (0)