Skip to content

Commit 8f78098

Browse files
authored
Ensure inline chat is started with a good initial selection (microsoft#213860)
1 parent c47a1d8 commit 8f78098

File tree

1 file changed

+2
-0
lines changed
  • extensions/typescript-language-features/src/languageFeatures/util

1 file changed

+2
-0
lines changed

extensions/typescript-language-features/src/languageFeatures/util/copilot.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,10 @@ export class EditorChatFollowUp implements Command {
6969
expand.action.changes.flatMap((c) => c.textChanges)
7070
)
7171
: expand.range;
72+
const initialSelection = initialRange ? new vscode.Selection(initialRange.start, initialRange.end) : undefined;
7273
await vscode.commands.executeCommand('vscode.editorChat.start', {
7374
initialRange,
75+
initialSelection,
7476
message,
7577
autoSend: true,
7678
});

0 commit comments

Comments
 (0)