fix: select default source for mdtodo launch
This commit is contained in:
@@ -4132,8 +4132,11 @@ async function launchWorkbenchFromTask(command) {
|
||||
const requestedFilename = commandValue(command, ["filename", "fileName"]);
|
||||
const requestedTaskRef = typeof command.taskRef === "string" && command.taskRef.trim() ? command.taskRef.trim() : null;
|
||||
const requestedTaskId = typeof command.taskId === "string" && command.taskId.trim() ? command.taskId.trim() : null;
|
||||
const needsMdtodoSelection = Boolean(requestedFileRef || requestedFilename || requestedTaskRef || requestedTaskId);
|
||||
const sourceSelection = requestedSourceId && initialProject.selectedSourceIdRaw !== requestedSourceId
|
||||
? await selectMdtodoSource({ ...command, type: "selectMdtodoSource", sourceId: requestedSourceId })
|
||||
: !requestedSourceId && needsMdtodoSelection && !initialProject.selectedSourceIdRaw
|
||||
? await selectMdtodoSource({ ...command, type: "selectMdtodoSource", sourceId: "" })
|
||||
: null;
|
||||
const fileProject = sourceSelection ? await projectManagementCommandSnapshot({ includeRaw: true }) : initialProject;
|
||||
const fileSelection = (requestedFileRef && fileProject.selectedFileRefRaw !== requestedFileRef) || requestedFilename
|
||||
|
||||
Reference in New Issue
Block a user