Skip to content

Commit 5dd4367

Browse files
authored
fix: always show confirm prompt for launching studio (#1357)
# What Makes it so that the CLI always presents the user with a Yes/No prompt asking them whether they'd like to launch the studio. Selecting 'Yes' will launch the studio, whereas selecting 'No' will launch the Overview page in the webapp. ![CleanShot 2025-03-31 at 11 22 00@2x](https://github.com/user-attachments/assets/e69fd132-193b-4353-802c-76681c70327f)
1 parent 859942b commit 5dd4367

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

cmd/quickstart.go

+2-10
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import (
1515
"github.com/speakeasy-api/speakeasy/internal/env"
1616

1717
"github.com/speakeasy-api/speakeasy/internal/charm/styles"
18-
"github.com/speakeasy-api/speakeasy/internal/config"
1918
"github.com/speakeasy-api/speakeasy/internal/git"
2019
"github.com/speakeasy-api/speakeasy/internal/interactivity"
2120
"github.com/speakeasy-api/speakeasy/internal/log"
@@ -435,21 +434,14 @@ func shouldLaunchStudio(ctx context.Context, wf *run.Workflow, fromQuickstart bo
435434
return false
436435
}
437436

438-
offerDeclineOption := !fromQuickstart && config.SeenStudio()
439-
440437
numDiagnostics := wf.CountDiagnostics()
441438
if numDiagnostics == 0 {
442439
return false
443440
}
444441

445-
if offerDeclineOption {
446-
message := fmt.Sprintf("We've detected %d potential improvements for your SDK. Would you like to launch the studio?", numDiagnostics)
447-
return interactivity.SimpleConfirm(message, true)
448-
}
449-
450-
message := fmt.Sprintf("\nWe've detected %d potential improvements for your SDK. The Speakeasy Studio can help you fix them.\n", numDiagnostics)
442+
message := fmt.Sprintf("\nWe've detected %d potential improvements for your SDK. Speakeasy Studio can help you fix them.\n", numDiagnostics)
451443
log.From(ctx).PrintStyled(styles.HeavilyEmphasized, message)
452-
return interactivity.SimpleButton("↵ Launch Studio", "Press enter to continue")
444+
return interactivity.SimpleConfirm("Would you like to launch Speakeasy Studio?", true)
453445
}
454446

455447
func printSampleSpecMessage(absSchemaPath string) {

0 commit comments

Comments
 (0)