diff --git a/extension/package.json b/extension/package.json index 0928eb4e93..b57776a67d 100644 --- a/extension/package.json +++ b/extension/package.json @@ -70,6 +70,11 @@ "command": "dvc.runQueuedExperiments", "category": "DVC" }, + { + "title": "%command.stopRunningExperiment%", + "command": "dvc.stopRunningExperiment", + "category": "DVC" + }, { "title": "%command.experimentGarbageCollect%", "command": "dvc.experimentGarbageCollect", @@ -175,6 +180,11 @@ "command": "dvc.runQueuedExperiments", "group": "experiments", "when": "scmProvider == dvc" + }, + { + "command": "dvc.stopRunningExperiment", + "group": "experiments", + "when": "scmProvider == dvc" } ], "scm/resourceState/context": [ diff --git a/extension/package.nls.json b/extension/package.nls.json index 0d2162e11d..9e0fed5cbf 100644 --- a/extension/package.nls.json +++ b/extension/package.nls.json @@ -14,6 +14,7 @@ "command.runExperiment": "Run Experiment", "command.runResetExperiment": "Run and Reset Experiment", "command.queueExperiment": "Queue Experiment", + "command.stopRunningExperiment": "Stop Running Experiment", "command.applyExperiment": "Apply Experiment", "command.branchExperiment": "Branch Experiment", "command.removeExperiment": "Remove Experiment", diff --git a/extension/src/extension.ts b/extension/src/extension.ts index cdad212203..e4257a049a 100644 --- a/extension/src/extension.ts +++ b/extension/src/extension.ts @@ -190,6 +190,12 @@ export class Extension { ) ) + this.dispose.track( + commands.registerCommand('dvc.stopRunningExperiment', () => + this.runner.stop() + ) + ) + this.gitExtension = this.dispose.track(new GitExtension()) this.gitExtension.ready.then(() => {