mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-20 02:08:47 +00:00
refactor(mapped edits): clean up selection context creation
This commit is contained in:
@@ -264,13 +264,12 @@ export function registerChatCodeBlockActions() {
|
|||||||
// 1st sub-array - array with documents used to get the chat reply
|
// 1st sub-array - array with documents used to get the chat reply
|
||||||
const docRefs: DocumentContextItem[][] = [];
|
const docRefs: DocumentContextItem[][] = [];
|
||||||
|
|
||||||
const model = codeEditor.getModel();
|
if (codeEditor.hasModel()) {
|
||||||
if (model) {
|
const model = codeEditor.getModel();
|
||||||
const currentDocUri = model.uri;
|
const currentDocUri = model.uri;
|
||||||
const currentDocVersion = model.getVersionId();
|
const currentDocVersion = model.getVersionId();
|
||||||
const selections = codeEditor.getSelections();
|
const selections = codeEditor.getSelections();
|
||||||
if (selections && selections.length > 0) {
|
if (selections.length > 0) {
|
||||||
|
|
||||||
docRefs.push([
|
docRefs.push([
|
||||||
{
|
{
|
||||||
uri: currentDocUri,
|
uri: currentDocUri,
|
||||||
|
|||||||
Reference in New Issue
Block a user