Use NEW_CHAT command to create fresh chat sessions for each issue action
When invoking "Fix with Copilot" or "Summarize with Copilot" on multiple issues, all suggestions were appended to the same chat session, making navigation difficult as the conversation grew.
Changes
- Replace
chatCommand()(which returnsQUICK_CHAT_OPENorOPEN_CHAT) withcommands.NEW_CHATin bothissue.chatSuggestFixandissue.chatSummarizeIssuecommands - Pass prompt as
{ inputValue: prompt }parameter instead of bare string to pre-populate the new session - Remove unused
chatCommandimport
Example
// Before: Reuses existing chat session
commands.executeCommand(chatCommandID, vscode.l10n.t('@githubpr Find a fix for issue {0}/{1}#{2}', ...));
// After: Creates new chat session each time
commands.executeCommand(commands.NEW_CHAT, { inputValue: vscode.l10n.t('@githubpr Find a fix for issue {0}/{1}#{2}', ...) });
Each invocation now starts a fresh chat session, keeping unrelated issue discussions separate.
Original prompt
This section details on the original issue you should resolve
<issue_title>Use a new quick chat for each request</issue_title> <issue_description>Testing microsoft/vscode-pull-request-github#6321
- select an issue and invoke 'Fix with Copilot'. Quick chat opens and proposes something
- select a different issue and invoke 'Fix with Copilot'. Quick chat adds that suggestion under the previous conversation.
As the two entries are not related to each other, I would prefer a new chat. With each request, the quick chat gets larger and difficult to navigate</issue_description>
Comments on the Issue (you are @copilot in this section)
- Fixes microsoft/vscode-pull-request-github#6357
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.