feat: launch hyper beta (#2768)

Andrey Nering created

No need to set `HYPERCRUSH=1` anymore.

Change summary

internal/agent/hyper/provider.go | 14 --------------
internal/cmd/login.go            |  4 ----
internal/config/provider.go      |  5 +----
3 files changed, 1 insertion(+), 22 deletions(-)

Detailed changes

internal/agent/hyper/provider.go 🔗

@@ -10,7 +10,6 @@ import (
 	"log/slog"
 	"net/http"
 	"os"
-	"strconv"
 	"sync"
 	"time"
 
@@ -22,19 +21,6 @@ import (
 //go:embed provider.json
 var embedded []byte
 
-// Enabled returns true if hyper is enabled.
-var Enabled = sync.OnceValue(func() bool {
-	b, _ := strconv.ParseBool(
-		cmp.Or(
-			os.Getenv("HYPER"),
-			os.Getenv("HYPERCRUSH"),
-			os.Getenv("HYPER_ENABLE"),
-			os.Getenv("HYPER_ENABLED"),
-		),
-	)
-	return b
-})
-
 // Embedded returns the embedded Hyper provider.
 var Embedded = sync.OnceValue(func() catwalk.Provider {
 	var provider catwalk.Provider

internal/cmd/login.go 🔗

@@ -9,7 +9,6 @@ import (
 
 	"charm.land/lipgloss/v2"
 	"github.com/atotto/clipboard"
-	hyperp "github.com/charmbracelet/crush/internal/agent/hyper"
 	"github.com/charmbracelet/crush/internal/client"
 	"github.com/charmbracelet/crush/internal/config"
 	"github.com/charmbracelet/crush/internal/oauth"
@@ -70,9 +69,6 @@ crush login copilot
 }
 
 func loginHyper(c *client.Client, wsID string) error {
-	if !hyperp.Enabled() {
-		return fmt.Errorf("hyper not enabled")
-	}
 	ctx := getLoginContext()
 
 	resp, err := hyper.InitiateDeviceAuth(ctx)

internal/config/provider.go 🔗

@@ -91,9 +91,6 @@ func UpdateProviders(pathOrURL string) error {
 
 // UpdateHyper updates the Hyper provider information from a specified URL.
 func UpdateHyper(pathOrURL string) error {
-	if !hyper.Enabled() {
-		return fmt.Errorf("hyper not enabled")
-	}
 	var provider catwalk.Provider
 	pathOrURL = cmp.Or(pathOrURL, hyper.BaseURL())
 
@@ -169,7 +166,7 @@ func Providers(cfg *Config) ([]catwalk.Provider, error) {
 		})
 
 		wg.Go(func() {
-			if customProvidersOnly || !hyper.Enabled() {
+			if customProvidersOnly {
 				return
 			}
 			path := cachePathFor("hyper")