only convert a selection when it is a selection (#203423)

re https://github.com/microsoft/vscode-copilot/issues/3758
This commit is contained in:
Johannes Rieken 2024-01-25 10:23:30 +01:00 committed by GitHub
parent 4da4653519
commit b10846f1e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -84,7 +84,7 @@ export class ExtHostInteractiveEditor implements ExtHostInlineChatShape {
return {
initialRange: v.initialRange ? typeConvert.Range.from(v.initialRange) : undefined,
initialSelection: v.initialSelection ? typeConvert.Selection.from(v.initialSelection) : undefined,
initialSelection: extHostTypes.Selection.isSelection(v.initialSelection) ? typeConvert.Selection.from(v.initialSelection) : undefined,
message: v.message,
autoSend: v.autoSend,
position: v.position ? typeConvert.Position.from(v.position) : undefined,