Skip to content

Commit f7d1499

Browse files
authored
Improve studio access token commands (#5088)
1 parent 9d9bbc8 commit f7d1499

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

extension/package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,6 @@
124124
"command": "dvc.addStudioAccessToken",
125125
"category": "DVC"
126126
},
127-
{
128-
"title": "Update Studio Access Token",
129-
"command": "dvc.updateStudioAccessToken",
130-
"category": "DVC"
131-
},
132127
{
133128
"title": "Add Self-Hosted Studio URL",
134129
"command": "dvc.addStudioUrl",
@@ -465,6 +460,11 @@
465460
"command": "dvc.showSetup",
466461
"category": "DVC"
467462
},
463+
{
464+
"title": "Update Studio Access Token",
465+
"command": "dvc.updateStudioAccessToken",
466+
"category": "DVC"
467+
},
468468
{
469469
"title": "Update Self-Hosted Studio URL",
470470
"command": "dvc.updateStudioUrl",
@@ -727,10 +727,6 @@
727727
"command": "dvc.addStudioUrl",
728728
"when": "dvc.commands.available && dvc.project.available && !dvc.studio.selfhosted"
729729
},
730-
{
731-
"command": "dvc.updateStudioAccessToken",
732-
"when": "dvc.commands.available && dvc.project.available && dvc.studio.connected"
733-
},
734730
{
735731
"command": "dvc.addTarget",
736732
"when": "false"
@@ -955,6 +951,10 @@
955951
"command": "dvc.stopAllRunningExperiments",
956952
"when": "dvc.commands.available && dvc.project.available && dvc.experiment.running"
957953
},
954+
{
955+
"command": "dvc.updateStudioAccessToken",
956+
"when": "dvc.commands.available && dvc.project.available && dvc.studio.connected"
957+
},
958958
{
959959
"command": "dvc.updateStudioUrl",
960960
"when": "dvc.commands.available && dvc.project.available && dvc.studio.selfhosted"

extension/src/setup/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ export class Setup
306306
}
307307

308308
public async saveStudioAccessToken() {
309-
const cwd = this.dvcRoots[0] || getFirstWorkspaceFolder()
309+
const cwd = this.getCwd()
310310

311311
if (!cwd) {
312312
return

0 commit comments

Comments
 (0)