diff --git a/scripts/src/hwlab-node-web-observe-runner-source.ts b/scripts/src/hwlab-node-web-observe-runner-source.ts index c1e5f288..cf8e3555 100644 --- a/scripts/src/hwlab-node-web-observe-runner-source.ts +++ b/scripts/src/hwlab-node-web-observe-runner-source.ts @@ -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