Skip to content

Commit 68e8d39

Browse files
committed
feat: port some init logic to workspace init
1 parent 5192fa4 commit 68e8d39

File tree

5 files changed

+356
-175
lines changed

5 files changed

+356
-175
lines changed

pkg/cmd/build.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ func handleBuildsCreate(ctx context.Context, cmd *cli.Command) error {
452452
if err != nil {
453453
return err
454454
}
455-
Progress("Creating build...")
455+
buildGroup := Info("Creating build...")
456456
params := stainless.BuildNewParams{}
457457
res, err := cc.client.Builds.New(
458458
context.TODO(),
@@ -463,20 +463,18 @@ func handleBuildsCreate(ctx context.Context, cmd *cli.Command) error {
463463
return err
464464
}
465465

466-
// Print the build ID to stderr
467-
buildGroup := Success("Build created")
468466
buildGroup.Property("build_id", res.ID)
469467

470468
if cmd.Bool("wait") {
471-
waitGroup := Progress("Waiting for build to complete...")
469+
waitGroup := Info("Waiting for build to complete...")
472470

473471
res, err = waitForBuildCompletion(context.TODO(), cc.client, res.ID, &waitGroup)
474472
if err != nil {
475473
return err
476474
}
477475

478476
if cmd.Bool("pull") {
479-
pullGroup := Progress("Pulling build outputs...")
477+
pullGroup := Info("Pulling build outputs...")
480478
if err := pullBuildOutputs(context.TODO(), cc.client, *res, targetPaths, &pullGroup); err != nil {
481479
pullGroup.Error("Failed to pull outputs: %v", err)
482480
} else {

pkg/cmd/form.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func GetFormTheme(indent int) *huh.Theme {
1919
t.Form.Base = t.Form.Base.PaddingLeft(indent * 2)
2020
t.Group.Title = t.Group.Title.Foreground(gray).PaddingBottom(1)
2121

22-
t.Focused.Title = t.Focused.Title.Foreground(primaryBright).Bold(true)
22+
t.Focused.Title = t.Focused.Title.Bold(true)
2323
t.Focused.Base = t.Focused.Base.
2424
BorderLeft(false).
2525
SetString("\b\b" + lipgloss.NewStyle().Foreground(primaryBright).Render("✱")).
@@ -30,7 +30,7 @@ func GetFormTheme(indent int) *huh.Theme {
3030
t.Focused.ErrorIndicator = t.Focused.ErrorIndicator.Foreground(error)
3131
t.Focused.ErrorMessage = t.Focused.ErrorMessage.Foreground(error)
3232

33-
t.Blurred.Title = t.Blurred.Title.Foreground(primary).Bold(true)
33+
t.Blurred.Title = t.Blurred.Title.Foreground(grayBright).Bold(true)
3434
t.Blurred.Base = t.Blurred.Base.
3535
Foreground(grayBright).
3636
BorderLeft(false).

0 commit comments

Comments
 (0)